vite-uni-dev-tool 0.0.48 → 1.0.0
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/README.md +20 -0
- package/dist/const.cjs +1 -0
- package/dist/const.d.ts +78 -161
- package/dist/const.d.ts.map +1 -1
- package/dist/const.js +1 -47
- package/dist/core-shared.d.ts +44 -0
- package/dist/core-shared.d.ts.map +1 -0
- package/dist/core-shared.js +1 -0
- package/dist/core.d.ts +2 -40
- package/dist/core.d.ts.map +1 -1
- package/dist/core.js +4 -159
- package/dist/i18n/index.cjs +1 -0
- package/dist/i18n/index.d.ts +9 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +1 -0
- package/dist/i18n/instance.cjs +1 -0
- package/dist/i18n/instance.d.ts +15 -0
- package/dist/i18n/instance.d.ts.map +1 -0
- package/dist/i18n/instance.js +1 -0
- package/dist/i18n/locales/en.cjs +1 -0
- package/dist/i18n/locales/en.d.ts +470 -0
- package/dist/i18n/locales/en.d.ts.map +1 -0
- package/dist/i18n/locales/en.js +1 -0
- package/dist/i18n/locales/zh-Hans.cjs +1 -0
- package/dist/i18n/locales/zh-Hans.d.ts +476 -0
- package/dist/i18n/locales/zh-Hans.d.ts.map +1 -0
- package/dist/i18n/locales/zh-Hans.js +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/modules/devConsole/index.cjs +4 -0
- package/dist/{devConsole → modules/devConsole}/index.d.ts +1 -1
- package/dist/modules/devConsole/index.d.ts.map +1 -0
- package/dist/modules/devConsole/index.js +4 -0
- package/dist/modules/devEvent/index.cjs +5 -0
- package/dist/modules/devEvent/index.d.ts +115 -0
- package/dist/modules/devEvent/index.d.ts.map +1 -0
- package/dist/modules/devEvent/index.js +5 -0
- package/dist/modules/devIntercept/index.cjs +13 -0
- package/dist/modules/devIntercept/index.d.ts +71 -0
- package/dist/modules/devIntercept/index.d.ts.map +1 -0
- package/dist/modules/devIntercept/index.js +13 -0
- package/dist/modules/devStore/index.cjs +1 -0
- package/dist/modules/devStore/index.d.ts +159 -0
- package/dist/modules/devStore/index.d.ts.map +1 -0
- package/dist/modules/devStore/index.js +1 -0
- package/dist/modules/devToolInfo/index.cjs +1 -0
- package/dist/modules/devToolInfo/index.d.ts +27 -0
- package/dist/modules/devToolInfo/index.d.ts.map +1 -0
- package/dist/modules/devToolInfo/index.js +1 -0
- package/dist/plugins/uniDevTool/transform/transformApp.cjs +44 -0
- package/dist/plugins/uniDevTool/transform/transformApp.d.ts.map +1 -1
- package/dist/plugins/uniDevTool/transform/transformApp.js +17 -17
- package/dist/plugins/uniDevTool/transform/transformMain.cjs +3 -0
- package/dist/plugins/uniDevTool/transform/transformMain.d.ts.map +1 -1
- package/dist/plugins/uniDevTool/transform/transformMain.js +3 -3
- package/dist/plugins/uniDevTool/transform/transformVue.cjs +41 -0
- package/dist/plugins/uniDevTool/transform/transformVue.d.ts +1 -2
- package/dist/plugins/uniDevTool/transform/transformVue.d.ts.map +1 -1
- package/dist/plugins/uniDevTool/transform/transformVue.js +32 -19
- package/dist/plugins/uniDevTool/uniDevTool.cjs +5 -0
- package/dist/plugins/uniDevTool/uniDevTool.d.ts +3 -11
- package/dist/plugins/uniDevTool/uniDevTool.d.ts.map +1 -1
- package/dist/plugins/uniDevTool/uniDevTool.js +3 -3
- package/dist/plugins/uniGlobalComponents/uniGlobalComponents.cjs +19 -0
- package/dist/plugins/uniGlobalComponents/uniGlobalComponents.d.ts.map +1 -1
- package/dist/plugins/uniGlobalComponents/uniGlobalComponents.js +11 -19
- package/dist/plugins/uniParseStock/index.d.ts +10 -0
- package/dist/plugins/uniParseStock/index.d.ts.map +1 -0
- package/dist/plugins/utils/index.cjs +2 -0
- package/dist/plugins/utils/index.d.ts +1 -3
- package/dist/plugins/utils/index.d.ts.map +1 -1
- package/dist/plugins/utils/index.js +2 -2
- package/dist/shims-uni.d.ts +140 -0
- package/dist/type.d.ts +174 -16
- package/dist/type.d.ts.map +1 -1
- package/dist/utils/array.cjs +1 -0
- package/dist/utils/array.d.ts.map +1 -1
- package/dist/utils/array.js +1 -12
- package/dist/utils/date.cjs +1 -0
- package/dist/utils/date.d.ts.map +1 -1
- package/dist/utils/date.js +1 -59
- package/dist/utils/file.cjs +1 -0
- package/dist/utils/file.d.ts.map +1 -1
- package/dist/utils/file.js +1 -85
- package/dist/utils/function.cjs +1 -0
- package/dist/utils/function.d.ts +13 -0
- package/dist/utils/function.d.ts.map +1 -1
- package/dist/utils/function.js +1 -68
- package/dist/utils/index.cjs +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -63
- package/dist/utils/ip.cjs +1 -0
- package/dist/utils/ip.d.ts +1 -1
- package/dist/utils/ip.d.ts.map +1 -1
- package/dist/utils/ip.js +1 -45
- package/dist/utils/language.cjs +1 -0
- package/dist/utils/language.d.ts +2 -1
- package/dist/utils/language.d.ts.map +1 -1
- package/dist/utils/language.js +1 -63
- package/dist/utils/object.cjs +1 -0
- package/dist/utils/object.d.ts +4 -5
- package/dist/utils/object.d.ts.map +1 -1
- package/dist/utils/object.js +1 -136
- package/dist/utils/openLink.cjs +1 -0
- package/dist/utils/openLink.d.ts.map +1 -1
- package/dist/utils/openLink.js +1 -28
- package/dist/utils/page.cjs +1 -0
- package/dist/utils/page.d.ts.map +1 -1
- package/dist/utils/page.js +1 -7
- package/dist/utils/platform.cjs +1 -0
- package/dist/utils/platform.d.ts.map +1 -1
- package/dist/utils/platform.js +1 -17
- package/dist/utils/string.cjs +1 -0
- package/dist/utils/string.d.ts.map +1 -1
- package/dist/utils/string.js +1 -114
- package/dist/utils/utils.cjs +1 -0
- package/dist/utils/utils.d.ts +1 -1
- package/dist/utils/utils.d.ts.map +1 -1
- package/dist/utils/utils.js +1 -126
- package/dist/v3/AppTransition/index.vue +170 -0
- package/dist/v3/AutoSizer/index.vue +4 -5
- package/dist/v3/AutoSizer/index1.vue +4 -6
- package/dist/v3/AutoSizer/utils.ts +1 -1
- package/dist/v3/CaptureScreen/index.vue +19 -8
- package/dist/v3/CircularButton/index.vue +64 -13
- package/dist/v3/ConsoleList/ConsoleItem.vue +56 -5
- package/dist/v3/ConsoleList/RunJSInput.vue +10 -6
- package/dist/v3/ConsoleList/index.vue +51 -35
- package/dist/v3/CustomSwiper/CustomSwiperItem.vue +49 -0
- package/dist/v3/CustomSwiper/index.vue +104 -0
- package/dist/v3/DevTool/fps-collector.render.ts +148 -0
- package/dist/v3/DevTool/index.vue +209 -102
- package/dist/v3/DevToolButton/index.vue +40 -59
- package/dist/v3/DevToolTitle/index.vue +4 -1
- package/dist/v3/DevToolWindow/DevToolOverlay.vue +182 -0
- package/dist/v3/DevToolWindow/const.ts +47 -69
- package/dist/v3/DevToolWindow/hooks/dataUtils.ts +48 -0
- package/dist/v3/DevToolWindow/hooks/useDevToolData.ts +338 -0
- package/dist/v3/DevToolWindow/hooks/useDevToolHandlers.ts +549 -0
- package/dist/v3/DevToolWindow/hooks/useDevToolOverlay.ts +184 -0
- package/dist/v3/DevToolWindow/index.css +89 -0
- package/dist/v3/DevToolWindow/index.vue +800 -1450
- package/dist/v3/DraggableContainer/index.vue +456 -0
- package/dist/v3/ElEvent/ElEventItem.vue +4 -3
- package/dist/v3/ElEvent/index.vue +26 -9
- package/dist/v3/Empty/index.vue +1 -0
- package/dist/v3/FilterInput/index.vue +8 -22
- package/dist/v3/FilterSelect/index.vue +37 -24
- package/dist/v3/Instance/components/InstanceTreeNode.vue +265 -0
- package/dist/v3/Instance/flatten.ts +226 -0
- package/dist/v3/Instance/index.vue +94 -0
- package/dist/v3/Instance/registry.ts +49 -0
- package/dist/v3/Instance/transformTree.ts +375 -0
- package/dist/v3/Instance/transformTreeCtx.ts +268 -0
- package/dist/v3/{InstanceTree → Instance}/typing.d.ts +15 -2
- package/dist/v3/InstanceDetail/index.vue +433 -44
- package/dist/v3/JsonDetail/index.vue +12 -8
- package/dist/v3/JsonPretty/components/Brackets/index.vue +1 -0
- package/dist/v3/JsonPretty/components/Carets/index.vue +2 -1
- package/dist/v3/JsonPretty/components/CheckController/index.vue +26 -15
- package/dist/v3/JsonPretty/components/TreeNode/index.vue +42 -20
- package/dist/v3/JsonPretty/index.vue +60 -37
- package/dist/v3/JsonPretty/utils/index.ts +41 -44
- package/dist/v3/MovableContainer/index.vue +89 -0
- package/dist/v3/NFCList/NFCItem.vue +14 -14
- package/dist/v3/NFCList/NFCTool.vue +99 -81
- package/dist/v3/NFCList/index.vue +14 -10
- package/dist/v3/NetworkList/InterceptConfig.vue +154 -364
- package/dist/v3/NetworkList/InterceptItem.vue +14 -6
- package/dist/v3/NetworkList/NetworkDetail.vue +34 -29
- package/dist/v3/NetworkList/NetworkIntercept.vue +11 -8
- package/dist/v3/NetworkList/NetworkItem.vue +27 -11
- package/dist/v3/NetworkList/NetworkSend.vue +132 -290
- package/dist/v3/NetworkList/hooks/useNetworkForm.ts +86 -0
- package/dist/v3/NetworkList/index.vue +32 -24
- package/dist/v3/NetworkList/utils.ts +101 -0
- package/dist/v3/Performance/index.vue +495 -0
- package/dist/v3/Performance/modules/PerformanceMetrics.vue +153 -0
- package/dist/v3/Performance/modules/PerformanceWidget.vue +249 -0
- package/dist/v3/Performance/modules/usePerformanceChart.ts +460 -0
- package/dist/v3/Performance/modules/usePerformanceData.ts +258 -0
- package/dist/v3/Pick/index.vue +322 -0
- package/dist/v3/PiniaList/index.vue +38 -17
- package/dist/v3/RouteList/index.vue +32 -15
- package/dist/v3/RunJS/index.vue +30 -10
- package/dist/v3/ScanCodeList/ScanCodeItem.vue +2 -9
- package/dist/v3/ScanCodeList/index.vue +12 -9
- package/dist/v3/SettingButton/index.vue +45 -0
- package/dist/v3/SettingList/index.css +120 -0
- package/dist/v3/SettingList/index.vue +96 -537
- package/dist/v3/SettingList/modules/SettingDevTool.vue +208 -0
- package/dist/v3/SettingList/modules/SettingInfo.vue +119 -0
- package/dist/v3/SettingList/modules/SettingLanguage.vue +74 -0
- package/dist/v3/SettingList/modules/SettingLog.vue +230 -0
- package/dist/v3/SettingList/modules/SettingNetwork.vue +120 -0
- package/dist/v3/SettingList/modules/SettingTheme.vue +312 -0
- package/dist/v3/SourceCode/Line.vue +15 -2
- package/dist/v3/SourceCode/index.vue +25 -24
- package/dist/v3/SourceCode/parseCode.ts +114 -56
- package/dist/v3/StorageList/index.vue +33 -33
- package/dist/v3/Tabs/index.vue +31 -28
- package/dist/v3/Tag/index.vue +39 -20
- package/dist/v3/TransferList/TransferDetail.vue +268 -0
- package/dist/v3/TransferList/TransferItem.vue +125 -0
- package/dist/v3/TransferList/index.vue +181 -0
- package/dist/v3/UniEvent/UniEventItem.vue +1 -0
- package/dist/v3/UniEvent/index.vue +28 -29
- package/dist/v3/{VirtualListPro → VirtualList}/AutoSize.vue +1 -1
- package/dist/v3/VirtualList/index.vue +382 -82
- package/dist/v3/VuexList/index.vue +38 -17
- package/dist/v3/WebSocket/WebSocketDetail.vue +142 -80
- package/dist/v3/WebSocket/WebSocketItem.vue +10 -4
- package/dist/v3/WebSocket/index.vue +44 -30
- package/dist/v3/hooks/useNFC/index.ts +6 -6
- package/dist/v3/hooks/useNFC/typing.d.ts +2 -2
- package/dist/v3/hooks/useNFC/useNFCAndroid.ts +215 -626
- package/dist/v3/hooks/useNFC/useNFCMpWeiXin.ts +54 -85
- package/dist/v3/hooks/useNFC/utils.ts +3 -3
- package/dist/v3/hooks/useRequest/index.ts +2 -2
- package/dist/v3/hooks/useScanCode/index.ts +10 -8
- package/dist/v3/styles/theme.css +290 -0
- package/dist/v3/styles/theme.ts +12 -0
- package/package.json +25 -5
- package/dist/devConsole/index.d.ts.map +0 -1
- package/dist/devConsole/index.js +0 -273
- package/dist/devEvent/index.d.ts +0 -328
- package/dist/devEvent/index.d.ts.map +0 -1
- package/dist/devEvent/index.js +0 -697
- package/dist/devEventBus/index.d.ts +0 -42
- package/dist/devEventBus/index.d.ts.map +0 -1
- package/dist/devEventBus/index.js +0 -70
- package/dist/devIntercept/index.d.ts +0 -281
- package/dist/devIntercept/index.d.ts.map +0 -1
- package/dist/devIntercept/index.js +0 -949
- package/dist/devRunJS/index.d.ts +0 -67
- package/dist/devRunJS/index.d.ts.map +0 -1
- package/dist/devStore/index.d.ts +0 -199
- package/dist/devStore/index.d.ts.map +0 -1
- package/dist/devStore/index.js +0 -562
- package/dist/devToolInfo/index.d.ts +0 -17
- package/dist/devToolInfo/index.d.ts.map +0 -1
- package/dist/devToolInfo/index.js +0 -15
- package/dist/v3/AutoSizer/utils.d.ts +0 -5
- package/dist/v3/AutoSizer/utils.d.ts.map +0 -1
- package/dist/v3/ConsoleList/staticTips.d.ts +0 -13
- package/dist/v3/ConsoleList/staticTips.d.ts.map +0 -1
- package/dist/v3/DevToolWindow/const.d.ts +0 -46
- package/dist/v3/DevToolWindow/const.d.ts.map +0 -1
- package/dist/v3/InstanceTree/components/InstanceTreeNode.vue +0 -81
- package/dist/v3/InstanceTree/flatten.d.ts +0 -10
- package/dist/v3/InstanceTree/flatten.d.ts.map +0 -1
- package/dist/v3/InstanceTree/flatten.ts +0 -75
- package/dist/v3/InstanceTree/index.vue +0 -51
- package/dist/v3/InstanceTree/transformTree.d.ts +0 -17
- package/dist/v3/InstanceTree/transformTree.d.ts.map +0 -1
- package/dist/v3/InstanceTree/transformTree.ts +0 -237
- package/dist/v3/JsonPretty/hooks/useClipboard.d.ts +0 -4
- package/dist/v3/JsonPretty/hooks/useClipboard.d.ts.map +0 -1
- package/dist/v3/JsonPretty/hooks/useError.d.ts +0 -8
- package/dist/v3/JsonPretty/hooks/useError.d.ts.map +0 -1
- package/dist/v3/JsonPretty/type.d.ts +0 -94
- package/dist/v3/JsonPretty/type.d.ts.map +0 -1
- package/dist/v3/JsonPretty/utils/index.d.ts +0 -10
- package/dist/v3/JsonPretty/utils/index.d.ts.map +0 -1
- package/dist/v3/NFCList/const.d.ts +0 -13
- package/dist/v3/NFCList/const.d.ts.map +0 -1
- package/dist/v3/NetworkList/const.d.ts +0 -5
- package/dist/v3/NetworkList/const.d.ts.map +0 -1
- package/dist/v3/SourceCode/parseCode.d.ts +0 -27
- package/dist/v3/SourceCode/parseCode.d.ts.map +0 -1
- package/dist/v3/UploadList/UploadDetail.vue +0 -255
- package/dist/v3/UploadList/UploadItem.vue +0 -122
- package/dist/v3/UploadList/index.vue +0 -125
- package/dist/v3/VirtualListPro/index.vue +0 -229
- package/dist/v3/hooks/useContainerStyle.d.ts +0 -15
- package/dist/v3/hooks/useContainerStyle.d.ts.map +0 -1
- package/dist/v3/hooks/useNFC/index.d.ts +0 -5
- package/dist/v3/hooks/useNFC/index.d.ts.map +0 -1
- package/dist/v3/hooks/useNFC/useNFCAndroid.d.ts +0 -2
- package/dist/v3/hooks/useNFC/useNFCAndroid.d.ts.map +0 -1
- package/dist/v3/hooks/useNFC/useNFCMpWeiXin.d.ts +0 -2
- package/dist/v3/hooks/useNFC/useNFCMpWeiXin.d.ts.map +0 -1
- package/dist/v3/hooks/useNFC/utils.d.ts +0 -95
- package/dist/v3/hooks/useNFC/utils.d.ts.map +0 -1
- package/dist/v3/hooks/useRequest/index.d.ts +0 -126
- package/dist/v3/hooks/useRequest/index.d.ts.map +0 -1
- package/dist/v3/hooks/useRequest/utils.d.ts +0 -35
- package/dist/v3/hooks/useRequest/utils.d.ts.map +0 -1
- package/dist/v3/hooks/useScanCode/index.d.ts +0 -36
- package/dist/v3/hooks/useScanCode/index.d.ts.map +0 -1
- /package/dist/v3/{VirtualListPro → VirtualList}/readme.md +0 -0
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
|
+
<!-- eslint-disable vue/no-v-html, vue/no-v-text-v-html-on-component -->
|
|
2
3
|
<view class="route-content">
|
|
3
4
|
<view class="route-control">
|
|
5
|
+
<DevToolTitle>{{ t('route.title') }}</DevToolTitle>
|
|
4
6
|
<FilterInput
|
|
5
7
|
style="width: 100%"
|
|
6
|
-
placeholder="
|
|
8
|
+
:placeholder="t('common.searchNamePath')"
|
|
7
9
|
:modelValue="modelValue"
|
|
8
10
|
@search="emit('search', $event)"
|
|
9
11
|
@update:modelValue="emit('update:modelValue', $event)"
|
|
10
12
|
/>
|
|
11
|
-
<Tag mode="clear" @click="onRefresh"
|
|
13
|
+
<Tag mode="clear" @click="onRefresh">{{ t('common.refresh') }}</Tag>
|
|
12
14
|
</view>
|
|
13
15
|
|
|
14
|
-
<
|
|
16
|
+
<VirtualList
|
|
15
17
|
:data="routeList"
|
|
16
18
|
:pageSize="15"
|
|
17
19
|
:height="contentHeight - 32 - 32"
|
|
@@ -30,19 +32,21 @@
|
|
|
30
32
|
<view v-html="item.name" />
|
|
31
33
|
<Tag v-if="item.type" mode="info">{{ item.type }}</Tag>
|
|
32
34
|
<Tag mode="primary" v-if="item.index === 4 || item.index === 2">
|
|
33
|
-
|
|
35
|
+
{{ t('route.startPage') }}
|
|
34
36
|
</Tag>
|
|
35
37
|
<Tag mode="warn" v-if="item.index === 4 || item.index === 3">
|
|
36
|
-
|
|
38
|
+
{{ t('route.currentPage') }}
|
|
37
39
|
</Tag>
|
|
38
|
-
<view>
|
|
40
|
+
<view>
|
|
41
|
+
{{ t('route.visitTimes') }}: {{ item?.visitTimes ?? 0 }}
|
|
42
|
+
</view>
|
|
39
43
|
<Tag
|
|
40
44
|
mode="main"
|
|
41
45
|
style="margin-left: auto"
|
|
42
46
|
customStyle="margin-left: auto"
|
|
43
47
|
@click="onGoTo(item)"
|
|
44
48
|
>
|
|
45
|
-
|
|
49
|
+
{{ t('common.navigate') }}
|
|
46
50
|
</Tag>
|
|
47
51
|
</view>
|
|
48
52
|
|
|
@@ -50,7 +54,7 @@
|
|
|
50
54
|
|
|
51
55
|
<view class="route-item-info">
|
|
52
56
|
<view>
|
|
53
|
-
|
|
57
|
+
{{ t('route.lastEnterTime') }}:
|
|
54
58
|
{{
|
|
55
59
|
item.inTime
|
|
56
60
|
? formatDate(item.inTime, 'HH:mm:ss:SS')
|
|
@@ -58,7 +62,7 @@
|
|
|
58
62
|
}}
|
|
59
63
|
</view>
|
|
60
64
|
<view>
|
|
61
|
-
|
|
65
|
+
{{ t('route.lastLeaveTime') }}:
|
|
62
66
|
{{
|
|
63
67
|
item.outTime
|
|
64
68
|
? formatDate(item.outTime, 'HH:mm:ss:SS')
|
|
@@ -67,14 +71,20 @@
|
|
|
67
71
|
</view>
|
|
68
72
|
</view>
|
|
69
73
|
<view class="route-item-info">
|
|
70
|
-
<view
|
|
71
|
-
|
|
74
|
+
<view
|
|
75
|
+
>{{ t('route.lastDuration') }}:
|
|
76
|
+
{{ formatDuration(item.duration) }}</view
|
|
77
|
+
>
|
|
78
|
+
<view
|
|
79
|
+
>{{ t('route.totalDuration') }}:
|
|
80
|
+
{{ formatDuration(item.totalDuration) }}</view
|
|
81
|
+
>
|
|
72
82
|
</view>
|
|
73
83
|
</view>
|
|
74
84
|
</AutoSize>
|
|
75
85
|
<Empty v-if="!routeList || routeList.length === 0" />
|
|
76
86
|
</template>
|
|
77
|
-
</
|
|
87
|
+
</VirtualList>
|
|
78
88
|
</view>
|
|
79
89
|
</template>
|
|
80
90
|
<script lang="ts" setup>
|
|
@@ -82,9 +92,13 @@ import Tag from '../Tag/index.vue';
|
|
|
82
92
|
import Empty from '../Empty/index.vue';
|
|
83
93
|
import FilterInput from '../FilterInput/index.vue';
|
|
84
94
|
import type { DevTool } from '../../type';
|
|
85
|
-
import
|
|
86
|
-
import AutoSize from '../
|
|
95
|
+
import VirtualList from '../VirtualList/index.vue';
|
|
96
|
+
import AutoSize from '../VirtualList/AutoSize.vue';
|
|
87
97
|
import { formatDate, formatDuration } from '../../utils';
|
|
98
|
+
import DevToolTitle from '../DevToolTitle/index.vue';
|
|
99
|
+
import { useI18n } from '../../i18n';
|
|
100
|
+
|
|
101
|
+
const { t } = useI18n();
|
|
88
102
|
|
|
89
103
|
defineProps<{
|
|
90
104
|
routeList: DevTool.Page[];
|
|
@@ -117,7 +131,6 @@ function onRefresh() {
|
|
|
117
131
|
<style scoped>
|
|
118
132
|
.route-content {
|
|
119
133
|
height: 100%;
|
|
120
|
-
|
|
121
134
|
font-size: var(--dev-tool-base-font-size);
|
|
122
135
|
}
|
|
123
136
|
|
|
@@ -136,10 +149,12 @@ function onRefresh() {
|
|
|
136
149
|
height: calc(100% - 32px);
|
|
137
150
|
overflow: auto;
|
|
138
151
|
}
|
|
152
|
+
|
|
139
153
|
.route-item {
|
|
140
154
|
padding: 16px;
|
|
141
155
|
border-bottom: 1px solid var(--dev-tool-border-color);
|
|
142
156
|
}
|
|
157
|
+
|
|
143
158
|
.route-item-name {
|
|
144
159
|
display: flex;
|
|
145
160
|
align-items: center;
|
|
@@ -152,10 +167,12 @@ function onRefresh() {
|
|
|
152
167
|
word-break: break-all;
|
|
153
168
|
min-height: 24px;
|
|
154
169
|
}
|
|
170
|
+
|
|
155
171
|
/* #ifdef APP-PLUS */
|
|
156
172
|
.route-item-path :deep(.tag) {
|
|
157
173
|
margin-left: 16px;
|
|
158
174
|
}
|
|
175
|
+
|
|
159
176
|
/* #endif */
|
|
160
177
|
|
|
161
178
|
.route-item-info {
|
package/dist/v3/RunJS/index.vue
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
+
<!-- eslint-disable vue/no-v-html, vue/no-v-text-v-html-on-component -->
|
|
2
3
|
<view class="run-js">
|
|
3
4
|
<view class="run-js-control">
|
|
4
5
|
<FilterInput
|
|
5
6
|
:modelValue="modelValue"
|
|
6
7
|
placeholder="查询"
|
|
7
|
-
@search="
|
|
8
|
-
@update:modelValue="
|
|
9
|
-
|
|
10
|
-
<Tag mode="clear" @click="emit('clear')">清空</Tag>
|
|
8
|
+
@search="onSearch"
|
|
9
|
+
@update:modelValue="onUpdateModelValue" />
|
|
10
|
+
<Tag mode="clear" @click="onClear">清空</Tag>
|
|
11
11
|
</view>
|
|
12
12
|
<view class="run-js-list">
|
|
13
13
|
<view class="run-js-item" v-for="item in runJSList" :key="item.timer">
|
|
@@ -15,16 +15,19 @@
|
|
|
15
15
|
<view class="run-js-item-duration" v-if="item.mode === 'output'">
|
|
16
16
|
{{ item.duration }}ms
|
|
17
17
|
</view>
|
|
18
|
+
<!-- eslint-disable-next-line vue/no-v-html, vue/no-v-text-v-html-on-component -->
|
|
18
19
|
<view
|
|
19
20
|
class="run-js-item-content"
|
|
20
|
-
v-html="item.mode === 'input' ? item.code : item.result"
|
|
21
|
-
>
|
|
22
|
-
</view>
|
|
21
|
+
v-html="item.mode === 'input' ? item.code : item.result"></view>
|
|
23
22
|
</view>
|
|
24
23
|
<view class="run-js-item">
|
|
25
|
-
<view class="run-js-item-icon run-js-item-input"
|
|
24
|
+
<view class="run-js-item-icon run-js-item-input"></view>
|
|
26
25
|
|
|
27
|
-
<input
|
|
26
|
+
<input
|
|
27
|
+
:value="code"
|
|
28
|
+
class="run-js-input"
|
|
29
|
+
@input="onInput"
|
|
30
|
+
@confirm="onConfirm" />
|
|
28
31
|
</view>
|
|
29
32
|
</view>
|
|
30
33
|
</view>
|
|
@@ -44,6 +47,22 @@ const emit = defineEmits<{
|
|
|
44
47
|
(e: 'run', value: string): void;
|
|
45
48
|
}>();
|
|
46
49
|
const code = ref('');
|
|
50
|
+
|
|
51
|
+
function onSearch(value: string) {
|
|
52
|
+
emit('search', value);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function onUpdateModelValue(value: string) {
|
|
56
|
+
emit('update:modelValue', value);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function onClear() {
|
|
60
|
+
emit('clear');
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function onInput(e: any) {
|
|
64
|
+
code.value = e.detail.value;
|
|
65
|
+
}
|
|
47
66
|
function onConfirm() {
|
|
48
67
|
const value = code.value;
|
|
49
68
|
if (!value) return;
|
|
@@ -58,6 +77,7 @@ function onConfirm() {
|
|
|
58
77
|
height: 100%;
|
|
59
78
|
font-size: var(--dev-tool-base-font-size);
|
|
60
79
|
}
|
|
80
|
+
|
|
61
81
|
.run-js-control {
|
|
62
82
|
display: flex;
|
|
63
83
|
align-items: center;
|
|
@@ -98,7 +118,7 @@ function onConfirm() {
|
|
|
98
118
|
}
|
|
99
119
|
|
|
100
120
|
.run-js-item-output {
|
|
101
|
-
margin: 10px -4px 10px
|
|
121
|
+
margin: 10px -4px 10px 0;
|
|
102
122
|
transform: rotate(-135deg);
|
|
103
123
|
}
|
|
104
124
|
|
|
@@ -76,6 +76,7 @@ function onOpenJson() {
|
|
|
76
76
|
text-align: right;
|
|
77
77
|
word-break: break-all;
|
|
78
78
|
}
|
|
79
|
+
|
|
79
80
|
.link {
|
|
80
81
|
cursor: pointer;
|
|
81
82
|
text-decoration: underline;
|
|
@@ -90,16 +91,8 @@ function onOpenJson() {
|
|
|
90
91
|
align-items: center;
|
|
91
92
|
min-height: 24px;
|
|
92
93
|
}
|
|
94
|
+
|
|
93
95
|
.scan-code-item-position > view {
|
|
94
96
|
width: 25%;
|
|
95
97
|
}
|
|
96
|
-
|
|
97
|
-
.scan-code-item-right {
|
|
98
|
-
text-align: right;
|
|
99
|
-
word-break: break-all;
|
|
100
|
-
}
|
|
101
|
-
.link {
|
|
102
|
-
cursor: pointer;
|
|
103
|
-
text-decoration: underline;
|
|
104
|
-
}
|
|
105
98
|
</style>
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view class="scan-code-content">
|
|
3
3
|
<view class="scan-code-control">
|
|
4
|
-
<DevToolTitle>
|
|
5
|
-
|
|
4
|
+
<DevToolTitle> {{ t('scanCode.title') }} </DevToolTitle>
|
|
6
5
|
<Tag
|
|
7
6
|
mode="clear"
|
|
8
7
|
style="margin: 0 16px 0 auto"
|
|
9
8
|
customStyle="margin:0 16px 0 auto"
|
|
10
9
|
@click="onClickScanCode"
|
|
11
10
|
>
|
|
12
|
-
|
|
11
|
+
{{ t('common.scan') }}
|
|
13
12
|
</Tag>
|
|
14
|
-
<Tag mode="clear" @click="emit('clear')">
|
|
13
|
+
<Tag mode="clear" @click="emit('clear')"> {{ t('common.clear') }} </Tag>
|
|
15
14
|
</view>
|
|
16
15
|
|
|
17
|
-
<
|
|
16
|
+
<VirtualList
|
|
18
17
|
v-if="scanCodeList && scanCodeList?.length > 0"
|
|
19
18
|
class="scan-code-list"
|
|
20
19
|
:pageSize="20"
|
|
@@ -40,7 +39,7 @@
|
|
|
40
39
|
/>
|
|
41
40
|
</AutoSize>
|
|
42
41
|
</template>
|
|
43
|
-
</
|
|
42
|
+
</VirtualList>
|
|
44
43
|
|
|
45
44
|
<Empty v-else />
|
|
46
45
|
</view>
|
|
@@ -50,11 +49,14 @@ import DevToolTitle from '../DevToolTitle/index.vue';
|
|
|
50
49
|
import ScanCodeItem from './ScanCodeItem.vue';
|
|
51
50
|
import Tag from '../Tag/index.vue';
|
|
52
51
|
import Empty from '../Empty/index.vue';
|
|
53
|
-
import
|
|
54
|
-
import AutoSize from '../
|
|
52
|
+
import VirtualList from '../VirtualList/index.vue';
|
|
53
|
+
import AutoSize from '../VirtualList/AutoSize.vue';
|
|
55
54
|
import type { DevTool } from '../../type';
|
|
55
|
+
import { useI18n } from '../../i18n';
|
|
56
|
+
|
|
57
|
+
const { t } = useI18n();
|
|
56
58
|
|
|
57
|
-
const
|
|
59
|
+
const _props = defineProps<{
|
|
58
60
|
scanCodeList?: DevTool.ScanCodeItem[];
|
|
59
61
|
zIndex?: number;
|
|
60
62
|
contentHeight: number;
|
|
@@ -87,6 +89,7 @@ function onClickScanCode() {
|
|
|
87
89
|
display: flex;
|
|
88
90
|
align-items: center;
|
|
89
91
|
justify-content: space-between;
|
|
92
|
+
|
|
90
93
|
/* gap: 8px; */
|
|
91
94
|
padding: 0 16px;
|
|
92
95
|
height: 32px;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<button class="setting-button" :style="customStyle" @click="onClick">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</button>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script lang="ts" setup>
|
|
8
|
+
defineProps<{
|
|
9
|
+
customStyle?: Record<string, any> | string;
|
|
10
|
+
}>();
|
|
11
|
+
const emit = defineEmits<{ (e: 'click'): void }>();
|
|
12
|
+
|
|
13
|
+
function onClick() {
|
|
14
|
+
emit('click');
|
|
15
|
+
}
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<style scoped>
|
|
19
|
+
.setting-button {
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
width: 100%;
|
|
24
|
+
height: 32px;
|
|
25
|
+
border-radius: 4px;
|
|
26
|
+
color: #fff;
|
|
27
|
+
outline: none;
|
|
28
|
+
border: 1px solid transparent;
|
|
29
|
+
background-color: var(--dev-tool-main-color);
|
|
30
|
+
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
31
|
+
font-size: var(--dev-tool-base-font-size);
|
|
32
|
+
padding: 0;
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
user-select: none;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.setting-button:hover {
|
|
38
|
+
opacity: 0.9;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.setting-button:active {
|
|
42
|
+
transform: scale(0.98);
|
|
43
|
+
opacity: 0.8;
|
|
44
|
+
}
|
|
45
|
+
</style>
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
.setting-content {
|
|
2
|
+
height: 100%;
|
|
3
|
+
overflow: auto;
|
|
4
|
+
font-size: var(--dev-tool-base-font-size);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.setting-item {
|
|
8
|
+
padding: 0 16px;
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.setting-row {
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
justify-content: space-between;
|
|
16
|
+
margin: 8px 0;
|
|
17
|
+
min-height: 18px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.setting-tips {
|
|
21
|
+
color: #616161;
|
|
22
|
+
font-size: var(--dev-tool-tips-font-size);
|
|
23
|
+
margin-bottom: 8px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.setting-link {
|
|
27
|
+
color: var(--dev-tool-main-color);
|
|
28
|
+
text-decoration: underline;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.setting-web-view {
|
|
32
|
+
position: fixed;
|
|
33
|
+
top: 0;
|
|
34
|
+
left: 0;
|
|
35
|
+
width: 100vw;
|
|
36
|
+
height: 100%;
|
|
37
|
+
overflow: auto;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.setting-theme {
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
gap: 16px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.setting-item-theme {
|
|
47
|
+
margin-top: 16px;
|
|
48
|
+
width: 30px;
|
|
49
|
+
height: 30px;
|
|
50
|
+
border-radius: 4px;
|
|
51
|
+
border: 1px solid #fff;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.setting-theme-light {
|
|
55
|
+
background-color: #fff;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.setting-theme-dark {
|
|
59
|
+
background-color: rgb(0 0 0 / 80%);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.setting-theme-eye {
|
|
63
|
+
background-color: #faf9de;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.setting-theme-sakura {
|
|
67
|
+
background-color: #fff0f5;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.setting-theme-frost {
|
|
71
|
+
background-color: #f0f9ff;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.setting-theme-sunny {
|
|
75
|
+
background-color: #fffbeb;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.setting-theme-midnight {
|
|
79
|
+
background-color: #0f111a;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.setting-theme-gulf {
|
|
83
|
+
background-color: #0a1b35;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.setting-theme-lava {
|
|
87
|
+
background-color: #3d0d0d;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.setting-theme-emerald {
|
|
91
|
+
background-color: #021a12;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.setting-theme-active {
|
|
95
|
+
border: 1px solid var(--dev-tool-main-color);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.setting-input {
|
|
99
|
+
width: 150px;
|
|
100
|
+
height: 24px;
|
|
101
|
+
border: 1px solid var(--dev-tool-border-color);
|
|
102
|
+
padding: 0 4px;
|
|
103
|
+
text-align: center;
|
|
104
|
+
box-sizing: border-box;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.setting-btn {
|
|
108
|
+
background-color: var(--dev-tool-main-color);
|
|
109
|
+
color: #fff;
|
|
110
|
+
font-size: 12px;
|
|
111
|
+
padding: 4px 12px;
|
|
112
|
+
border-radius: 4px;
|
|
113
|
+
cursor: pointer;
|
|
114
|
+
text-align: center;
|
|
115
|
+
margin-top: 8px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.setting-btn:active {
|
|
119
|
+
opacity: 0.8;
|
|
120
|
+
}
|