vite-uni-dev-tool 0.0.12 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/const.d.ts +133 -0
- package/dist/const.d.ts.map +1 -0
- package/dist/const.js +36 -0
- package/dist/core.d.ts +52 -0
- package/dist/core.d.ts.map +1 -0
- package/dist/core.js +80 -0
- package/dist/devConsole/index.d.ts +169 -0
- package/dist/devConsole/index.d.ts.map +1 -0
- package/dist/devConsole/index.js +270 -0
- package/dist/devEvent/index.d.ts +286 -0
- package/dist/devEvent/index.d.ts.map +1 -0
- package/dist/devEvent/index.js +435 -0
- package/dist/devEventBus/index.d.ts +42 -0
- package/dist/devEventBus/index.d.ts.map +1 -0
- package/dist/devEventBus/index.js +70 -0
- package/dist/devIntercept/index.d.ts +119 -0
- package/dist/devIntercept/index.d.ts.map +1 -0
- package/dist/devIntercept/index.js +582 -0
- package/dist/devRunJS/index.d.ts +67 -0
- package/dist/devRunJS/index.d.ts.map +1 -0
- package/dist/devStore/index.d.ts +178 -0
- package/dist/devStore/index.d.ts.map +1 -0
- package/dist/devStore/index.js +395 -0
- package/dist/devToolInfo/index.d.ts +17 -0
- package/dist/devToolInfo/index.d.ts.map +1 -0
- package/dist/devToolInfo/index.js +15 -0
- package/{dev → dist}/plugins/uniDevTool/uniDevTool.d.ts +7 -1
- package/dist/plugins/uniDevTool/uniDevTool.d.ts.map +1 -0
- package/dist/plugins/uniDevTool/uniDevTool.js +35 -0
- package/{dev → dist}/plugins/utils/index.d.ts +3 -0
- package/{dev → dist}/plugins/utils/index.d.ts.map +1 -1
- package/dist/plugins/utils/index.js +1 -0
- package/dist/type.d.ts +264 -0
- package/dist/type.d.ts.map +1 -0
- package/dist/utils/array.d.ts +2 -0
- package/dist/utils/array.d.ts.map +1 -0
- package/dist/utils/array.js +12 -0
- package/dist/utils/date.d.ts +19 -0
- package/dist/utils/date.d.ts.map +1 -0
- package/dist/utils/date.js +40 -0
- package/dist/utils/file.d.ts +11 -0
- package/dist/utils/file.d.ts.map +1 -0
- package/dist/utils/file.js +87 -0
- package/dist/utils/function.d.ts +28 -0
- package/dist/utils/function.d.ts.map +1 -0
- package/dist/utils/function.js +46 -0
- package/dist/utils/index.d.ts +11 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +55 -0
- package/dist/utils/ip.d.ts +5 -0
- package/dist/utils/ip.d.ts.map +1 -0
- package/dist/utils/ip.js +21 -0
- package/dist/utils/language.d.ts +29 -0
- package/dist/utils/language.d.ts.map +1 -0
- package/dist/utils/language.js +50 -0
- package/dist/utils/object.d.ts +49 -0
- package/dist/utils/object.d.ts.map +1 -0
- package/dist/utils/object.js +118 -0
- package/dist/utils/page.d.ts +7 -0
- package/dist/utils/page.d.ts.map +1 -0
- package/dist/utils/page.js +7 -0
- package/dist/utils/platform.d.ts +4 -0
- package/dist/utils/platform.d.ts.map +1 -0
- package/dist/utils/platform.js +14 -0
- package/dist/utils/string.d.ts +45 -0
- package/dist/utils/string.d.ts.map +1 -0
- package/dist/utils/string.js +88 -0
- package/dist/utils/utils.d.ts +16 -0
- package/dist/utils/utils.d.ts.map +1 -0
- package/dist/v2/AppInfo/index.vue +41 -0
- package/dist/v2/AutoSizer/index.vue +189 -0
- package/dist/v2/AutoSizer/index1.vue +193 -0
- package/dist/v2/AutoSizer/utils.d.ts +5 -0
- package/dist/v2/AutoSizer/utils.d.ts.map +1 -0
- package/dist/v2/CaptureScreen/index.vue +78 -0
- package/dist/v2/CloseButton/index.vue +32 -0
- package/dist/v2/Connection/index.vue +94 -0
- package/dist/v2/ConsoleList/ConsoleItem.vue +235 -0
- package/dist/v2/ConsoleList/RunJSInput.vue +243 -0
- package/dist/v2/ConsoleList/index.vue +164 -0
- package/dist/v2/ConsoleList/staticTips.js +1144 -0
- package/dist/v2/DevTool/index.vue +162 -0
- package/dist/v2/DevToolButton/index.vue +228 -0
- package/dist/v2/DevToolTitle/index.vue +28 -0
- package/dist/v2/DevToolWindow/index.vue +1051 -0
- package/dist/v2/DeviceInfo/index.vue +48 -0
- package/dist/v2/Empty/index.vue +40 -0
- package/dist/v2/FilterInput/index.vue +100 -0
- package/dist/v2/JsonPretty/components/Brackets/index.vue +30 -0
- package/dist/v2/JsonPretty/components/Carets/index.vue +65 -0
- package/dist/v2/JsonPretty/components/CheckController/index.vue +127 -0
- package/dist/v2/JsonPretty/components/TreeNode/index.vue +417 -0
- package/dist/v2/JsonPretty/hooks/useClipboard.d.ts +4 -0
- package/dist/v2/JsonPretty/hooks/useClipboard.d.ts.map +1 -0
- package/dist/v2/JsonPretty/hooks/useError.d.ts +8 -0
- package/dist/v2/JsonPretty/hooks/useError.d.ts.map +1 -0
- package/dist/v2/JsonPretty/index.vue +531 -0
- package/dist/v2/JsonPretty/type.d.ts +93 -0
- package/dist/v2/JsonPretty/type.d.ts.map +1 -0
- package/dist/v2/JsonPretty/utils/index.js +211 -0
- package/dist/v2/NetworkList/NetworkDetail.vue +215 -0
- package/dist/v2/NetworkList/NetworkItem.vue +135 -0
- package/dist/v2/NetworkList/index.vue +148 -0
- package/dist/v2/PiniaList/index.vue +79 -0
- package/dist/v2/RouteList/index.vue +137 -0
- package/dist/v2/SettingList/index.vue +318 -0
- package/dist/v2/SourceCode/index.vue +237 -0
- package/dist/v2/StorageList/index.vue +165 -0
- package/dist/v2/SystemInfo/index.vue +49 -0
- package/dist/v2/Tabs/index.vue +127 -0
- package/dist/v2/Tag/index.vue +91 -0
- package/dist/v2/UniEvent/UniEventItem.vue +157 -0
- package/dist/v2/UniEvent/index.vue +127 -0
- package/dist/v2/UploadList/UploadDetail.vue +204 -0
- package/dist/v2/UploadList/UploadItem.vue +134 -0
- package/dist/v2/UploadList/index.vue +143 -0
- package/dist/v2/VirtualList/index.vue +140 -0
- package/dist/v2/VirtualListPro/AutoSize.vue +50 -0
- package/dist/v2/VirtualListPro/index.vue +255 -0
- package/dist/v2/VuexList/index.vue +80 -0
- package/dist/v2/WebSocket/WebSocketItem.vue +129 -0
- package/dist/v2/WebSocket/WebSocketList.vue +183 -0
- package/dist/v2/WebSocket/index.vue +155 -0
- package/dist/v2/WindowInfo/index.vue +49 -0
- package/{dev/components → dist/v3}/AppInfo/index.vue +0 -1
- package/dist/v3/AutoSizer/utils.d.ts +5 -0
- package/dist/v3/AutoSizer/utils.d.ts.map +1 -0
- package/dist/v3/AutoSizer/utils.ts +49 -0
- package/{dev/components → dist/v3}/CloseButton/index.vue +5 -2
- package/{dev/components → dist/v3}/ConsoleList/ConsoleItem.vue +10 -9
- package/{dev/components → dist/v3}/ConsoleList/RunJSInput.vue +5 -2
- package/dist/v3/ConsoleList/staticTips.d.ts +13 -0
- package/dist/v3/ConsoleList/staticTips.d.ts.map +1 -0
- package/{dev/components → dist/v3}/DevTool/index.vue +33 -4
- package/{dev/components → dist/v3}/DevToolWindow/index.vue +67 -4
- package/dist/v3/Empty/empty.png +0 -0
- package/{dev/components → dist/v3}/FilterInput/index.vue +5 -4
- package/dist/v3/JsonPretty/hooks/useClipboard.d.ts +4 -0
- package/dist/v3/JsonPretty/hooks/useClipboard.d.ts.map +1 -0
- package/dist/v3/JsonPretty/hooks/useClipboard.ts +21 -0
- package/dist/v3/JsonPretty/hooks/useError.d.ts +8 -0
- package/dist/v3/JsonPretty/hooks/useError.d.ts.map +1 -0
- package/dist/v3/JsonPretty/hooks/useError.ts +21 -0
- package/{dev/components → dist/v3}/JsonPretty/index.vue +10 -10
- package/dist/v3/JsonPretty/type.d.ts +93 -0
- package/dist/v3/JsonPretty/type.d.ts.map +1 -0
- package/dist/v3/JsonPretty/type.ts +125 -0
- package/dist/v3/JsonPretty/utils/index.d.ts +10 -0
- package/dist/v3/JsonPretty/utils/index.d.ts.map +1 -0
- package/{dev/components → dist/v3}/NetworkList/NetworkDetail.vue +2 -2
- package/{dev/components → dist/v3}/NetworkList/NetworkItem.vue +2 -1
- package/dist/v3/RunJS/index.vue +128 -0
- package/{dev/components → dist/v3}/SettingList/index.vue +128 -37
- package/{dev/components → dist/v3}/SourceCode/index.vue +2 -2
- package/{dev/components → dist/v3}/Tag/index.vue +4 -4
- package/{dev/components → dist/v3}/UploadList/UploadDetail.vue +3 -15
- package/{dev/components → dist/v3}/UploadList/UploadItem.vue +1 -1
- package/dist/v3/VirtualListPro/readme.md +40 -0
- package/{dev/components → dist/v3}/WebSocket/WebSocketItem.vue +1 -1
- package/{dev/components → dist/v3}/WebSocket/WebSocketList.vue +3 -15
- package/package.json +5 -5
- package/dev/components/Button/index.vue +0 -34
- package/dev/components/Checkbox/index.vue +0 -40
- package/dev/components/Code/index.vue +0 -230
- package/dev/components/ConsoleList/Code.vue +0 -227
- package/dev/const.ts +0 -164
- package/dev/core.ts +0 -118
- package/dev/devConsole/index.ts +0 -350
- package/dev/devEvent/index.ts +0 -810
- package/dev/devEventBus/index.ts +0 -94
- package/dev/devIntercept/index.ts +0 -745
- package/dev/devRunJS/index.ts +0 -170
- package/dev/devStore/index.ts +0 -732
- package/dev/devToolInfo/index.ts +0 -26
- package/dev/plugins/uniDevTool/uniDevTool.d.ts.map +0 -1
- package/dev/plugins/uniDevTool/uniDevTool.js +0 -36
- package/dev/plugins/utils/index.js +0 -1
- package/dev/shims-uni.d.ts +0 -43
- package/dev/type.ts +0 -291
- package/dev/utils/array.ts +0 -15
- package/dev/utils/date.ts +0 -75
- package/dev/utils/file.ts +0 -121
- package/dev/utils/function.ts +0 -192
- package/dev/utils/index.d.ts +0 -6
- package/dev/utils/index.ts +0 -51
- package/dev/utils/ip.ts +0 -79
- package/dev/utils/language.ts +0 -77
- package/dev/utils/object.ts +0 -306
- package/dev/utils/page.ts +0 -13
- package/dev/utils/platform.ts +0 -14
- package/dev/utils/string.ts +0 -133
- package/dev/utils/utils.ts +0 -198
- /package/{dev → dist}/index.d.ts +0 -0
- /package/{dev → dist}/index.d.ts.map +0 -0
- /package/{dev → dist}/index.js +0 -0
- /package/{dev → dist}/plugins/uniGlobalComponents/uniGlobalComponents.d.ts +0 -0
- /package/{dev → dist}/plugins/uniGlobalComponents/uniGlobalComponents.d.ts.map +0 -0
- /package/{dev → dist}/plugins/uniGlobalComponents/uniGlobalComponents.js +0 -0
- /package/{dev/components → dist/v2}/AutoSizer/utils.ts +0 -0
- /package/{dev/components → dist/v2}/Empty/empty.png +0 -0
- /package/{dev/components → dist/v2}/JsonPretty/hooks/useClipboard.ts +0 -0
- /package/{dev/components → dist/v2}/JsonPretty/hooks/useError.ts +0 -0
- /package/{dev/components → dist/v2}/JsonPretty/type.ts +0 -0
- /package/{dev/components → dist/v2}/RunJS/index.vue +0 -0
- /package/{dev/components → dist/v2}/VirtualListPro/readme.md +0 -0
- /package/{dev/components → dist/v3}/AutoSizer/index.vue +0 -0
- /package/{dev/components → dist/v3}/AutoSizer/index1.vue +0 -0
- /package/{dev/components → dist/v3}/CaptureScreen/index.vue +0 -0
- /package/{dev/components → dist/v3}/Connection/index.vue +0 -0
- /package/{dev/components → dist/v3}/ConsoleList/index.vue +0 -0
- /package/{dev/components → dist/v3}/ConsoleList/staticTips.ts +0 -0
- /package/{dev/components → dist/v3}/DevToolButton/index.vue +0 -0
- /package/{dev/components → dist/v3}/DevToolTitle/index.vue +0 -0
- /package/{dev/components → dist/v3}/DeviceInfo/index.vue +0 -0
- /package/{dev/components → dist/v3}/Empty/index.vue +0 -0
- /package/{dev/components → dist/v3}/JsonPretty/components/Brackets/index.vue +0 -0
- /package/{dev/components → dist/v3}/JsonPretty/components/Carets/index.vue +0 -0
- /package/{dev/components → dist/v3}/JsonPretty/components/CheckController/index.vue +0 -0
- /package/{dev/components → dist/v3}/JsonPretty/components/TreeNode/index.vue +0 -0
- /package/{dev/components → dist/v3}/JsonPretty/utils/index.ts +0 -0
- /package/{dev/components → dist/v3}/NetworkList/index.vue +0 -0
- /package/{dev/components → dist/v3}/PiniaList/index.vue +0 -0
- /package/{dev/components → dist/v3}/RouteList/index.vue +0 -0
- /package/{dev/components → dist/v3}/StorageList/index.vue +0 -0
- /package/{dev/components → dist/v3}/SystemInfo/index.vue +0 -0
- /package/{dev/components → dist/v3}/Tabs/index.vue +0 -0
- /package/{dev/components → dist/v3}/UniEvent/UniEventItem.vue +0 -0
- /package/{dev/components → dist/v3}/UniEvent/index.vue +0 -0
- /package/{dev/components → dist/v3}/UploadList/index.vue +0 -0
- /package/{dev/components → dist/v3}/VirtualList/index.vue +0 -0
- /package/{dev/components → dist/v3}/VirtualListPro/AutoSize.vue +0 -0
- /package/{dev/components → dist/v3}/VirtualListPro/index.vue +0 -0
- /package/{dev/components → dist/v3}/VuexList/index.vue +0 -0
- /package/{dev/components → dist/v3}/WebSocket/index.vue +0 -0
- /package/{dev/components → dist/v3}/WindowInfo/index.vue +0 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="pinia-content">
|
|
3
|
+
<JsonPretty
|
|
4
|
+
:data="piniaList"
|
|
5
|
+
showLength
|
|
6
|
+
editable
|
|
7
|
+
v-if="showJson"
|
|
8
|
+
@update:data="onUpdateData"
|
|
9
|
+
@nodeClick="onNodeClick"
|
|
10
|
+
/>
|
|
11
|
+
<Empty v-else />
|
|
12
|
+
</view>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
import JsonPretty from '../JsonPretty/index.vue';
|
|
17
|
+
import Empty from '../Empty/index.vue';
|
|
18
|
+
import { getValueByPath } from '../../utils';
|
|
19
|
+
|
|
20
|
+
export default {
|
|
21
|
+
components: {
|
|
22
|
+
JsonPretty,
|
|
23
|
+
Empty,
|
|
24
|
+
},
|
|
25
|
+
props: {
|
|
26
|
+
piniaList: {
|
|
27
|
+
type: Object,
|
|
28
|
+
default: () => ({}),
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
data() {
|
|
32
|
+
return {
|
|
33
|
+
currentSelect: null,
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
computed: {
|
|
37
|
+
showJson() {
|
|
38
|
+
try {
|
|
39
|
+
const str = JSON.stringify(this.piniaList);
|
|
40
|
+
if (
|
|
41
|
+
typeof this.piniaList === 'object' &&
|
|
42
|
+
(str === '' || str === '{}')
|
|
43
|
+
) {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
return true;
|
|
47
|
+
} catch (error) {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
methods: {
|
|
53
|
+
onUpdateData(data) {
|
|
54
|
+
try {
|
|
55
|
+
const keys = this.currentSelect?.path?.slice(5);
|
|
56
|
+
if (!keys) return;
|
|
57
|
+
const newData = getValueByPath(data, keys);
|
|
58
|
+
|
|
59
|
+
this.$emit('update:piniaList', data);
|
|
60
|
+
this.$emit('diffValue', {
|
|
61
|
+
[keys]: newData,
|
|
62
|
+
});
|
|
63
|
+
} catch (error) {
|
|
64
|
+
console.log('error: ', error);
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
onNodeClick(node) {
|
|
68
|
+
this.currentSelect = node;
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
</script>
|
|
73
|
+
|
|
74
|
+
<style scoped>
|
|
75
|
+
.pinia-content {
|
|
76
|
+
padding: 16px;
|
|
77
|
+
font-size: var(--dev-tool-base-font-size);
|
|
78
|
+
}
|
|
79
|
+
</style>
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="route-content">
|
|
3
|
+
<view class="route-control">
|
|
4
|
+
<FilterInput
|
|
5
|
+
style="width: 100%"
|
|
6
|
+
placeholder="搜索name/path"
|
|
7
|
+
:modelValue="modelValue"
|
|
8
|
+
@search="$emit('search', $event)"
|
|
9
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
10
|
+
/>
|
|
11
|
+
<Tag mode="clear" @click="onRefresh">刷新</Tag>
|
|
12
|
+
</view>
|
|
13
|
+
|
|
14
|
+
<VirtualListPro
|
|
15
|
+
:dataSource="routeList"
|
|
16
|
+
:pageSize="15"
|
|
17
|
+
:height="height"
|
|
18
|
+
className="route-list"
|
|
19
|
+
>
|
|
20
|
+
<template v-slot="{ list, start }">
|
|
21
|
+
<AutoSize
|
|
22
|
+
v-for="(item, index) in list"
|
|
23
|
+
:index="start + index"
|
|
24
|
+
:key="start + index"
|
|
25
|
+
>
|
|
26
|
+
<view class="route-item">
|
|
27
|
+
<view class="route-item-name">
|
|
28
|
+
<view v-html="item.name" />
|
|
29
|
+
<Tag v-if="item.type" mode="info">{{ item.type }}</Tag>
|
|
30
|
+
<Tag mode="warn" v-if="item.index === 4 || item.index === 3">
|
|
31
|
+
当前页
|
|
32
|
+
</Tag>
|
|
33
|
+
<Tag mode="primary" v-if="item.index === 4 || item.index === 2">
|
|
34
|
+
启动页
|
|
35
|
+
</Tag>
|
|
36
|
+
</view>
|
|
37
|
+
<view class="route-item-path">
|
|
38
|
+
<view v-html="item.path" />
|
|
39
|
+
<Tag mode="main" @click="onGoTo(item)">跳转</Tag>
|
|
40
|
+
</view>
|
|
41
|
+
</view>
|
|
42
|
+
</AutoSize>
|
|
43
|
+
<Empty v-if="!routeList || routeList.length === 0" />
|
|
44
|
+
</template>
|
|
45
|
+
</VirtualListPro>
|
|
46
|
+
</view>
|
|
47
|
+
</template>
|
|
48
|
+
|
|
49
|
+
<script>
|
|
50
|
+
import Tag from '../Tag/index.vue';
|
|
51
|
+
import Empty from '../Empty/index.vue';
|
|
52
|
+
import FilterInput from '../FilterInput/index.vue';
|
|
53
|
+
import VirtualListPro from '../VirtualListPro/index.vue';
|
|
54
|
+
import AutoSize from '../VirtualListPro/AutoSize.vue';
|
|
55
|
+
|
|
56
|
+
export default {
|
|
57
|
+
components: {
|
|
58
|
+
Tag,
|
|
59
|
+
Empty,
|
|
60
|
+
FilterInput,
|
|
61
|
+
VirtualListPro,
|
|
62
|
+
AutoSize,
|
|
63
|
+
},
|
|
64
|
+
props: {
|
|
65
|
+
routeList: {
|
|
66
|
+
type: Array,
|
|
67
|
+
default: () => [],
|
|
68
|
+
},
|
|
69
|
+
modelValue: {
|
|
70
|
+
type: String,
|
|
71
|
+
default: '',
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
data() {
|
|
75
|
+
return {
|
|
76
|
+
height: 0,
|
|
77
|
+
};
|
|
78
|
+
},
|
|
79
|
+
mounted() {
|
|
80
|
+
const { windowHeight } = uni.getWindowInfo();
|
|
81
|
+
this.height = windowHeight - 32 - 32;
|
|
82
|
+
},
|
|
83
|
+
methods: {
|
|
84
|
+
onGoTo(page) {
|
|
85
|
+
this.$emit('goTo', page);
|
|
86
|
+
},
|
|
87
|
+
onRefresh() {
|
|
88
|
+
this.$emit('routeRefresh');
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
</script>
|
|
93
|
+
|
|
94
|
+
<style scoped>
|
|
95
|
+
.route-content {
|
|
96
|
+
height: 100%;
|
|
97
|
+
font-size: var(--dev-tool-base-font-size);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.route-control {
|
|
101
|
+
display: flex;
|
|
102
|
+
align-items: center;
|
|
103
|
+
justify-content: flex-end;
|
|
104
|
+
gap: 8px;
|
|
105
|
+
padding: 0 16px;
|
|
106
|
+
height: 32px;
|
|
107
|
+
border-bottom: 1px solid var(--dev-tool-border-color);
|
|
108
|
+
box-sizing: border-box;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.route-list {
|
|
112
|
+
height: calc(100% - 32px);
|
|
113
|
+
overflow: auto;
|
|
114
|
+
}
|
|
115
|
+
.route-content .route-item {
|
|
116
|
+
padding: 16px;
|
|
117
|
+
border-bottom: 1px solid var(--dev-tool-border-color);
|
|
118
|
+
}
|
|
119
|
+
.route-content .route-item .route-item-name {
|
|
120
|
+
display: flex;
|
|
121
|
+
align-items: center;
|
|
122
|
+
margin-bottom: 8px;
|
|
123
|
+
gap: 12px;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.route-content .route-item .route-item-path {
|
|
127
|
+
display: flex;
|
|
128
|
+
align-items: center;
|
|
129
|
+
justify-content: space-between;
|
|
130
|
+
word-break: break-all;
|
|
131
|
+
}
|
|
132
|
+
/* #ifdef APP-PLUS */
|
|
133
|
+
.route-content .route-item .route-item-path :deep(.tag) {
|
|
134
|
+
margin-left: 16px;
|
|
135
|
+
}
|
|
136
|
+
/* #endif */
|
|
137
|
+
</style>
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="setting-content">
|
|
3
|
+
<view class="setting-item">
|
|
4
|
+
<DevToolTitle>DevTool(v0.0.12-vue2)</DevToolTitle>
|
|
5
|
+
<view class="setting-item-content">
|
|
6
|
+
<view class="setting-row">
|
|
7
|
+
<view>显示调试按钮:</view>
|
|
8
|
+
<checkbox
|
|
9
|
+
:checked="devToolVisible"
|
|
10
|
+
color="#9254de"
|
|
11
|
+
style="transform: scale(0.8)"
|
|
12
|
+
@click="onChangeShowDevButton"
|
|
13
|
+
/>
|
|
14
|
+
</view>
|
|
15
|
+
<view class="setting-tips"> 取消后将不在展示调试按钮 </view>
|
|
16
|
+
<view class="setting-row">
|
|
17
|
+
<view>重启调试器:</view>
|
|
18
|
+
</view>
|
|
19
|
+
|
|
20
|
+
<view class="setting-tips">点击后将会重启调试器</view>
|
|
21
|
+
<button class="setting-button" @click="onRestartDevTool(true)">
|
|
22
|
+
重启调试器
|
|
23
|
+
</button>
|
|
24
|
+
|
|
25
|
+
<view class="setting-row">
|
|
26
|
+
<view>销毁调试器:</view>
|
|
27
|
+
</view>
|
|
28
|
+
|
|
29
|
+
<view class="setting-tips">
|
|
30
|
+
点击后将会销毁调试器,销毁后不再接收调试信息,需要通过 createDevTool()
|
|
31
|
+
重新创建
|
|
32
|
+
</view>
|
|
33
|
+
<button class="setting-button" @click="onDestructionDevTool">
|
|
34
|
+
销毁调试器
|
|
35
|
+
</button>
|
|
36
|
+
|
|
37
|
+
<view class="setting-row">
|
|
38
|
+
<view>重启APP:</view>
|
|
39
|
+
</view>
|
|
40
|
+
<view class="setting-tips">点击后将会重启APP</view>
|
|
41
|
+
<button class="setting-button" @click="onRestartApp(true)">
|
|
42
|
+
重启APP
|
|
43
|
+
</button>
|
|
44
|
+
<view class="setting-row">
|
|
45
|
+
<view>占用存储空间:{{ sizeFormat }}</view>
|
|
46
|
+
</view>
|
|
47
|
+
<view class="setting-tips">
|
|
48
|
+
当前所有信息占用的存储空间,只会清除 Console, Network, Upload,
|
|
49
|
+
Websocket, UniEvent
|
|
50
|
+
</view>
|
|
51
|
+
<button class="setting-button" @click="onClearCache">清除缓存</button>
|
|
52
|
+
</view>
|
|
53
|
+
</view>
|
|
54
|
+
<view class="setting-item">
|
|
55
|
+
<DevToolTitle>主题</DevToolTitle>
|
|
56
|
+
<view class="setting-item-content">
|
|
57
|
+
<view class="setting-theme">
|
|
58
|
+
<view
|
|
59
|
+
class="setting-item-theme setting-theme-light"
|
|
60
|
+
:class="{
|
|
61
|
+
'setting-theme-active': theme === 'light',
|
|
62
|
+
}"
|
|
63
|
+
@click="$emit('changeTheme', 'light')"
|
|
64
|
+
></view>
|
|
65
|
+
<view
|
|
66
|
+
class="setting-item-theme setting-theme-dark"
|
|
67
|
+
:class="{
|
|
68
|
+
'setting-theme-active': theme === 'dart',
|
|
69
|
+
}"
|
|
70
|
+
@click="$emit('changeTheme', 'dart')"
|
|
71
|
+
></view>
|
|
72
|
+
</view>
|
|
73
|
+
</view>
|
|
74
|
+
</view>
|
|
75
|
+
<view class="setting-item">
|
|
76
|
+
<DevToolTitle>Log</DevToolTitle>
|
|
77
|
+
<view class="setting-item-content">
|
|
78
|
+
<view class="setting-row">
|
|
79
|
+
<view>导出当前日志信息:</view>
|
|
80
|
+
<checkbox
|
|
81
|
+
:checked="setting.exportLog"
|
|
82
|
+
color="#9254de"
|
|
83
|
+
style="transform: scale(0.8)"
|
|
84
|
+
@click="setting.exportLog = !setting.exportLog"
|
|
85
|
+
/>
|
|
86
|
+
</view>
|
|
87
|
+
<view class="setting-tips">勾选后将会导出当前的Log</view>
|
|
88
|
+
<view class="setting-row">
|
|
89
|
+
<view>导出当前网络信息:</view>
|
|
90
|
+
<checkbox
|
|
91
|
+
:checked="setting.exportNetwork"
|
|
92
|
+
color="#9254de"
|
|
93
|
+
style="transform: scale(0.8)"
|
|
94
|
+
@click="setting.exportNetwork = !setting.exportNetwork"
|
|
95
|
+
/>
|
|
96
|
+
</view>
|
|
97
|
+
<view class="setting-tips">勾选后将会导出当前的Network</view>
|
|
98
|
+
<view class="setting-row">
|
|
99
|
+
<view>导出当前上传信息:</view>
|
|
100
|
+
<checkbox
|
|
101
|
+
:checked="setting.exportUpload"
|
|
102
|
+
color="#9254de"
|
|
103
|
+
style="transform: scale(0.8)"
|
|
104
|
+
@click="setting.exportUpload = !setting.exportUpload"
|
|
105
|
+
/>
|
|
106
|
+
</view>
|
|
107
|
+
<view class="setting-tips">勾选后将会导出当前的Upload</view>
|
|
108
|
+
<view class="setting-row">
|
|
109
|
+
<view>导出当前套接字信息:</view>
|
|
110
|
+
<checkbox
|
|
111
|
+
:checked="setting.exportWebsocket"
|
|
112
|
+
color="#9254de"
|
|
113
|
+
style="transform: scale(0.8)"
|
|
114
|
+
@click="setting.exportWebsocket = !setting.exportWebsocket"
|
|
115
|
+
/>
|
|
116
|
+
</view>
|
|
117
|
+
<view class="setting-tips">勾选后将会导出当前的Websocket</view>
|
|
118
|
+
<view class="setting-row">
|
|
119
|
+
<view>导出当前缓存信息:</view>
|
|
120
|
+
<checkbox
|
|
121
|
+
:checked="setting.exportStorage"
|
|
122
|
+
color="#9254de"
|
|
123
|
+
style="transform: scale(0.8)"
|
|
124
|
+
@click="setting.exportStorage = !setting.exportStorage"
|
|
125
|
+
/>
|
|
126
|
+
</view>
|
|
127
|
+
<view class="setting-tips">
|
|
128
|
+
勾选后将会导出当前的Storage, Vuex, Pinia
|
|
129
|
+
</view>
|
|
130
|
+
<view class="setting-row">
|
|
131
|
+
<view>导出当前窗口信息:</view>
|
|
132
|
+
<checkbox
|
|
133
|
+
:checked="setting.exportWindow"
|
|
134
|
+
color="#9254de"
|
|
135
|
+
style="transform: scale(0.8)"
|
|
136
|
+
@click="setting.exportWindow = !setting.exportWindow"
|
|
137
|
+
/>
|
|
138
|
+
</view>
|
|
139
|
+
<view class="setting-tips">勾选后将会导出当前的Window</view>
|
|
140
|
+
|
|
141
|
+
<view class="setting-row">
|
|
142
|
+
<view>导出当前设备信息:</view>
|
|
143
|
+
<checkbox
|
|
144
|
+
:checked="setting.exportDevice"
|
|
145
|
+
color="#9254de"
|
|
146
|
+
style="transform: scale(0.8)"
|
|
147
|
+
@click="setting.exportDevice = !setting.exportDevice"
|
|
148
|
+
/>
|
|
149
|
+
</view>
|
|
150
|
+
<view class="setting-tips">勾选后将会导出当前的Device</view>
|
|
151
|
+
|
|
152
|
+
<view class="setting-row">
|
|
153
|
+
<view>导出当前系统信息:</view>
|
|
154
|
+
<checkbox
|
|
155
|
+
:checked="setting.exportSystem"
|
|
156
|
+
color="#9254de"
|
|
157
|
+
style="transform: scale(0.8)"
|
|
158
|
+
@click="setting.exportSystem = !setting.exportSystem"
|
|
159
|
+
/>
|
|
160
|
+
</view>
|
|
161
|
+
<view class="setting-tips">勾选后将会导出当前的System</view>
|
|
162
|
+
|
|
163
|
+
<button class="setting-button" @click="onExportLog">导出</button>
|
|
164
|
+
</view>
|
|
165
|
+
</view>
|
|
166
|
+
</view>
|
|
167
|
+
</template>
|
|
168
|
+
|
|
169
|
+
<script>
|
|
170
|
+
import DevToolTitle from '../DevToolTitle/index.vue';
|
|
171
|
+
|
|
172
|
+
export default {
|
|
173
|
+
components: {
|
|
174
|
+
DevToolTitle,
|
|
175
|
+
},
|
|
176
|
+
emits: [
|
|
177
|
+
'showDevButton',
|
|
178
|
+
'restartDevTool',
|
|
179
|
+
'restartApp',
|
|
180
|
+
'exportLog',
|
|
181
|
+
'screenshot',
|
|
182
|
+
'clearCache',
|
|
183
|
+
'destroyDevTool',
|
|
184
|
+
'changeTheme',
|
|
185
|
+
],
|
|
186
|
+
props: {
|
|
187
|
+
devToolVisible: {
|
|
188
|
+
type: Boolean,
|
|
189
|
+
default: true,
|
|
190
|
+
},
|
|
191
|
+
sizeFormat: {
|
|
192
|
+
type: String,
|
|
193
|
+
default: '',
|
|
194
|
+
},
|
|
195
|
+
theme: {
|
|
196
|
+
type: String,
|
|
197
|
+
default: 'light',
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
data() {
|
|
201
|
+
return {
|
|
202
|
+
setting: {
|
|
203
|
+
restartDevTool: false,
|
|
204
|
+
restartApp: false,
|
|
205
|
+
exportLog: false,
|
|
206
|
+
exportNetwork: false,
|
|
207
|
+
exportUpload: false,
|
|
208
|
+
exportStorage: false,
|
|
209
|
+
exportWebsocket: false,
|
|
210
|
+
exportWindow: false,
|
|
211
|
+
exportDevice: false,
|
|
212
|
+
exportSystem: false,
|
|
213
|
+
},
|
|
214
|
+
};
|
|
215
|
+
},
|
|
216
|
+
methods: {
|
|
217
|
+
onChangeShowDevButton() {
|
|
218
|
+
this.$emit('showDevButton', !this.devToolVisible);
|
|
219
|
+
},
|
|
220
|
+
onRestartDevTool(restart) {
|
|
221
|
+
if (restart) {
|
|
222
|
+
this.$emit('restartDevTool');
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
onDestructionDevTool() {
|
|
226
|
+
this.$emit('destroyDevTool');
|
|
227
|
+
},
|
|
228
|
+
onRestartApp(restart) {
|
|
229
|
+
if (restart) {
|
|
230
|
+
this.$emit('restartApp');
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
onExportLog() {
|
|
234
|
+
this.$emit('exportLog', {
|
|
235
|
+
exportLog: this.setting.exportLog,
|
|
236
|
+
exportNetwork: this.setting.exportNetwork,
|
|
237
|
+
exportStorage: this.setting.exportStorage,
|
|
238
|
+
exportWebsocket: this.setting.exportWebsocket,
|
|
239
|
+
exportUpload: this.setting.exportUpload,
|
|
240
|
+
exportWindow: this.setting.exportWindow,
|
|
241
|
+
exportDevice: this.setting.exportDevice,
|
|
242
|
+
exportSystem: this.setting.exportSystem,
|
|
243
|
+
});
|
|
244
|
+
},
|
|
245
|
+
onScreenshot() {
|
|
246
|
+
this.$emit('screenshot');
|
|
247
|
+
},
|
|
248
|
+
onClearCache() {
|
|
249
|
+
this.$emit('clearCache');
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
};
|
|
253
|
+
</script>
|
|
254
|
+
<style scoped>
|
|
255
|
+
.setting-content {
|
|
256
|
+
height: 100%;
|
|
257
|
+
overflow: auto;
|
|
258
|
+
font-size: var(--dev-tool-base-font-size);
|
|
259
|
+
}
|
|
260
|
+
.setting-item {
|
|
261
|
+
padding: 16px 16px 0 16px;
|
|
262
|
+
box-sizing: border-box;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.setting-row {
|
|
266
|
+
display: flex;
|
|
267
|
+
align-items: center;
|
|
268
|
+
justify-content: space-between;
|
|
269
|
+
margin: 8px 0;
|
|
270
|
+
min-height: 18px;
|
|
271
|
+
}
|
|
272
|
+
.setting-tips {
|
|
273
|
+
color: #616161;
|
|
274
|
+
font-size: var(--dev-tool-tips-font-size);
|
|
275
|
+
margin-bottom: 8px;
|
|
276
|
+
}
|
|
277
|
+
.setting-button {
|
|
278
|
+
display: flex;
|
|
279
|
+
align-items: center;
|
|
280
|
+
justify-content: center;
|
|
281
|
+
width: 100%;
|
|
282
|
+
height: 32px;
|
|
283
|
+
border-radius: 4px;
|
|
284
|
+
color: #fff;
|
|
285
|
+
outline: none;
|
|
286
|
+
border: 1px solid transparent;
|
|
287
|
+
background-color: var(--dev-tool-main-color);
|
|
288
|
+
transform: all 0.3s;
|
|
289
|
+
font-size: var(--dev-tool-base-font-size);
|
|
290
|
+
padding: 0;
|
|
291
|
+
cursor: pointer;
|
|
292
|
+
}
|
|
293
|
+
.setting-theme {
|
|
294
|
+
display: flex;
|
|
295
|
+
align-items: center;
|
|
296
|
+
gap: 16px;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.setting-item-theme {
|
|
300
|
+
margin-top: 16px;
|
|
301
|
+
width: 30px;
|
|
302
|
+
height: 30px;
|
|
303
|
+
|
|
304
|
+
border-radius: 4px;
|
|
305
|
+
border: 1px solid #fff;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.setting-theme-light {
|
|
309
|
+
background-color: #fff;
|
|
310
|
+
}
|
|
311
|
+
.setting-theme-dark {
|
|
312
|
+
background-color: rgba(0, 0, 0, 0.8);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.setting-theme-active {
|
|
316
|
+
border: 1px solid var(--dev-tool-main-color);
|
|
317
|
+
}
|
|
318
|
+
</style>
|