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
|
@@ -10,16 +10,16 @@
|
|
|
10
10
|
class="intercept-detail-icon"
|
|
11
11
|
@click.stop="emit('remove', network)"
|
|
12
12
|
>
|
|
13
|
-
|
|
13
|
+
{{ t('common.delete') }}
|
|
14
14
|
</Tag>
|
|
15
15
|
</view>
|
|
16
16
|
<view class="intercept-info">
|
|
17
17
|
<view class="intercept-info-item">
|
|
18
|
-
|
|
18
|
+
{{ t('network.expectedStatus') }}:
|
|
19
19
|
<Tag :mode="tagMode" style="margin-left: 6px">{{ network.status }}</Tag>
|
|
20
20
|
</view>
|
|
21
21
|
<view class="intercept-info-item">
|
|
22
|
-
|
|
22
|
+
{{ t('network.expectedResult') }}:
|
|
23
23
|
{{ expectingResults }}
|
|
24
24
|
</view>
|
|
25
25
|
</view>
|
|
@@ -30,8 +30,10 @@
|
|
|
30
30
|
import { computed } from 'vue';
|
|
31
31
|
|
|
32
32
|
import Tag from '../Tag/index.vue';
|
|
33
|
-
import { formatDate } from '../../utils';
|
|
34
33
|
import type { DevTool } from '../../type';
|
|
34
|
+
import { useI18n } from '../../i18n';
|
|
35
|
+
|
|
36
|
+
const { t } = useI18n();
|
|
35
37
|
const props = defineProps<{
|
|
36
38
|
network: DevTool.NetworkItem;
|
|
37
39
|
|
|
@@ -63,7 +65,7 @@ const tagMode = computed(() => {
|
|
|
63
65
|
});
|
|
64
66
|
|
|
65
67
|
const expectingResults = computed(() => {
|
|
66
|
-
return props.network.response.data ? '
|
|
68
|
+
return props.network.response.data ? t('common.custom') : t('common.none');
|
|
67
69
|
});
|
|
68
70
|
</script>
|
|
69
71
|
<style scoped>
|
|
@@ -72,6 +74,7 @@ const expectingResults = computed(() => {
|
|
|
72
74
|
border-bottom: 1px solid var(--dev-tool-border-color);
|
|
73
75
|
font-size: var(--dev-tool-base-font-size);
|
|
74
76
|
}
|
|
77
|
+
|
|
75
78
|
.intercept-url-row {
|
|
76
79
|
display: flex;
|
|
77
80
|
align-items: center;
|
|
@@ -84,6 +87,7 @@ const expectingResults = computed(() => {
|
|
|
84
87
|
overflow: hidden;
|
|
85
88
|
text-overflow: ellipsis;
|
|
86
89
|
}
|
|
90
|
+
|
|
87
91
|
.intercept-detail-icon {
|
|
88
92
|
margin-left: auto;
|
|
89
93
|
}
|
|
@@ -96,6 +100,7 @@ const expectingResults = computed(() => {
|
|
|
96
100
|
color: var(--dev-tool-text-color);
|
|
97
101
|
transition: color 0.3s;
|
|
98
102
|
}
|
|
103
|
+
|
|
99
104
|
.intercept-info-item {
|
|
100
105
|
display: flex;
|
|
101
106
|
align-items: center;
|
|
@@ -105,9 +110,11 @@ const expectingResults = computed(() => {
|
|
|
105
110
|
.slide-fade-enter-active {
|
|
106
111
|
transition: all 0.8s ease-out;
|
|
107
112
|
}
|
|
113
|
+
|
|
108
114
|
.slide-fade-leave-active {
|
|
109
115
|
transition: all 0.8s cubic-bezier(1, 0.5, 0.8, 1);
|
|
110
116
|
}
|
|
117
|
+
|
|
111
118
|
.slide-fade-enter-from,
|
|
112
119
|
.slide-fade-leave-to {
|
|
113
120
|
transform: translateY(20px);
|
|
@@ -124,8 +131,9 @@ const expectingResults = computed(() => {
|
|
|
124
131
|
|
|
125
132
|
.intercept-stock {
|
|
126
133
|
text-align: right;
|
|
127
|
-
|
|
134
|
+
overflow-wrap: break-word;
|
|
128
135
|
}
|
|
136
|
+
|
|
129
137
|
.intercept-stock-link {
|
|
130
138
|
text-decoration: underline;
|
|
131
139
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view class="network-detail" :style="customStyle">
|
|
3
3
|
<view class="network-detail-control">
|
|
4
|
-
<DevToolTitle>
|
|
4
|
+
<DevToolTitle> {{ t('network.requestDetail') }} </DevToolTitle>
|
|
5
5
|
<Tag
|
|
6
6
|
mode="info"
|
|
7
|
-
v-for="item in
|
|
7
|
+
v-for="item in translatedSelectItems"
|
|
8
8
|
:active="item.value === currentSelect"
|
|
9
9
|
:key="item.value"
|
|
10
10
|
customStyle="margin-left: 16px"
|
|
@@ -30,27 +30,27 @@
|
|
|
30
30
|
@touchmove.stop
|
|
31
31
|
[Intervention] Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted.
|
|
32
32
|
-->
|
|
33
|
-
<DevToolTitle>
|
|
33
|
+
<DevToolTitle> {{ t('network.general') }} </DevToolTitle>
|
|
34
34
|
<view class="net-detail-item">
|
|
35
|
-
<view class="net-detail-item-key"
|
|
35
|
+
<view class="net-detail-item-key">{{ t('network.requestUrl') }}:</view>
|
|
36
36
|
<view class="net-detail-url" @click="onClickUrl">
|
|
37
37
|
{{ network.url }}
|
|
38
38
|
</view>
|
|
39
39
|
</view>
|
|
40
40
|
<view class="net-detail-item">
|
|
41
|
-
<view class="net-detail-item-key"
|
|
41
|
+
<view class="net-detail-item-key">{{ t('network.method') }}:</view>
|
|
42
42
|
<Tag mode="info">{{ network.method }}</Tag>
|
|
43
43
|
</view>
|
|
44
44
|
<view class="net-detail-item">
|
|
45
|
-
<view class="net-detail-item-key"
|
|
45
|
+
<view class="net-detail-item-key">{{ t('network.statusCode') }}:</view>
|
|
46
46
|
{{ network.status }}
|
|
47
47
|
|
|
48
48
|
<Tag v-if="network.intercepted" mode="error" style="margin-left: 6px">
|
|
49
|
-
|
|
49
|
+
{{ t('network.intercepted') }}
|
|
50
50
|
</Tag>
|
|
51
51
|
</view>
|
|
52
52
|
<view class="net-detail-item">
|
|
53
|
-
<view class="net-detail-item-key"
|
|
53
|
+
<view class="net-detail-item-key">{{ t('common.startTime') }}:</view>
|
|
54
54
|
{{
|
|
55
55
|
network.startTime
|
|
56
56
|
? formatDate(network.startTime, 'HH:mm:ss:SS')
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
}}
|
|
59
59
|
</view>
|
|
60
60
|
<view class="net-detail-item">
|
|
61
|
-
<view class="net-detail-item-key"
|
|
61
|
+
<view class="net-detail-item-key">{{ t('common.endTime') }}:</view>
|
|
62
62
|
{{
|
|
63
63
|
network.endTime
|
|
64
64
|
? formatDate(network.endTime, 'HH:mm:ss:SS')
|
|
@@ -66,20 +66,20 @@
|
|
|
66
66
|
}}
|
|
67
67
|
</view>
|
|
68
68
|
<view class="net-detail-item">
|
|
69
|
-
<view class="net-detail-item-key"
|
|
69
|
+
<view class="net-detail-item-key">{{ t('network.duration') }}:</view>
|
|
70
70
|
{{ network.time ?? '--' }}
|
|
71
71
|
</view>
|
|
72
72
|
<view class="net-detail-item">
|
|
73
|
-
<view class="net-detail-item-key"
|
|
73
|
+
<view class="net-detail-item-key">{{ t('network.size') }}:</view>
|
|
74
74
|
{{ network.size ?? '--' }}
|
|
75
75
|
</view>
|
|
76
76
|
|
|
77
77
|
<view class="net-detail-item">
|
|
78
|
-
<view class="net-detail-item-key"
|
|
78
|
+
<view class="net-detail-item-key">{{ t('network.sponsor') }}:</view>
|
|
79
79
|
{{ network.sponsor }}
|
|
80
80
|
</view>
|
|
81
81
|
|
|
82
|
-
<DevToolTitle
|
|
82
|
+
<DevToolTitle>{{ t('network.requestHeaders') }}</DevToolTitle>
|
|
83
83
|
<template v-if="network.headers.requestHeader.length > 0">
|
|
84
84
|
<view
|
|
85
85
|
class="net-detail-item"
|
|
@@ -91,10 +91,10 @@
|
|
|
91
91
|
</view>
|
|
92
92
|
</template>
|
|
93
93
|
<view v-else>
|
|
94
|
-
<Empty text="
|
|
94
|
+
<Empty :text="t('network.noRequestHeaders')" />
|
|
95
95
|
</view>
|
|
96
96
|
|
|
97
|
-
<DevToolTitle
|
|
97
|
+
<DevToolTitle>{{ t('network.responseHeaders') }}</DevToolTitle>
|
|
98
98
|
<template v-if="network.headers.responseHeader.length > 0">
|
|
99
99
|
<view
|
|
100
100
|
class="net-detail-item"
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
</view>
|
|
107
107
|
</template>
|
|
108
108
|
<view v-else>
|
|
109
|
-
<Empty text="
|
|
109
|
+
<Empty :text="t('network.noResponseHeaders')" />
|
|
110
110
|
</view>
|
|
111
111
|
</scroll-view>
|
|
112
112
|
<template v-if="currentSelect === 'payload'">
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
</view>
|
|
150
150
|
</template>
|
|
151
151
|
<script lang="ts" setup>
|
|
152
|
-
import { ref, computed
|
|
152
|
+
import { ref, computed } from 'vue';
|
|
153
153
|
import JsonPretty from '../JsonPretty/index.vue';
|
|
154
154
|
import Tag from '../Tag/index.vue';
|
|
155
155
|
import Empty from '../Empty/index.vue';
|
|
@@ -157,6 +157,9 @@ import CircularButton from '../CircularButton/index.vue';
|
|
|
157
157
|
import DevToolTitle from '../DevToolTitle/index.vue';
|
|
158
158
|
import type { DevTool } from '../../type';
|
|
159
159
|
import { formatDate } from '../../utils';
|
|
160
|
+
import { useI18n } from '../../i18n';
|
|
161
|
+
|
|
162
|
+
const { t } = useI18n();
|
|
160
163
|
const props = defineProps<{
|
|
161
164
|
network: DevTool.NetworkItem;
|
|
162
165
|
zIndex?: number;
|
|
@@ -164,20 +167,20 @@ const props = defineProps<{
|
|
|
164
167
|
customStyle?: Record<string, any>;
|
|
165
168
|
}>();
|
|
166
169
|
const emit = defineEmits<{ (e: 'close'): void }>();
|
|
167
|
-
const
|
|
170
|
+
const translatedSelectItems = computed(() => [
|
|
168
171
|
{
|
|
169
|
-
label: 'base',
|
|
172
|
+
label: t('common.base'),
|
|
170
173
|
value: 'base',
|
|
171
174
|
},
|
|
172
175
|
{
|
|
173
|
-
label: 'payload',
|
|
176
|
+
label: t('common.payload'),
|
|
174
177
|
value: 'payload',
|
|
175
178
|
},
|
|
176
179
|
{
|
|
177
|
-
label: 'response',
|
|
180
|
+
label: t('common.response'),
|
|
178
181
|
value: 'response',
|
|
179
182
|
},
|
|
180
|
-
];
|
|
183
|
+
]);
|
|
181
184
|
|
|
182
185
|
const currentSelect = ref('base');
|
|
183
186
|
|
|
@@ -193,7 +196,7 @@ const payload = computed(() => {
|
|
|
193
196
|
value: {},
|
|
194
197
|
type: 'empty',
|
|
195
198
|
};
|
|
196
|
-
} catch (
|
|
199
|
+
} catch (_error) {
|
|
197
200
|
return {
|
|
198
201
|
value: props.network.payload,
|
|
199
202
|
type: props.network.payload ? 'string' : 'empty',
|
|
@@ -213,7 +216,7 @@ const response = computed(() => {
|
|
|
213
216
|
value: {},
|
|
214
217
|
type: 'empty',
|
|
215
218
|
};
|
|
216
|
-
} catch (
|
|
219
|
+
} catch (_error) {
|
|
217
220
|
return {
|
|
218
221
|
value: props.network.response,
|
|
219
222
|
type: props.network.response ? 'string' : 'empty',
|
|
@@ -230,13 +233,13 @@ function onClickUrl() {
|
|
|
230
233
|
data: props.network.url,
|
|
231
234
|
success() {
|
|
232
235
|
uni.showToast({
|
|
233
|
-
title: '
|
|
236
|
+
title: t('common.copySuccess'),
|
|
234
237
|
icon: 'none',
|
|
235
238
|
});
|
|
236
239
|
},
|
|
237
240
|
fail() {
|
|
238
241
|
uni.showToast({
|
|
239
|
-
title: '
|
|
242
|
+
title: t('common.copyFail'),
|
|
240
243
|
icon: 'none',
|
|
241
244
|
});
|
|
242
245
|
},
|
|
@@ -248,17 +251,17 @@ function onClickUrl() {
|
|
|
248
251
|
position: fixed;
|
|
249
252
|
width: 100vw;
|
|
250
253
|
height: 100%;
|
|
251
|
-
|
|
252
254
|
top: 0;
|
|
253
255
|
left: 0;
|
|
254
256
|
padding: 0 16px;
|
|
255
|
-
|
|
256
257
|
background-color: var(--dev-tool-bg3-color);
|
|
257
258
|
box-sizing: border-box;
|
|
258
259
|
}
|
|
260
|
+
|
|
259
261
|
.network-detail-control {
|
|
260
262
|
display: flex;
|
|
261
263
|
align-items: center;
|
|
264
|
+
|
|
262
265
|
/* margin-bottom: 4px; */
|
|
263
266
|
height: 32px;
|
|
264
267
|
border-bottom: 1px solid transparent;
|
|
@@ -274,16 +277,18 @@ function onClickUrl() {
|
|
|
274
277
|
align-items: center;
|
|
275
278
|
min-height: 28px;
|
|
276
279
|
word-break: break-all;
|
|
277
|
-
font-size: 12px;
|
|
278
280
|
}
|
|
281
|
+
|
|
279
282
|
.network-detail-base {
|
|
280
283
|
overflow: auto;
|
|
281
284
|
}
|
|
285
|
+
|
|
282
286
|
.net-detail-item-key {
|
|
283
287
|
white-space: nowrap;
|
|
284
288
|
margin-right: 8px;
|
|
285
289
|
color: var(--dev-tool-info-color);
|
|
286
290
|
}
|
|
291
|
+
|
|
287
292
|
.network-detail-payload {
|
|
288
293
|
word-break: break-all;
|
|
289
294
|
max-width: 100%;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view class="network-intercept" :style="customStyle">
|
|
3
3
|
<view class="network-intercept-control">
|
|
4
|
-
<DevToolTitle
|
|
4
|
+
<DevToolTitle>{{ t('network.btnIntercept') }}</DevToolTitle>
|
|
5
5
|
<CircularButton
|
|
6
6
|
style="margin-left: auto"
|
|
7
7
|
text="+"
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
@click="emit('close')"
|
|
14
14
|
/>
|
|
15
15
|
</view>
|
|
16
|
-
<
|
|
16
|
+
<VirtualList
|
|
17
17
|
class="network-intercept-list"
|
|
18
18
|
:data="interceptNetworkList"
|
|
19
19
|
:pageSize="15"
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
/>
|
|
36
36
|
</AutoSize>
|
|
37
37
|
</template>
|
|
38
|
-
</
|
|
38
|
+
</VirtualList>
|
|
39
39
|
<Empty v-else />
|
|
40
40
|
</view>
|
|
41
41
|
</template>
|
|
@@ -44,11 +44,14 @@ import type { DevTool } from '../../type';
|
|
|
44
44
|
import CircularButton from '../CircularButton/index.vue';
|
|
45
45
|
import DevToolTitle from '../DevToolTitle/index.vue';
|
|
46
46
|
import InterceptItem from './InterceptItem.vue';
|
|
47
|
-
import
|
|
48
|
-
import AutoSize from '../
|
|
47
|
+
import VirtualList from '../VirtualList/index.vue';
|
|
48
|
+
import AutoSize from '../VirtualList/AutoSize.vue';
|
|
49
49
|
import Empty from '../Empty/index.vue';
|
|
50
|
+
import { useI18n } from '../../i18n';
|
|
50
51
|
|
|
51
|
-
const
|
|
52
|
+
const { t } = useI18n();
|
|
53
|
+
|
|
54
|
+
const _props = defineProps<{
|
|
52
55
|
zIndex?: number;
|
|
53
56
|
interceptNetworkList?: DevTool.NetworkItem[];
|
|
54
57
|
contentHeight: number;
|
|
@@ -69,11 +72,11 @@ const emit = defineEmits<{
|
|
|
69
72
|
left: 0;
|
|
70
73
|
|
|
71
74
|
/* #ifdef H5 || APP-PLUS */
|
|
72
|
-
padding: 50px
|
|
75
|
+
padding: 50px 0;
|
|
76
|
+
|
|
73
77
|
/* #endif */
|
|
74
78
|
|
|
75
79
|
overflow: auto;
|
|
76
|
-
|
|
77
80
|
background-color: var(--dev-tool-bg3-color);
|
|
78
81
|
box-sizing: border-box;
|
|
79
82
|
}
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
<template>
|
|
2
|
+
<!-- eslint-disable vue/no-v-html, vue/no-v-text-v-html-on-component -->
|
|
2
3
|
<view class="network-item">
|
|
3
4
|
<view class="network-url-row">
|
|
4
5
|
<Tag mode="error" style="margin-right: 6px" v-if="network?.intercepted">
|
|
5
|
-
|
|
6
|
+
{{ t('network.interceptedShort') }}
|
|
6
7
|
</Tag>
|
|
7
8
|
<Tag mode="info">{{ network.method }}</Tag>
|
|
8
9
|
|
|
9
|
-
<view
|
|
10
|
+
<view
|
|
11
|
+
class="network-url"
|
|
12
|
+
v-html="network.url"
|
|
13
|
+
@click="emit('openDetail')"
|
|
14
|
+
>
|
|
10
15
|
</view>
|
|
11
16
|
|
|
12
17
|
<Tag mode="main" class="network-detail-icon" @click.stop="emit('resend')">
|
|
13
|
-
|
|
18
|
+
{{ t('network.resend') }}
|
|
14
19
|
</Tag>
|
|
15
20
|
</view>
|
|
16
21
|
<view class="network-info">
|
|
@@ -19,7 +24,7 @@
|
|
|
19
24
|
<view>{{ network.size }}</view>
|
|
20
25
|
<view>
|
|
21
26
|
{{ sortMap?.[props.currentNetworkSort] ?? '一' }}
|
|
22
|
-
|
|
27
|
+
{{ t('common.startTime') }}:
|
|
23
28
|
{{
|
|
24
29
|
network.startTime
|
|
25
30
|
? formatDate(network.startTime, 'HH:mm:ss:SS')
|
|
@@ -27,7 +32,7 @@
|
|
|
27
32
|
}}
|
|
28
33
|
</view>
|
|
29
34
|
<view>
|
|
30
|
-
|
|
35
|
+
{{ t('common.endTime') }}:
|
|
31
36
|
{{
|
|
32
37
|
network.endTime
|
|
33
38
|
? formatDate(network.endTime, 'HH:mm:ss:SS')
|
|
@@ -40,7 +45,9 @@
|
|
|
40
45
|
:style="`width: ${network.width}; left: ${network.left};`"
|
|
41
46
|
></view>
|
|
42
47
|
|
|
43
|
-
<view class="network-sponsor"
|
|
48
|
+
<view class="network-sponsor"
|
|
49
|
+
>{{ t('network.sponsor') }}:{{ network?.sponsor }}</view
|
|
50
|
+
>
|
|
44
51
|
<view
|
|
45
52
|
:class="`network-stock ${isUseDevSource ? 'network-stock-link' : ''}`"
|
|
46
53
|
@click.stop="emit('openCode', network.stack)"
|
|
@@ -56,6 +63,10 @@ import { sortMap } from './const';
|
|
|
56
63
|
import Tag from '../Tag/index.vue';
|
|
57
64
|
import { formatDate, isMockWX } from '../../utils';
|
|
58
65
|
import type { DevTool } from '../../type';
|
|
66
|
+
import { useI18n } from '../../i18n';
|
|
67
|
+
|
|
68
|
+
const { t } = useI18n();
|
|
69
|
+
|
|
59
70
|
const props = defineProps<{
|
|
60
71
|
network: DevTool.NetworkItem;
|
|
61
72
|
currentNetworkSort: -1 | 1;
|
|
@@ -70,10 +81,11 @@ const emit = defineEmits<{
|
|
|
70
81
|
(e: 'openCode', value?: string): void;
|
|
71
82
|
}>();
|
|
72
83
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
84
|
+
// last url 高亮异常
|
|
85
|
+
// const lastUrl = computed(() => {
|
|
86
|
+
// const start = props.network.url.lastIndexOf('/');
|
|
87
|
+
// return props.network.url.slice(start + 1);
|
|
88
|
+
// });
|
|
77
89
|
|
|
78
90
|
const isUseDevSource = computed(() => {
|
|
79
91
|
return (
|
|
@@ -98,6 +110,7 @@ const tagMode = computed(() => {
|
|
|
98
110
|
border-bottom: 1px solid var(--dev-tool-border-color);
|
|
99
111
|
font-size: var(--dev-tool-base-font-size);
|
|
100
112
|
}
|
|
113
|
+
|
|
101
114
|
.network-url-row {
|
|
102
115
|
display: flex;
|
|
103
116
|
align-items: center;
|
|
@@ -112,10 +125,12 @@ const tagMode = computed(() => {
|
|
|
112
125
|
text-overflow: ellipsis;
|
|
113
126
|
text-decoration: underline;
|
|
114
127
|
}
|
|
128
|
+
|
|
115
129
|
.network-url > rich-text {
|
|
116
130
|
overflow: hidden;
|
|
117
131
|
text-overflow: ellipsis;
|
|
118
132
|
}
|
|
133
|
+
|
|
119
134
|
.network-detail-icon {
|
|
120
135
|
margin-left: auto;
|
|
121
136
|
}
|
|
@@ -143,8 +158,9 @@ const tagMode = computed(() => {
|
|
|
143
158
|
|
|
144
159
|
.network-stock {
|
|
145
160
|
text-align: right;
|
|
146
|
-
|
|
161
|
+
overflow-wrap: break-word;
|
|
147
162
|
}
|
|
163
|
+
|
|
148
164
|
.network-stock-link {
|
|
149
165
|
text-decoration: underline;
|
|
150
166
|
}
|