vite-uni-dev-tool 1.0.0 → 1.2.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 +54 -0
- package/dist/const.cjs +1 -1
- package/dist/const.d.ts +13 -0
- package/dist/const.d.ts.map +1 -1
- package/dist/const.js +1 -1
- package/dist/core-shared.d.ts +1 -1
- package/dist/core-shared.d.ts.map +1 -1
- package/dist/core-shared.js +1 -1
- package/dist/core.d.ts +10 -3
- package/dist/core.d.ts.map +1 -1
- package/dist/core.js +2 -2
- package/dist/i18n/locales/en.cjs +1 -1
- package/dist/i18n/locales/en.d.ts +86 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +1 -1
- package/dist/i18n/locales/zh-Hans.cjs +1 -1
- package/dist/i18n/locales/zh-Hans.d.ts +87 -1
- package/dist/i18n/locales/zh-Hans.d.ts.map +1 -1
- package/dist/i18n/locales/zh-Hans.js +1 -1
- package/dist/modules/devConsole/index.cjs +1 -1
- package/dist/modules/devConsole/index.js +3 -3
- package/dist/modules/devEvent/index.cjs +3 -3
- package/dist/modules/devEvent/index.d.ts +1 -0
- package/dist/modules/devEvent/index.d.ts.map +1 -1
- package/dist/modules/devEvent/index.js +3 -3
- package/dist/modules/devIntercept/index.cjs +14 -13
- package/dist/modules/devIntercept/index.d.ts +20 -1
- package/dist/modules/devIntercept/index.d.ts.map +1 -1
- package/dist/modules/devIntercept/index.js +14 -13
- package/dist/modules/devStore/index.cjs +1 -1
- package/dist/modules/devStore/index.d.ts +21 -0
- package/dist/modules/devStore/index.d.ts.map +1 -1
- package/dist/modules/devStore/index.js +1 -1
- package/dist/plugins/uniDevTool/transform/transformMain.cjs +3 -3
- package/dist/plugins/uniDevTool/transform/transformMain.d.ts +2 -1
- 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 +31 -25
- package/dist/plugins/uniDevTool/transform/transformVue.d.ts +2 -1
- package/dist/plugins/uniDevTool/transform/transformVue.d.ts.map +1 -1
- package/dist/plugins/uniDevTool/transform/transformVue.js +30 -24
- package/dist/plugins/uniDevTool/uniDevTool.cjs +3 -3
- package/dist/plugins/uniDevTool/uniDevTool.d.ts +3 -1
- package/dist/plugins/uniDevTool/uniDevTool.d.ts.map +1 -1
- package/dist/plugins/uniDevTool/uniDevTool.js +3 -3
- package/dist/type.d.ts +50 -2
- package/dist/type.d.ts.map +1 -1
- package/dist/utils/language.cjs +1 -1
- package/dist/utils/language.d.ts.map +1 -1
- package/dist/utils/language.js +1 -1
- package/dist/utils/object.cjs +1 -1
- package/dist/utils/object.d.ts.map +1 -1
- package/dist/utils/object.js +1 -1
- package/dist/v3/DevTool/components/BluetoothList/BluetoothItem.vue +199 -0
- package/dist/v3/DevTool/components/BluetoothList/BluetoothTool.vue +730 -0
- package/dist/v3/DevTool/components/BluetoothList/index.vue +167 -0
- package/dist/v3/{CaptureScreen → DevTool/components/CaptureScreen}/index.vue +4 -4
- package/dist/v3/{ConsoleList → DevTool/components/ConsoleList}/ConsoleItem.vue +22 -16
- package/dist/v3/{ConsoleList → DevTool/components/ConsoleList}/RunJSInput.vue +4 -6
- package/dist/v3/{ConsoleList → DevTool/components/ConsoleList}/index.vue +21 -10
- package/dist/v3/{DevToolButton → DevTool/components/DevToolButton}/index.vue +7 -4
- package/dist/v3/{DevToolWindow → DevTool/components/DevToolWindow}/DevToolOverlay.vue +17 -2
- package/dist/v3/{DevToolWindow → DevTool/components/DevToolWindow}/const.ts +28 -5
- package/dist/v3/{DevToolWindow → DevTool/components/DevToolWindow}/hooks/dataUtils.ts +1 -1
- package/dist/v3/{DevToolWindow → DevTool/components/DevToolWindow}/hooks/useDevToolData.ts +55 -6
- package/dist/v3/{DevToolWindow → DevTool/components/DevToolWindow}/hooks/useDevToolHandlers.ts +85 -5
- package/dist/v3/{DevToolWindow → DevTool/components/DevToolWindow}/hooks/useDevToolOverlay.ts +25 -8
- package/dist/v3/{DevToolWindow → DevTool/components/DevToolWindow}/index.vue +67 -16
- package/dist/v3/{ElEvent → DevTool/components/ElEvent}/ElEventItem.vue +3 -3
- package/dist/v3/{ElEvent → DevTool/components/ElEvent}/index.vue +10 -13
- package/dist/v3/{Instance → DevTool/components/Instance}/index.vue +1 -1
- package/dist/v3/{Instance → DevTool/components/Instance}/transformTree.ts +1 -1
- package/dist/v3/{Instance → DevTool/components/Instance}/transformTreeCtx.ts +1 -1
- package/dist/v3/{InstanceDetail → DevTool/components/InstanceDetail}/index.vue +4 -4
- package/dist/v3/{JsonDetail → DevTool/components/JsonDetail}/index.vue +4 -4
- package/dist/v3/{NFCList → DevTool/components/NFCList}/NFCItem.vue +4 -5
- package/dist/v3/{NFCList → DevTool/components/NFCList}/NFCTool.vue +33 -57
- package/dist/v3/{NFCList → DevTool/components/NFCList}/index.vue +12 -16
- package/dist/v3/{NetworkList → DevTool/components/NetworkList}/InterceptConfig.vue +20 -4
- package/dist/v3/{NetworkList → DevTool/components/NetworkList}/InterceptItem.vue +3 -3
- package/dist/v3/{NetworkList → DevTool/components/NetworkList}/NetworkDetail.vue +18 -27
- package/dist/v3/{NetworkList → DevTool/components/NetworkList}/NetworkIntercept.vue +11 -16
- package/dist/v3/{NetworkList → DevTool/components/NetworkList}/NetworkItem.vue +10 -14
- package/dist/v3/{NetworkList → DevTool/components/NetworkList}/NetworkSend.vue +67 -34
- package/dist/v3/{NetworkList → DevTool/components/NetworkList}/index.vue +8 -8
- package/dist/v3/{Performance → DevTool/components/Performance}/index.vue +7 -4
- package/dist/v3/{Performance → DevTool/components/Performance}/modules/PerformanceWidget.vue +12 -9
- package/dist/v3/{Performance → DevTool/components/Performance}/modules/usePerformanceChart.ts +1 -1
- package/dist/v3/{Performance → DevTool/components/Performance}/modules/usePerformanceData.ts +2 -2
- package/dist/v3/{PiniaList → DevTool/components/PiniaList}/index.vue +5 -6
- package/dist/v3/{RouteList → DevTool/components/RouteList}/index.vue +21 -24
- package/dist/v3/{RunJS → DevTool/components/RunJS}/index.vue +3 -3
- package/dist/v3/{ScanCodeList → DevTool/components/ScanCodeList}/ScanCodeItem.vue +3 -4
- package/dist/v3/{ScanCodeList → DevTool/components/ScanCodeList}/index.vue +12 -16
- package/dist/v3/{SettingList → DevTool/components/SettingList}/index.vue +68 -0
- package/dist/v3/DevTool/components/SettingList/modules/SettingBarrage.vue +304 -0
- package/dist/v3/{SettingList → DevTool/components/SettingList}/modules/SettingDevTool.vue +8 -4
- package/dist/v3/{SettingList → DevTool/components/SettingList}/modules/SettingInfo.vue +47 -9
- package/dist/v3/{SettingList → DevTool/components/SettingList}/modules/SettingLanguage.vue +2 -2
- package/dist/v3/{SettingList → DevTool/components/SettingList}/modules/SettingLog.vue +2 -2
- package/dist/v3/{SettingList → DevTool/components/SettingList}/modules/SettingNetwork.vue +3 -3
- package/dist/v3/{SettingList → DevTool/components/SettingList}/modules/SettingTheme.vue +37 -7
- package/dist/v3/{SourceCode → DevTool/components/SourceCode}/Line.vue +22 -11
- package/dist/v3/{SourceCode → DevTool/components/SourceCode}/index.vue +8 -8
- package/dist/v3/{SourceCode → DevTool/components/SourceCode}/parseCode.ts +136 -228
- package/dist/v3/{StorageList → DevTool/components/StorageList}/index.vue +7 -7
- package/dist/v3/{TransferList → DevTool/components/TransferList}/TransferDetail.vue +6 -6
- package/dist/v3/{TransferList → DevTool/components/TransferList}/TransferItem.vue +4 -4
- package/dist/v3/{TransferList → DevTool/components/TransferList}/index.vue +8 -8
- package/dist/v3/{UniEvent → DevTool/components/UniEvent}/UniEventItem.vue +6 -7
- package/dist/v3/{UniEvent → DevTool/components/UniEvent}/index.vue +6 -6
- package/dist/v3/{VuexList → DevTool/components/VuexList}/index.vue +3 -3
- package/dist/v3/{WebSocket → DevTool/components/WebSocket}/WebSocketDetail.vue +8 -8
- package/dist/v3/{WebSocket → DevTool/components/WebSocket}/WebSocketItem.vue +4 -4
- package/dist/v3/{WebSocket → DevTool/components/WebSocket}/index.vue +8 -8
- package/dist/v3/DevTool/index.vue +179 -4
- package/dist/v3/{AppTransition → components/AppTransition}/index.vue +6 -0
- package/dist/v3/components/Barrage/BarrageItem.vue +137 -0
- package/dist/v3/components/Barrage/index.vue +202 -0
- package/dist/v3/components/DevErrorBoundary/index.vue +380 -0
- package/dist/v3/{DraggableContainer → components/DraggableContainer}/index.vue +1 -1
- package/dist/v3/{FilterInput → components/FilterInput}/index.vue +1 -1
- package/dist/v3/{JsonPretty → components/JsonPretty}/components/CheckController/index.vue +1 -1
- package/dist/v3/{JsonPretty → components/JsonPretty}/components/TreeNode/index.vue +11 -5
- package/dist/v3/{JsonPretty → components/JsonPretty}/index.vue +16 -13
- package/dist/v3/{JsonPretty → components/JsonPretty}/type.ts +1 -0
- package/dist/v3/{JsonPretty → components/JsonPretty}/utils/index.ts +1 -1
- package/dist/v3/{MovableContainer → components/MovableContainer}/index.vue +9 -5
- package/dist/v3/{Pick → components/Pick}/index.vue +1 -1
- package/dist/v3/{Tabs → components/Tabs}/index.vue +30 -4
- package/dist/v3/{VirtualList → components/VirtualList}/AutoSize.vue +1 -1
- package/dist/v3/{VirtualList → components/VirtualList}/index.vue +4 -0
- package/dist/v3/hooks/useBluetooth/index.ts +561 -0
- package/dist/v3/hooks/useRequest/index.ts +33 -20
- package/dist/v3/hooks/useWebsocket/README.md +79 -0
- package/dist/v3/hooks/useWebsocket/index.ts +253 -0
- package/dist/v3/styles/theme.css +17 -10
- package/package.json +67 -64
- package/dist/plugins/uniParseStock/index.d.ts +0 -10
- package/dist/plugins/uniParseStock/index.d.ts.map +0 -1
- /package/dist/v3/{ConsoleList → DevTool/components/ConsoleList}/staticTips.ts +0 -0
- /package/dist/v3/{DevToolTitle → DevTool/components/DevToolTitle}/index.vue +0 -0
- /package/dist/v3/{DevToolWindow → DevTool/components/DevToolWindow}/index.css +0 -0
- /package/dist/v3/{Instance → DevTool/components/Instance}/components/InstanceTreeNode.vue +0 -0
- /package/dist/v3/{Instance → DevTool/components/Instance}/flatten.ts +0 -0
- /package/dist/v3/{Instance → DevTool/components/Instance}/registry.ts +0 -0
- /package/dist/v3/{Instance → DevTool/components/Instance}/typing.d.ts +0 -0
- /package/dist/v3/{NFCList → DevTool/components/NFCList}/const.ts +0 -0
- /package/dist/v3/{NetworkList → DevTool/components/NetworkList}/const.ts +0 -0
- /package/dist/v3/{NetworkList → DevTool/components/NetworkList}/hooks/useNetworkForm.ts +0 -0
- /package/dist/v3/{NetworkList → DevTool/components/NetworkList}/utils.ts +0 -0
- /package/dist/v3/{Performance → DevTool/components/Performance}/modules/PerformanceMetrics.vue +0 -0
- /package/dist/v3/{SettingButton → DevTool/components/SettingButton}/index.vue +0 -0
- /package/dist/v3/{SettingList → DevTool/components/SettingList}/index.css +0 -0
- /package/dist/v3/{SettingList → DevTool/components/SettingList}/typing.d.ts +0 -0
- /package/dist/v3/{AutoSizer → components/AutoSizer}/index.vue +0 -0
- /package/dist/v3/{AutoSizer → components/AutoSizer}/index1.vue +0 -0
- /package/dist/v3/{AutoSizer → components/AutoSizer}/utils.ts +0 -0
- /package/dist/v3/{CircularButton → components/CircularButton}/index.vue +0 -0
- /package/dist/v3/{CustomSwiper → components/CustomSwiper}/CustomSwiperItem.vue +0 -0
- /package/dist/v3/{CustomSwiper → components/CustomSwiper}/index.vue +0 -0
- /package/dist/v3/{Empty → components/Empty}/empty.png +0 -0
- /package/dist/v3/{Empty → components/Empty}/index.vue +0 -0
- /package/dist/v3/{FilterSelect → components/FilterSelect}/index.vue +0 -0
- /package/dist/v3/{JsonPretty → components/JsonPretty}/components/Brackets/index.vue +0 -0
- /package/dist/v3/{JsonPretty → components/JsonPretty}/components/Carets/index.vue +0 -0
- /package/dist/v3/{JsonPretty → components/JsonPretty}/hooks/useClipboard.ts +0 -0
- /package/dist/v3/{JsonPretty → components/JsonPretty}/hooks/useError.ts +0 -0
- /package/dist/v3/{Tag → components/Tag}/index.vue +0 -0
- /package/dist/v3/{VirtualList → components/VirtualList}/readme.md +0 -0
|
@@ -9,16 +9,14 @@
|
|
|
9
9
|
:active="item.value === currentSelect"
|
|
10
10
|
:key="item.value"
|
|
11
11
|
customStyle="margin-left: 16px"
|
|
12
|
-
@click="onSelect(item)"
|
|
13
|
-
>
|
|
12
|
+
@click="onSelect(item)">
|
|
14
13
|
{{ item.label }}
|
|
15
14
|
</Tag>
|
|
16
15
|
|
|
17
16
|
<CircularButton
|
|
18
17
|
style="margin-left: auto"
|
|
19
18
|
text="×"
|
|
20
|
-
@click="emit('close')"
|
|
21
|
-
/>
|
|
19
|
+
@click="emit('close')" />
|
|
22
20
|
</view>
|
|
23
21
|
<scroll-view scroll-y style="height: calc(100% - 32px)">
|
|
24
22
|
<view class="nfc-tool-base">
|
|
@@ -60,28 +58,24 @@
|
|
|
60
58
|
:pageSize="20"
|
|
61
59
|
:nodeSelectable="() => false"
|
|
62
60
|
:pathCollapsible="() => false"
|
|
63
|
-
:height="contentHeight - 32 * 5 - 28 * 3 - 16 - 20"
|
|
64
|
-
/>
|
|
61
|
+
:height="contentHeight - 32 * 5 - 28 * 3 - 16 - 20" />
|
|
65
62
|
<Empty v-else :text="t('nfc.noResult')" />
|
|
66
63
|
</view>
|
|
67
64
|
<view class="nfc-tool-write" v-if="currentSelect === 'write'">
|
|
68
65
|
<DevToolTitle>{{ t('nfc.write') }}</DevToolTitle>
|
|
69
66
|
<radio-group
|
|
70
67
|
class="radio-group"
|
|
71
|
-
@change="onChangeFormData('writeMethod', $event)"
|
|
72
|
-
>
|
|
68
|
+
@change="onChangeFormData('writeMethod', $event)">
|
|
73
69
|
<label
|
|
74
70
|
class="radio-group-item"
|
|
75
71
|
v-for="item in translatedWriteMethods"
|
|
76
|
-
:key="item.value"
|
|
77
|
-
>
|
|
72
|
+
:key="item.value">
|
|
78
73
|
<radio
|
|
79
74
|
size
|
|
80
75
|
style="transform: scale(0.8)"
|
|
81
76
|
color="#9254de"
|
|
82
77
|
:value="item.value"
|
|
83
|
-
:checked="item.value === formData.writeMethod"
|
|
84
|
-
/>
|
|
78
|
+
:checked="item.value === formData.writeMethod" />
|
|
85
79
|
|
|
86
80
|
<view>{{ item.label }}</view>
|
|
87
81
|
</label>
|
|
@@ -89,15 +83,13 @@
|
|
|
89
83
|
|
|
90
84
|
<view
|
|
91
85
|
class="nfc-tool-write-form"
|
|
92
|
-
v-if="formData.writeMethod === 'text'"
|
|
93
|
-
>
|
|
86
|
+
v-if="formData.writeMethod === 'text'">
|
|
94
87
|
<DevToolTitle>{{ t('nfc.textContent') }}</DevToolTitle>
|
|
95
88
|
<textarea
|
|
96
89
|
class="textarea"
|
|
97
90
|
:value="formData.text"
|
|
98
91
|
:placeholder="t('nfc.placeholderText')"
|
|
99
|
-
@input="onChangeFormData('text', $event)"
|
|
100
|
-
/>
|
|
92
|
+
@input="onChangeFormData('text', $event)" />
|
|
101
93
|
</view>
|
|
102
94
|
|
|
103
95
|
<view class="nfc-tool-write-form" v-if="formData.writeMethod === 'uri'">
|
|
@@ -106,45 +98,38 @@
|
|
|
106
98
|
class="textarea"
|
|
107
99
|
:placeholder="t('nfc.placeholderLink')"
|
|
108
100
|
:value="formData.uri"
|
|
109
|
-
@input="onChangeFormData('uri', $event)"
|
|
110
|
-
/>
|
|
101
|
+
@input="onChangeFormData('uri', $event)" />
|
|
111
102
|
</view>
|
|
112
103
|
|
|
113
104
|
<view
|
|
114
105
|
class="nfc-tool-write-form"
|
|
115
|
-
v-if="formData.writeMethod === 'wifi'"
|
|
116
|
-
>
|
|
106
|
+
v-if="formData.writeMethod === 'wifi'">
|
|
117
107
|
<DevToolTitle>{{ t('nfc.wifiConfig') }}</DevToolTitle>
|
|
118
108
|
<input
|
|
119
109
|
class="input"
|
|
120
110
|
:placeholder="t('nfc.placeholderSsid')"
|
|
121
111
|
:value="formData.ssid"
|
|
122
|
-
@input="onChangeFormData('ssid', $event)"
|
|
123
|
-
/>
|
|
112
|
+
@input="onChangeFormData('ssid', $event)" />
|
|
124
113
|
<input
|
|
125
114
|
class="input"
|
|
126
115
|
:placeholder="t('nfc.placeholderPassword')"
|
|
127
116
|
type="password"
|
|
128
117
|
:value="formData.password"
|
|
129
|
-
@input="onChangeFormData('password', $event)"
|
|
130
|
-
/>
|
|
118
|
+
@input="onChangeFormData('password', $event)" />
|
|
131
119
|
<view class="sub-title">{{ t('nfc.encryption') }}</view>
|
|
132
120
|
<radio-group
|
|
133
121
|
class="radio-group"
|
|
134
|
-
@change="onChangeFormData('authType', $event)"
|
|
135
|
-
>
|
|
122
|
+
@change="onChangeFormData('authType', $event)">
|
|
136
123
|
<label
|
|
137
124
|
class="radio-group-item"
|
|
138
125
|
v-for="item in translatedEncryptionMethods"
|
|
139
|
-
:key="item.value"
|
|
140
|
-
>
|
|
126
|
+
:key="item.value">
|
|
141
127
|
<radio
|
|
142
128
|
size
|
|
143
129
|
style="transform: scale(0.8)"
|
|
144
130
|
color="#9254de"
|
|
145
131
|
:value="item.value"
|
|
146
|
-
:checked="item.value === formData.authType"
|
|
147
|
-
/>
|
|
132
|
+
:checked="item.value === formData.authType" />
|
|
148
133
|
<view>{{ item.label }}</view>
|
|
149
134
|
</label>
|
|
150
135
|
</radio-group>
|
|
@@ -152,39 +137,33 @@
|
|
|
152
137
|
|
|
153
138
|
<view
|
|
154
139
|
class="nfc-tool-write-form"
|
|
155
|
-
v-if="formData.writeMethod === 'card'"
|
|
156
|
-
>
|
|
140
|
+
v-if="formData.writeMethod === 'card'">
|
|
157
141
|
<DevToolTitle>{{ t('nfc.cardInfo') }}</DevToolTitle>
|
|
158
142
|
<input
|
|
159
143
|
class="input"
|
|
160
144
|
:placeholder="t('nfc.placeholderName')"
|
|
161
145
|
:value="formData.name"
|
|
162
|
-
@input="onChangeFormData('name', $event)"
|
|
163
|
-
/>
|
|
146
|
+
@input="onChangeFormData('name', $event)" />
|
|
164
147
|
<input
|
|
165
148
|
class="input"
|
|
166
149
|
:placeholder="t('nfc.placeholderOrg')"
|
|
167
150
|
:value="formData.organization"
|
|
168
|
-
@input="onChangeFormData('organization', $event)"
|
|
169
|
-
/>
|
|
151
|
+
@input="onChangeFormData('organization', $event)" />
|
|
170
152
|
<input
|
|
171
153
|
class="input"
|
|
172
154
|
:placeholder="t('nfc.placeholderTel')"
|
|
173
155
|
:value="formData.tel"
|
|
174
|
-
@input="onChangeFormData('tel', $event)"
|
|
175
|
-
/>
|
|
156
|
+
@input="onChangeFormData('tel', $event)" />
|
|
176
157
|
<input
|
|
177
158
|
class="input"
|
|
178
159
|
:placeholder="t('nfc.placeholderAddress')"
|
|
179
160
|
:value="formData.address"
|
|
180
|
-
@input="onChangeFormData('address', $event)"
|
|
181
|
-
/>
|
|
161
|
+
@input="onChangeFormData('address', $event)" />
|
|
182
162
|
<input
|
|
183
163
|
class="input"
|
|
184
164
|
:placeholder="t('nfc.placeholderWeb')"
|
|
185
165
|
:value="formData.uri"
|
|
186
|
-
@input="onChangeFormData('uri', $event)"
|
|
187
|
-
/>
|
|
166
|
+
@input="onChangeFormData('uri', $event)" />
|
|
188
167
|
</view>
|
|
189
168
|
<view class="nfc-tool-write-form" v-if="formData.writeMethod === 'tel'">
|
|
190
169
|
<DevToolTitle>{{ t('nfc.tel') }}</DevToolTitle>
|
|
@@ -192,24 +171,21 @@
|
|
|
192
171
|
class="input"
|
|
193
172
|
:placeholder="t('nfc.placeholderTelInput')"
|
|
194
173
|
:value="formData.tel"
|
|
195
|
-
@input="onChangeFormData('tel', $event)"
|
|
196
|
-
/>
|
|
174
|
+
@input="onChangeFormData('tel', $event)" />
|
|
197
175
|
</view>
|
|
198
176
|
<view
|
|
199
177
|
class="nfc-tool-write-form"
|
|
200
|
-
v-if="formData.writeMethod === 'packageName'"
|
|
201
|
-
>
|
|
178
|
+
v-if="formData.writeMethod === 'packageName'">
|
|
202
179
|
<DevToolTitle>{{ t('nfc.appLaunch') }}</DevToolTitle>
|
|
203
180
|
<input
|
|
204
181
|
class="input"
|
|
205
182
|
:placeholder="t('nfc.placeholderPkg')"
|
|
206
183
|
:value="formData.packageName"
|
|
207
|
-
@input="onChangeFormData('packageName', $event)"
|
|
208
|
-
/>
|
|
184
|
+
@input="onChangeFormData('packageName', $event)" />
|
|
209
185
|
</view>
|
|
210
|
-
<SettingButton @click="onWrite">
|
|
211
|
-
t('nfc.startWrite')
|
|
212
|
-
|
|
186
|
+
<SettingButton @click="onWrite">
|
|
187
|
+
{{ t('nfc.startWrite') }}
|
|
188
|
+
</SettingButton>
|
|
213
189
|
<view class="nfc-tool-tips">
|
|
214
190
|
{{ t('nfc.tipsWriting') }}
|
|
215
191
|
</view>
|
|
@@ -230,15 +206,15 @@
|
|
|
230
206
|
</template>
|
|
231
207
|
<script lang="ts" setup>
|
|
232
208
|
import { ref, reactive, computed } from 'vue';
|
|
233
|
-
import Tag from '
|
|
234
|
-
import CircularButton from '
|
|
209
|
+
import Tag from '../../../components/Tag/index.vue';
|
|
210
|
+
import CircularButton from '../../../components/CircularButton/index.vue';
|
|
235
211
|
import DevToolTitle from '../DevToolTitle/index.vue';
|
|
236
|
-
import JsonPretty from '
|
|
237
|
-
import Empty from '
|
|
238
|
-
import useNFC from '
|
|
212
|
+
import JsonPretty from '../../../components/JsonPretty/index.vue';
|
|
213
|
+
import Empty from '../../../components/Empty/index.vue';
|
|
214
|
+
import useNFC from '../../../hooks/useNFC';
|
|
239
215
|
import SettingButton from '../SettingButton/index.vue';
|
|
240
216
|
import { selectItems, writeMethods, encryptionMethods } from './const';
|
|
241
|
-
import { useI18n } from '
|
|
217
|
+
import { useI18n } from '../../../../i18n';
|
|
242
218
|
|
|
243
219
|
const { t } = useI18n();
|
|
244
220
|
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view class="nfc-content">
|
|
3
3
|
<view class="nfc-control">
|
|
4
|
-
<DevToolTitle>
|
|
4
|
+
<DevToolTitle>{{ t('nfc.title') }}</DevToolTitle>
|
|
5
5
|
|
|
6
6
|
<Tag
|
|
7
7
|
mode="clear"
|
|
8
8
|
style="margin: 0 16px 0 auto"
|
|
9
9
|
customStyle="margin:0 16px 0 auto"
|
|
10
|
-
@click="emit('openTool')"
|
|
11
|
-
>
|
|
10
|
+
@click="emit('openTool')">
|
|
12
11
|
{{ t('common.tool') }}
|
|
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
|
|
@@ -20,8 +19,7 @@
|
|
|
20
19
|
:pageSize="20"
|
|
21
20
|
:height="contentHeight - 32 * 2"
|
|
22
21
|
:data="nfcList"
|
|
23
|
-
:scrollWithAnimation="true"
|
|
24
|
-
>
|
|
22
|
+
:scrollWithAnimation="true">
|
|
25
23
|
<template #default="{ list, start, itemsHeight, onSizeChange }">
|
|
26
24
|
<AutoSize
|
|
27
25
|
v-for="(item, index) in list"
|
|
@@ -29,15 +27,13 @@
|
|
|
29
27
|
:index="start + index"
|
|
30
28
|
:id="`dev-nfc${index}`"
|
|
31
29
|
:itemsHeight="itemsHeight"
|
|
32
|
-
:onSizeChange="onSizeChange"
|
|
33
|
-
>
|
|
30
|
+
:onSizeChange="onSizeChange">
|
|
34
31
|
<NFCItem
|
|
35
32
|
:nfcItem="item"
|
|
36
33
|
:mode="mode"
|
|
37
34
|
:useDevSource="useDevSource"
|
|
38
35
|
@openJson="emit('openJson', $event)"
|
|
39
|
-
@openCode="emit('openCode', $event)"
|
|
40
|
-
/>
|
|
36
|
+
@openCode="emit('openCode', $event)" />
|
|
41
37
|
</AutoSize>
|
|
42
38
|
</template>
|
|
43
39
|
</VirtualList>
|
|
@@ -48,12 +44,12 @@
|
|
|
48
44
|
<script lang="ts" setup>
|
|
49
45
|
import DevToolTitle from '../DevToolTitle/index.vue';
|
|
50
46
|
import NFCItem from './NFCItem.vue';
|
|
51
|
-
import Tag from '
|
|
52
|
-
import Empty from '
|
|
53
|
-
import VirtualList from '
|
|
54
|
-
import AutoSize from '
|
|
55
|
-
import type { DevTool } from '
|
|
56
|
-
import { useI18n } from '
|
|
47
|
+
import Tag from '../../../components/Tag/index.vue';
|
|
48
|
+
import Empty from '../../../components/Empty/index.vue';
|
|
49
|
+
import VirtualList from '../../../components/VirtualList/index.vue';
|
|
50
|
+
import AutoSize from '../../../components/VirtualList/AutoSize.vue';
|
|
51
|
+
import type { DevTool } from '../../../../type';
|
|
52
|
+
import { useI18n } from '../../../../i18n';
|
|
57
53
|
|
|
58
54
|
const { t } = useI18n();
|
|
59
55
|
|
|
@@ -19,6 +19,18 @@
|
|
|
19
19
|
<view class="intercept-config-tip">
|
|
20
20
|
{{ t('network.tipsTimeout') }}
|
|
21
21
|
</view>
|
|
22
|
+
<view class="intercept-config-control">
|
|
23
|
+
<DevToolTitle>
|
|
24
|
+
{{ t('network.delay') }}
|
|
25
|
+
</DevToolTitle>
|
|
26
|
+
</view>
|
|
27
|
+
<input
|
|
28
|
+
class="intercept-input"
|
|
29
|
+
:value="state.delay"
|
|
30
|
+
@input="onChangeState($event, 'delay')" />
|
|
31
|
+
<view class="intercept-config-tip">
|
|
32
|
+
{{ t('network.tipsDelay') }}
|
|
33
|
+
</view>
|
|
22
34
|
<view class="intercept-config-control">
|
|
23
35
|
<DevToolTitle>{{ t('network.responseStatus') }}</DevToolTitle>
|
|
24
36
|
</view>
|
|
@@ -211,13 +223,14 @@
|
|
|
211
223
|
</template>
|
|
212
224
|
<script lang="ts" setup>
|
|
213
225
|
import { computed, ref, onMounted } from 'vue';
|
|
214
|
-
import CircularButton from '
|
|
226
|
+
import CircularButton from '../../../components/CircularButton/index.vue';
|
|
215
227
|
import DevToolTitle from '../DevToolTitle/index.vue';
|
|
216
|
-
import type { DevTool } from '
|
|
228
|
+
import type { DevTool } from '../../../../type';
|
|
217
229
|
import SettingButton from '../SettingButton/index.vue';
|
|
218
|
-
import { useI18n } from '
|
|
219
|
-
import { getThemeMainColor } from '
|
|
230
|
+
import { useI18n } from '../../../../i18n';
|
|
231
|
+
import { getThemeMainColor } from '../../../styles/theme';
|
|
220
232
|
const { t } = useI18n();
|
|
233
|
+
|
|
221
234
|
const themeColor = computed(() => getThemeMainColor(props.theme));
|
|
222
235
|
|
|
223
236
|
const props = defineProps<{
|
|
@@ -253,6 +266,7 @@ const { state, hasUrl, onChangeState, parseUrlToList, parseListToUrl } =
|
|
|
253
266
|
bodyText: '',
|
|
254
267
|
responseText: '',
|
|
255
268
|
timeout: 3 * 1000,
|
|
269
|
+
delay: 0,
|
|
256
270
|
});
|
|
257
271
|
|
|
258
272
|
const {
|
|
@@ -338,6 +352,7 @@ function onConfirm() {
|
|
|
338
352
|
url: state.url,
|
|
339
353
|
method: state.method,
|
|
340
354
|
timeout: state.timeout,
|
|
355
|
+
delay: state.delay,
|
|
341
356
|
status: state.status as string,
|
|
342
357
|
time: '',
|
|
343
358
|
startTime: 0,
|
|
@@ -441,6 +456,7 @@ function handleInterceptConfig() {
|
|
|
441
456
|
state.url = props.network.url;
|
|
442
457
|
state.method = props.network.method?.toUpperCase() ?? 'GET';
|
|
443
458
|
state.status = props.network.status as string;
|
|
459
|
+
state.delay = props.network.delay ?? 0;
|
|
444
460
|
|
|
445
461
|
// 初始化请求头
|
|
446
462
|
const requestHeaders =
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
<script lang="ts" setup>
|
|
30
30
|
import { computed } from 'vue';
|
|
31
31
|
|
|
32
|
-
import Tag from '
|
|
33
|
-
import type { DevTool } from '
|
|
34
|
-
import { useI18n } from '
|
|
32
|
+
import Tag from '../../../components/Tag/index.vue';
|
|
33
|
+
import type { DevTool } from '../../../../type';
|
|
34
|
+
import { useI18n } from '../../../../i18n';
|
|
35
35
|
|
|
36
36
|
const { t } = useI18n();
|
|
37
37
|
const props = defineProps<{
|
|
@@ -1,22 +1,20 @@
|
|
|
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
7
|
v-for="item in translatedSelectItems"
|
|
8
8
|
:active="item.value === currentSelect"
|
|
9
9
|
:key="item.value"
|
|
10
10
|
customStyle="margin-left: 16px"
|
|
11
|
-
@click="onSelect(item)"
|
|
12
|
-
>
|
|
11
|
+
@click="onSelect(item)">
|
|
13
12
|
{{ item.label }}
|
|
14
13
|
</Tag>
|
|
15
14
|
<CircularButton
|
|
16
15
|
style="margin-left: auto"
|
|
17
16
|
text="×"
|
|
18
|
-
@click="emit('close')"
|
|
19
|
-
/>
|
|
17
|
+
@click="emit('close')" />
|
|
20
18
|
</view>
|
|
21
19
|
|
|
22
20
|
<scroll-view
|
|
@@ -24,13 +22,12 @@
|
|
|
24
22
|
class="network-detail-base"
|
|
25
23
|
:style="{ height: contentHeight - 32 + 'px' }"
|
|
26
24
|
v-if="currentSelect === 'base'"
|
|
27
|
-
@touchmove.stop
|
|
28
|
-
>
|
|
25
|
+
@touchmove.stop>
|
|
29
26
|
<!--
|
|
30
27
|
@touchmove.stop
|
|
31
28
|
[Intervention] Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted.
|
|
32
29
|
-->
|
|
33
|
-
<DevToolTitle>
|
|
30
|
+
<DevToolTitle>{{ t('network.general') }}</DevToolTitle>
|
|
34
31
|
<view class="net-detail-item">
|
|
35
32
|
<view class="net-detail-item-key">{{ t('network.requestUrl') }}:</view>
|
|
36
33
|
<view class="net-detail-url" @click="onClickUrl">
|
|
@@ -84,8 +81,7 @@
|
|
|
84
81
|
<view
|
|
85
82
|
class="net-detail-item"
|
|
86
83
|
v-for="item in network.headers.requestHeader"
|
|
87
|
-
:key="item.key"
|
|
88
|
-
>
|
|
84
|
+
:key="item.key">
|
|
89
85
|
<view class="net-detail-item-key">{{ item.key }}:</view>
|
|
90
86
|
{{ item.value }}
|
|
91
87
|
</view>
|
|
@@ -99,8 +95,7 @@
|
|
|
99
95
|
<view
|
|
100
96
|
class="net-detail-item"
|
|
101
97
|
v-for="item in network.headers.responseHeader"
|
|
102
|
-
:key="item.key"
|
|
103
|
-
>
|
|
98
|
+
:key="item.key">
|
|
104
99
|
<view class="net-detail-item-key">{{ item.key }}:</view>
|
|
105
100
|
{{ item.value }}
|
|
106
101
|
</view>
|
|
@@ -116,13 +111,11 @@
|
|
|
116
111
|
:data="payload.value"
|
|
117
112
|
:height="contentHeight - 32"
|
|
118
113
|
:nodeSelectable="() => false"
|
|
119
|
-
:pathCollapsible="() => false"
|
|
120
|
-
/>
|
|
114
|
+
:pathCollapsible="() => false" />
|
|
121
115
|
</template>
|
|
122
116
|
<view
|
|
123
117
|
v-else-if="payload?.type === 'string'"
|
|
124
|
-
class="network-detail-payload"
|
|
125
|
-
>
|
|
118
|
+
class="network-detail-payload">
|
|
126
119
|
{{ payload.value }}
|
|
127
120
|
</view>
|
|
128
121
|
<Empty v-else />
|
|
@@ -135,13 +128,11 @@
|
|
|
135
128
|
:data="response.value"
|
|
136
129
|
:height="contentHeight - 32"
|
|
137
130
|
:nodeSelectable="() => false"
|
|
138
|
-
:pathCollapsible="() => false"
|
|
139
|
-
/>
|
|
131
|
+
:pathCollapsible="() => false" />
|
|
140
132
|
</template>
|
|
141
133
|
<view
|
|
142
134
|
v-else-if="response?.type === 'string'"
|
|
143
|
-
class="network-detail-payload"
|
|
144
|
-
>
|
|
135
|
+
class="network-detail-payload">
|
|
145
136
|
{{ response.value }}
|
|
146
137
|
</view>
|
|
147
138
|
<Empty v-else />
|
|
@@ -150,14 +141,14 @@
|
|
|
150
141
|
</template>
|
|
151
142
|
<script lang="ts" setup>
|
|
152
143
|
import { ref, computed } from 'vue';
|
|
153
|
-
import JsonPretty from '
|
|
154
|
-
import Tag from '
|
|
155
|
-
import Empty from '
|
|
156
|
-
import CircularButton from '
|
|
144
|
+
import JsonPretty from '../../../components/JsonPretty/index.vue';
|
|
145
|
+
import Tag from '../../../components/Tag/index.vue';
|
|
146
|
+
import Empty from '../../../components/Empty/index.vue';
|
|
147
|
+
import CircularButton from '../../../components/CircularButton/index.vue';
|
|
157
148
|
import DevToolTitle from '../DevToolTitle/index.vue';
|
|
158
|
-
import type { DevTool } from '
|
|
159
|
-
import { formatDate } from '
|
|
160
|
-
import { useI18n } from '
|
|
149
|
+
import type { DevTool } from '../../../../type';
|
|
150
|
+
import { formatDate } from '../../../../utils';
|
|
151
|
+
import { useI18n } from '../../../../i18n';
|
|
161
152
|
|
|
162
153
|
const { t } = useI18n();
|
|
163
154
|
const props = defineProps<{
|
|
@@ -5,34 +5,29 @@
|
|
|
5
5
|
<CircularButton
|
|
6
6
|
style="margin-left: auto"
|
|
7
7
|
text="+"
|
|
8
|
-
@click="emit('openConfig')"
|
|
9
|
-
/>
|
|
8
|
+
@click="emit('openConfig')" />
|
|
10
9
|
<CircularButton
|
|
11
10
|
style="margin-left: 6px"
|
|
12
11
|
text="×"
|
|
13
|
-
@click="emit('close')"
|
|
14
|
-
/>
|
|
12
|
+
@click="emit('close')" />
|
|
15
13
|
</view>
|
|
16
14
|
<VirtualList
|
|
17
15
|
class="network-intercept-list"
|
|
18
16
|
:data="interceptNetworkList"
|
|
19
17
|
:pageSize="15"
|
|
20
18
|
:height="contentHeight - 32 - 32"
|
|
21
|
-
v-if="interceptNetworkList && interceptNetworkList.length > 0"
|
|
22
|
-
>
|
|
19
|
+
v-if="interceptNetworkList && interceptNetworkList.length > 0">
|
|
23
20
|
<template v-slot="{ list, start, itemsHeight, onSizeChange }">
|
|
24
21
|
<AutoSize
|
|
25
22
|
v-for="(item, index) in list"
|
|
26
23
|
:index="start + index"
|
|
27
24
|
:key="start + index"
|
|
28
25
|
:itemsHeight="itemsHeight"
|
|
29
|
-
:onSizeChange="onSizeChange"
|
|
30
|
-
>
|
|
26
|
+
:onSizeChange="onSizeChange">
|
|
31
27
|
<InterceptItem
|
|
32
28
|
:network="item"
|
|
33
29
|
@openConfig="emit('openConfig', $event)"
|
|
34
|
-
@remove="emit('remove', $event)"
|
|
35
|
-
/>
|
|
30
|
+
@remove="emit('remove', $event)" />
|
|
36
31
|
</AutoSize>
|
|
37
32
|
</template>
|
|
38
33
|
</VirtualList>
|
|
@@ -40,14 +35,14 @@
|
|
|
40
35
|
</view>
|
|
41
36
|
</template>
|
|
42
37
|
<script lang="ts" setup>
|
|
43
|
-
import type { DevTool } from '
|
|
44
|
-
import CircularButton from '
|
|
38
|
+
import type { DevTool } from '../../../../type';
|
|
39
|
+
import CircularButton from '../../../components/CircularButton/index.vue';
|
|
45
40
|
import DevToolTitle from '../DevToolTitle/index.vue';
|
|
46
41
|
import InterceptItem from './InterceptItem.vue';
|
|
47
|
-
import VirtualList from '
|
|
48
|
-
import AutoSize from '
|
|
49
|
-
import Empty from '
|
|
50
|
-
import { useI18n } from '
|
|
42
|
+
import VirtualList from '../../../components/VirtualList/index.vue';
|
|
43
|
+
import AutoSize from '../../../components/VirtualList/AutoSize.vue';
|
|
44
|
+
import Empty from '../../../components/Empty/index.vue';
|
|
45
|
+
import { useI18n } from '../../../../i18n';
|
|
51
46
|
|
|
52
47
|
const { t } = useI18n();
|
|
53
48
|
|
|
@@ -10,9 +10,7 @@
|
|
|
10
10
|
<view
|
|
11
11
|
class="network-url"
|
|
12
12
|
v-html="network.url"
|
|
13
|
-
@click="emit('openDetail')"
|
|
14
|
-
>
|
|
15
|
-
</view>
|
|
13
|
+
@click="emit('openDetail')"></view>
|
|
16
14
|
|
|
17
15
|
<Tag mode="main" class="network-detail-icon" @click.stop="emit('resend')">
|
|
18
16
|
{{ t('network.resend') }}
|
|
@@ -42,16 +40,14 @@
|
|
|
42
40
|
</view>
|
|
43
41
|
<view
|
|
44
42
|
class="network-time-line"
|
|
45
|
-
:style="`width: ${network.width}; left: ${network.left};`"
|
|
46
|
-
></view>
|
|
43
|
+
:style="`width: ${network.width}; left: ${network.left};`"></view>
|
|
47
44
|
|
|
48
|
-
<view class="network-sponsor"
|
|
49
|
-
|
|
50
|
-
>
|
|
45
|
+
<view class="network-sponsor">
|
|
46
|
+
{{ t('network.sponsor') }}:{{ network?.sponsor }}
|
|
47
|
+
</view>
|
|
51
48
|
<view
|
|
52
49
|
:class="`network-stock ${isUseDevSource ? 'network-stock-link' : ''}`"
|
|
53
|
-
@click.stop="emit('openCode', network.stack)"
|
|
54
|
-
>
|
|
50
|
+
@click.stop="emit('openCode', network.stack)">
|
|
55
51
|
{{ network?.stack }}
|
|
56
52
|
</view>
|
|
57
53
|
</view>
|
|
@@ -60,10 +56,10 @@
|
|
|
60
56
|
<script lang="ts" setup>
|
|
61
57
|
import { computed } from 'vue';
|
|
62
58
|
import { sortMap } from './const';
|
|
63
|
-
import Tag from '
|
|
64
|
-
import { formatDate, isMockWX } from '
|
|
65
|
-
import type { DevTool } from '
|
|
66
|
-
import { useI18n } from '
|
|
59
|
+
import Tag from '../../../components/Tag/index.vue';
|
|
60
|
+
import { formatDate, isMockWX } from '../../../../utils';
|
|
61
|
+
import type { DevTool } from '../../../../type';
|
|
62
|
+
import { useI18n } from '../../../../i18n';
|
|
67
63
|
|
|
68
64
|
const { t } = useI18n();
|
|
69
65
|
|