Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
1a8c13ad
U
uni-app
项目概览
DCloud
/
uni-app
6 个月 前同步成功
通知
751
Star
38709
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
8
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
8
Issue
8
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
1a8c13ad
编写于
11月 24, 2022
作者:
DCloud-WZF
💬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
perf(vue-devtools): optimize debug page
上级
a59b069d
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
15 addition
and
441 deletion
+15
-441
packages/uni-vue-devtools/lib/front/app.html
packages/uni-vue-devtools/lib/front/app.html
+2
-2
packages/uni-vue-devtools/lib/front/mp-alipay/app.html
packages/uni-vue-devtools/lib/front/mp-alipay/app.html
+0
-57
packages/uni-vue-devtools/lib/front/mp-alipay/network.js
packages/uni-vue-devtools/lib/front/mp-alipay/network.js
+0
-8
packages/uni-vue-devtools/lib/front/mp-baidu/app.html
packages/uni-vue-devtools/lib/front/mp-baidu/app.html
+0
-57
packages/uni-vue-devtools/lib/front/mp-baidu/network.js
packages/uni-vue-devtools/lib/front/mp-baidu/network.js
+0
-8
packages/uni-vue-devtools/lib/front/mp-kuaishou/app.html
packages/uni-vue-devtools/lib/front/mp-kuaishou/app.html
+0
-57
packages/uni-vue-devtools/lib/front/mp-kuaishou/network.js
packages/uni-vue-devtools/lib/front/mp-kuaishou/network.js
+0
-8
packages/uni-vue-devtools/lib/front/mp-lark/app.html
packages/uni-vue-devtools/lib/front/mp-lark/app.html
+0
-57
packages/uni-vue-devtools/lib/front/mp-lark/network.js
packages/uni-vue-devtools/lib/front/mp-lark/network.js
+0
-8
packages/uni-vue-devtools/lib/front/mp-qq/network.js
packages/uni-vue-devtools/lib/front/mp-qq/network.js
+0
-8
packages/uni-vue-devtools/lib/front/mp-toutiao/app.html
packages/uni-vue-devtools/lib/front/mp-toutiao/app.html
+0
-57
packages/uni-vue-devtools/lib/front/mp-toutiao/network.js
packages/uni-vue-devtools/lib/front/mp-toutiao/network.js
+0
-8
packages/uni-vue-devtools/lib/front/mp-weixin/app.html
packages/uni-vue-devtools/lib/front/mp-weixin/app.html
+0
-57
packages/uni-vue-devtools/lib/front/mp-weixin/network.js
packages/uni-vue-devtools/lib/front/mp-weixin/network.js
+0
-8
packages/uni-vue-devtools/lib/front/server.js
packages/uni-vue-devtools/lib/front/server.js
+12
-33
packages/uni-vue-devtools/package.json
packages/uni-vue-devtools/package.json
+0
-1
packages/uni-vue-devtools/tsconfig.json
packages/uni-vue-devtools/tsconfig.json
+1
-5
pnpm-lock.yaml
pnpm-lock.yaml
+0
-2
未找到文件。
packages/uni-vue-devtools/lib/front/
mp-qq/
app.html
→
packages/uni-vue-devtools/lib/front/app.html
浏览文件 @
1a8c13ad
...
...
@@ -2,7 +2,7 @@
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<link
rel=
"shortcut icon"
href=
".
.
/icons/favicon.ico"
>
<link
rel=
"shortcut icon"
href=
"./icons/favicon.ico"
>
<title>
uni-dev-tools
</title>
<style>
#app
,
...
...
@@ -51,7 +51,7 @@
</div>
<div
id=
"app"
>
</div>
<script
src=
'./
mp-qq/network.js
'
></script>
<script
src=
'./
network
'
></script>
<script
src=
'./devtools.js'
></script>
</body>
</html>
\ No newline at end of file
packages/uni-vue-devtools/lib/front/mp-alipay/app.html
已删除
100644 → 0
浏览文件 @
a59b069d
<!doctype html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<link
rel=
"shortcut icon"
href=
"../icons/favicon.ico"
>
<title>
uni-dev-tools
</title>
<style>
#app
,
#intro
{
display
:
flex
;
flex-direction
:
column
;
position
:
absolute
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
margin
:
0
;
padding
:
0
;
}
#intro
{
z-index
:
100000
;
justify-content
:
center
;
align-items
:
center
;
background-color
:
#fff
;
text-align
:
center
;
font-family
:
Roboto
,
sans-serif
;
color
:
#484848
;
}
#intro
.hidden
{
display
:
none
;
}
#intro
#logo
{
width
:
120px
;
}
#intro
.title
{
margin
:
30px
0
;
font-size
:
26px
;
}
</style>
</head>
<body>
<div
id=
"intro"
>
<img
src=
"./icons/128.png"
alt=
""
id=
"logo"
/>
<h2
class=
"title"
>
Waiting for connection...
</h2>
</div>
<div
id=
"app"
>
</div>
<script
src=
'./mp-alipay/network.js'
></script>
<script
src=
'./devtools.js'
></script>
</body>
</html>
\ No newline at end of file
packages/uni-vue-devtools/lib/front/mp-alipay/network.js
已删除
100644 → 0
浏览文件 @
a59b069d
window
.
process
=
{
env
:
{
HOST
:
'
192.168.12.130
'
,
PORT
:
'
8099
'
,
}
}
\ No newline at end of file
packages/uni-vue-devtools/lib/front/mp-baidu/app.html
已删除
100644 → 0
浏览文件 @
a59b069d
<!doctype html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<link
rel=
"shortcut icon"
href=
"../icons/favicon.ico"
>
<title>
uni-dev-tools
</title>
<style>
#app
,
#intro
{
display
:
flex
;
flex-direction
:
column
;
position
:
absolute
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
margin
:
0
;
padding
:
0
;
}
#intro
{
z-index
:
100000
;
justify-content
:
center
;
align-items
:
center
;
background-color
:
#fff
;
text-align
:
center
;
font-family
:
Roboto
,
sans-serif
;
color
:
#484848
;
}
#intro
.hidden
{
display
:
none
;
}
#intro
#logo
{
width
:
120px
;
}
#intro
.title
{
margin
:
30px
0
;
font-size
:
26px
;
}
</style>
</head>
<body>
<div
id=
"intro"
>
<img
src=
"./icons/128.png"
alt=
""
id=
"logo"
/>
<h2
class=
"title"
>
Waiting for connection...
</h2>
</div>
<div
id=
"app"
>
</div>
<script
src=
'./mp-baidu/network.js'
></script>
<script
src=
'./devtools.js'
></script>
</body>
</html>
\ No newline at end of file
packages/uni-vue-devtools/lib/front/mp-baidu/network.js
已删除
100644 → 0
浏览文件 @
a59b069d
window
.
process
=
{
env
:
{
HOST
:
'
192.168.12.130
'
,
PORT
:
'
8100
'
,
}
}
\ No newline at end of file
packages/uni-vue-devtools/lib/front/mp-kuaishou/app.html
已删除
100644 → 0
浏览文件 @
a59b069d
<!doctype html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<link
rel=
"shortcut icon"
href=
"../icons/favicon.ico"
>
<title>
uni-dev-tools
</title>
<style>
#app
,
#intro
{
display
:
flex
;
flex-direction
:
column
;
position
:
absolute
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
margin
:
0
;
padding
:
0
;
}
#intro
{
z-index
:
100000
;
justify-content
:
center
;
align-items
:
center
;
background-color
:
#fff
;
text-align
:
center
;
font-family
:
Roboto
,
sans-serif
;
color
:
#484848
;
}
#intro
.hidden
{
display
:
none
;
}
#intro
#logo
{
width
:
120px
;
}
#intro
.title
{
margin
:
30px
0
;
font-size
:
26px
;
}
</style>
</head>
<body>
<div
id=
"intro"
>
<img
src=
"./icons/128.png"
alt=
""
id=
"logo"
/>
<h2
class=
"title"
>
Waiting for connection...
</h2>
</div>
<div
id=
"app"
>
</div>
<script
src=
'./mp-kuaishou/network.js'
></script>
<script
src=
'./devtools.js'
></script>
</body>
</html>
\ No newline at end of file
packages/uni-vue-devtools/lib/front/mp-kuaishou/network.js
已删除
100644 → 0
浏览文件 @
a59b069d
window
.
process
=
{
env
:
{
HOST
:
'
192.168.12.130
'
,
PORT
:
'
8098
'
,
}
}
\ No newline at end of file
packages/uni-vue-devtools/lib/front/mp-lark/app.html
已删除
100644 → 0
浏览文件 @
a59b069d
<!doctype html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<link
rel=
"shortcut icon"
href=
"../icons/favicon.ico"
>
<title>
uni-dev-tools
</title>
<style>
#app
,
#intro
{
display
:
flex
;
flex-direction
:
column
;
position
:
absolute
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
margin
:
0
;
padding
:
0
;
}
#intro
{
z-index
:
100000
;
justify-content
:
center
;
align-items
:
center
;
background-color
:
#fff
;
text-align
:
center
;
font-family
:
Roboto
,
sans-serif
;
color
:
#484848
;
}
#intro
.hidden
{
display
:
none
;
}
#intro
#logo
{
width
:
120px
;
}
#intro
.title
{
margin
:
30px
0
;
font-size
:
26px
;
}
</style>
</head>
<body>
<div
id=
"intro"
>
<img
src=
"./icons/128.png"
alt=
""
id=
"logo"
/>
<h2
class=
"title"
>
Waiting for connection...
</h2>
</div>
<div
id=
"app"
>
</div>
<script
src=
'./mp-lark/network.js'
></script>
<script
src=
'./devtools.js'
></script>
</body>
</html>
\ No newline at end of file
packages/uni-vue-devtools/lib/front/mp-lark/network.js
已删除
100644 → 0
浏览文件 @
a59b069d
window
.
process
=
{
env
:
{
HOST
:
'
192.168.12.130
'
,
PORT
:
'
8098
'
,
}
}
\ No newline at end of file
packages/uni-vue-devtools/lib/front/mp-qq/network.js
已删除
100644 → 0
浏览文件 @
a59b069d
window
.
process
=
{
env
:
{
HOST
:
'
192.168.12.130
'
,
PORT
:
'
8100
'
,
}
}
\ No newline at end of file
packages/uni-vue-devtools/lib/front/mp-toutiao/app.html
已删除
100644 → 0
浏览文件 @
a59b069d
<!doctype html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<link
rel=
"shortcut icon"
href=
"../icons/favicon.ico"
>
<title>
uni-dev-tools
</title>
<style>
#app
,
#intro
{
display
:
flex
;
flex-direction
:
column
;
position
:
absolute
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
margin
:
0
;
padding
:
0
;
}
#intro
{
z-index
:
100000
;
justify-content
:
center
;
align-items
:
center
;
background-color
:
#fff
;
text-align
:
center
;
font-family
:
Roboto
,
sans-serif
;
color
:
#484848
;
}
#intro
.hidden
{
display
:
none
;
}
#intro
#logo
{
width
:
120px
;
}
#intro
.title
{
margin
:
30px
0
;
font-size
:
26px
;
}
</style>
</head>
<body>
<div
id=
"intro"
>
<img
src=
"./icons/128.png"
alt=
""
id=
"logo"
/>
<h2
class=
"title"
>
Waiting for connection...
</h2>
</div>
<div
id=
"app"
>
</div>
<script
src=
'./mp-toutiao/network.js'
></script>
<script
src=
'./devtools.js'
></script>
</body>
</html>
\ No newline at end of file
packages/uni-vue-devtools/lib/front/mp-toutiao/network.js
已删除
100644 → 0
浏览文件 @
a59b069d
window
.
process
=
{
env
:
{
HOST
:
'
192.168.12.130
'
,
PORT
:
'
8099
'
,
}
}
\ No newline at end of file
packages/uni-vue-devtools/lib/front/mp-weixin/app.html
已删除
100644 → 0
浏览文件 @
a59b069d
<!doctype html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<link
rel=
"shortcut icon"
href=
"../icons/favicon.ico"
>
<title>
uni-dev-tools
</title>
<style>
#app
,
#intro
{
display
:
flex
;
flex-direction
:
column
;
position
:
absolute
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
margin
:
0
;
padding
:
0
;
}
#intro
{
z-index
:
100000
;
justify-content
:
center
;
align-items
:
center
;
background-color
:
#fff
;
text-align
:
center
;
font-family
:
Roboto
,
sans-serif
;
color
:
#484848
;
}
#intro
.hidden
{
display
:
none
;
}
#intro
#logo
{
width
:
120px
;
}
#intro
.title
{
margin
:
30px
0
;
font-size
:
26px
;
}
</style>
</head>
<body>
<div
id=
"intro"
>
<img
src=
"./icons/128.png"
alt=
""
id=
"logo"
/>
<h2
class=
"title"
>
Waiting for connection...
</h2>
</div>
<div
id=
"app"
>
</div>
<script
src=
'./mp-weixin/network.js'
></script>
<script
src=
'./devtools.js'
></script>
</body>
</html>
\ No newline at end of file
packages/uni-vue-devtools/lib/front/mp-weixin/network.js
已删除
100644 → 0
浏览文件 @
a59b069d
window
.
process
=
{
env
:
{
HOST
:
'
192.168.12.130
'
,
PORT
:
'
8098
'
,
}
}
\ No newline at end of file
packages/uni-vue-devtools/lib/front/server.js
浏览文件 @
1a8c13ad
/* eslint-disable no-restricted-globals */
const
_detectPort
=
require
(
'
detect-port
'
);
const
os
=
require
(
'
os
'
)
const
{
createServer
}
=
require
(
'
http
'
)
...
...
@@ -51,15 +52,22 @@ function detectPort(port) {
}
function
initFrontServer
(
socketHost
,
socketPort
,
network
,
devtoolsPort
)
{
const
platform
=
process
.
env
.
UNI_PLATFORM
app
.
use
(
express
.
static
(
__dirname
))
app
.
get
(
'
/
'
,
(
_
,
res
)
=>
{
res
.
send
(
fs
.
readFileSync
(
path
.
resolve
(
__dirname
,
`./
${
platform
}
/
app.html`
)).
toString
())
res
.
send
(
fs
.
readFileSync
(
path
.
resolve
(
__dirname
,
`./app.html`
)).
toString
())
})
writeNetworkFile
(
platform
,
socketHost
,
socketPort
)
app
.
get
(
'
/network
'
,
(
_
,
res
)
=>
{
res
.
send
(
`window.process = {
env: {
HOST: '
${
socketHost
}
',
PORT: '
${
socketPort
}
',
}
} `
)
})
app
.
listen
(
devtoolsPort
,
'
localhost
'
,
()
=>
{
const
colorUrl
=
(
url
)
=>
colors
.
cyan
(
url
.
replace
(
/:
(\d
+
)\/
/
,
(
_
,
port
)
=>
`:
${
colors
.
bold
(
port
)}
/`
))
...
...
@@ -72,35 +80,6 @@ function initFrontServer(socketHost, socketPort, network, devtoolsPort) {
}
function
writeNetworkFile
(
platform
,
HOST
,
PORT
)
{
fs
.
open
(
path
.
resolve
(
__dirname
,
`./
${
platform
}
/network.js`
),
'
w
'
,
(
err
,
fd
)
=>
{
if
(
err
)
{
console
.
log
(
colors
.
red
(
err
))
return
}
fs
.
write
(
fd
,
`
window.process = {
env: {
HOST: '
${
HOST
}
',
PORT: '
${
PORT
}
',
}
}
`
,
(
err
)
=>
{
if
(
err
)
{
console
.
log
(
colors
.
red
(
err
))
}
}
)
}
)
}
function
initSocketServer
(
host
,
port
)
{
const
httpServer
=
createServer
(
app
)
const
io
=
new
Server
(
httpServer
,
{
...
...
packages/uni-vue-devtools/package.json
浏览文件 @
1a8c13ad
...
...
@@ -26,7 +26,6 @@
"detect-port"
:
"^1.5.1"
,
"express"
:
"^4.17.1"
,
"open"
:
"^8.4.0"
,
"picocolors"
:
"^1.0.0"
,
"socket.io"
:
"^4.4.0"
}
}
packages/uni-vue-devtools/tsconfig.json
浏览文件 @
1a8c13ad
...
...
@@ -10,9 +10,5 @@
"../global.d.ts"
,
"../shims-node.d.ts"
,
"../shims-uni-app.d.ts"
],
"baseUrl"
:
"."
,
"paths"
:
{
"tslib"
:
[
"node_modules/tslib/tslib.d.ts"
]
}
]
}
pnpm-lock.yaml
浏览文件 @
1a8c13ad
...
...
@@ -839,14 +839,12 @@ importers:
detect-port
:
^1.5.1
express
:
^4.17.1
open
:
^8.4.0
picocolors
:
^1.0.0
socket.io
:
^4.4.0
dependencies
:
'
@dcloudio/uni-cli-shared'
:
link:../uni-cli-shared
detect-port
:
1.5.1
express
:
4.18.2
open
:
8.4.0
picocolors
:
1.0.0
socket.io
:
4.5.4
packages/uts
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录