vite-uni-dev-tool 1.1.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 +8 -0
- package/dist/const.cjs +1 -1
- package/dist/const.d.ts +1 -0
- package/dist/const.d.ts.map +1 -1
- package/dist/const.js +1 -1
- 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 +5 -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 +5 -0
- package/dist/i18n/locales/zh-Hans.d.ts.map +1 -1
- package/dist/i18n/locales/zh-Hans.js +1 -1
- package/dist/modules/devIntercept/index.cjs +9 -9
- package/dist/modules/devIntercept/index.d.ts +1 -1
- package/dist/modules/devIntercept/index.d.ts.map +1 -1
- package/dist/modules/devIntercept/index.js +9 -9
- package/dist/modules/devStore/index.cjs +1 -1
- 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 +3 -0
- package/dist/type.d.ts.map +1 -1
- package/dist/v3/DevTool/components/BluetoothList/BluetoothItem.vue +199 -199
- package/dist/v3/DevTool/components/BluetoothList/BluetoothTool.vue +730 -730
- package/dist/v3/DevTool/components/BluetoothList/index.vue +167 -167
- package/dist/v3/DevTool/components/CaptureScreen/index.vue +109 -109
- package/dist/v3/DevTool/components/ConsoleList/ConsoleItem.vue +230 -225
- package/dist/v3/DevTool/components/ConsoleList/RunJSInput.vue +247 -247
- package/dist/v3/DevTool/components/ConsoleList/index.vue +171 -171
- package/dist/v3/DevTool/components/ConsoleList/staticTips.ts +1145 -1145
- package/dist/v3/DevTool/components/DevToolTitle/index.vue +24 -24
- package/dist/v3/DevTool/components/DevToolWindow/DevToolOverlay.vue +197 -197
- package/dist/v3/DevTool/components/DevToolWindow/hooks/dataUtils.ts +48 -48
- package/dist/v3/DevTool/components/DevToolWindow/hooks/useDevToolData.ts +387 -387
- package/dist/v3/DevTool/components/DevToolWindow/hooks/useDevToolHandlers.ts +629 -629
- package/dist/v3/DevTool/components/DevToolWindow/hooks/useDevToolOverlay.ts +201 -197
- package/dist/v3/DevTool/components/ElEvent/ElEventItem.vue +105 -105
- package/dist/v3/DevTool/components/ElEvent/index.vue +106 -106
- package/dist/v3/DevTool/components/Instance/components/InstanceTreeNode.vue +265 -265
- package/dist/v3/DevTool/components/Instance/flatten.ts +226 -226
- package/dist/v3/DevTool/components/Instance/index.vue +94 -94
- package/dist/v3/DevTool/components/Instance/registry.ts +49 -49
- package/dist/v3/DevTool/components/Instance/transformTree.ts +375 -375
- package/dist/v3/DevTool/components/Instance/transformTreeCtx.ts +268 -268
- package/dist/v3/DevTool/components/Instance/typing.d.ts +43 -43
- package/dist/v3/DevTool/components/InstanceDetail/index.vue +485 -485
- package/dist/v3/DevTool/components/JsonDetail/index.vue +70 -70
- package/dist/v3/DevTool/components/NFCList/NFCItem.vue +112 -112
- package/dist/v3/DevTool/components/NFCList/NFCTool.vue +454 -454
- package/dist/v3/DevTool/components/NFCList/const.ts +56 -56
- package/dist/v3/DevTool/components/NFCList/index.vue +94 -94
- package/dist/v3/DevTool/components/NetworkList/InterceptConfig.vue +624 -624
- package/dist/v3/DevTool/components/NetworkList/InterceptItem.vue +140 -140
- package/dist/v3/DevTool/components/NetworkList/NetworkDetail.vue +287 -287
- package/dist/v3/DevTool/components/NetworkList/NetworkIntercept.vue +88 -88
- package/dist/v3/DevTool/components/NetworkList/NetworkItem.vue +163 -163
- package/dist/v3/DevTool/components/NetworkList/NetworkSend.vue +589 -589
- package/dist/v3/DevTool/components/NetworkList/const.ts +4 -4
- package/dist/v3/DevTool/components/NetworkList/hooks/useNetworkForm.ts +86 -86
- package/dist/v3/DevTool/components/NetworkList/index.vue +160 -160
- package/dist/v3/DevTool/components/NetworkList/utils.ts +101 -101
- package/dist/v3/DevTool/components/Performance/index.vue +498 -498
- package/dist/v3/DevTool/components/Performance/modules/PerformanceMetrics.vue +153 -153
- package/dist/v3/DevTool/components/Performance/modules/usePerformanceChart.ts +460 -460
- package/dist/v3/DevTool/components/Performance/modules/usePerformanceData.ts +258 -258
- package/dist/v3/DevTool/components/PiniaList/index.vue +93 -93
- package/dist/v3/DevTool/components/RunJS/index.vue +148 -148
- package/dist/v3/DevTool/components/ScanCodeList/ScanCodeItem.vue +97 -97
- package/dist/v3/DevTool/components/ScanCodeList/index.vue +100 -100
- package/dist/v3/DevTool/components/SettingButton/index.vue +45 -45
- package/dist/v3/DevTool/components/SettingList/index.vue +218 -218
- package/dist/v3/DevTool/components/SettingList/modules/SettingBarrage.vue +304 -304
- package/dist/v3/DevTool/components/SettingList/modules/SettingDevTool.vue +212 -212
- package/dist/v3/DevTool/components/SettingList/modules/SettingInfo.vue +157 -157
- package/dist/v3/DevTool/components/SettingList/modules/SettingLanguage.vue +74 -74
- package/dist/v3/DevTool/components/SettingList/modules/SettingLog.vue +230 -230
- package/dist/v3/DevTool/components/SettingList/typing.d.ts +2 -2
- package/dist/v3/DevTool/components/SourceCode/Line.vue +127 -127
- package/dist/v3/DevTool/components/SourceCode/parseCode.ts +609 -609
- package/dist/v3/DevTool/components/StorageList/index.vue +174 -174
- package/dist/v3/DevTool/components/TransferList/TransferDetail.vue +268 -268
- package/dist/v3/DevTool/components/VuexList/index.vue +84 -84
- package/dist/v3/DevTool/index.vue +1 -0
- package/dist/v3/components/AppTransition/index.vue +176 -176
- package/dist/v3/components/AutoSizer/index.vue +192 -192
- package/dist/v3/components/AutoSizer/index1.vue +184 -184
- package/dist/v3/components/AutoSizer/utils.ts +49 -49
- package/dist/v3/components/Barrage/BarrageItem.vue +137 -137
- package/dist/v3/components/Barrage/index.vue +202 -202
- package/dist/v3/components/CircularButton/index.vue +84 -84
- package/dist/v3/components/CustomSwiper/CustomSwiperItem.vue +49 -49
- package/dist/v3/components/CustomSwiper/index.vue +104 -104
- package/dist/v3/components/DevErrorBoundary/index.vue +380 -0
- package/dist/v3/components/Empty/index.vue +29 -29
- package/dist/v3/components/FilterSelect/index.vue +179 -179
- package/dist/v3/components/JsonPretty/components/Brackets/index.vue +27 -27
- package/dist/v3/components/JsonPretty/components/Carets/index.vue +59 -59
- package/dist/v3/components/JsonPretty/components/CheckController/index.vue +136 -136
- package/dist/v3/components/JsonPretty/components/TreeNode/index.vue +387 -387
- package/dist/v3/components/JsonPretty/hooks/useClipboard.ts +21 -21
- package/dist/v3/components/JsonPretty/hooks/useError.ts +21 -21
- package/dist/v3/components/JsonPretty/type.ts +127 -127
- package/dist/v3/components/JsonPretty/utils/index.ts +169 -169
- package/dist/v3/components/MovableContainer/index.vue +8 -4
- package/dist/v3/components/Pick/index.vue +322 -322
- package/dist/v3/components/Tag/index.vue +113 -113
- package/dist/v3/components/VirtualList/AutoSize.vue +40 -40
- package/dist/v3/components/VirtualList/index.vue +416 -416
- package/dist/v3/hooks/useBluetooth/index.ts +561 -561
- package/dist/v3/hooks/useContainerStyle.ts +153 -153
- package/dist/v3/hooks/useNFC/index.ts +107 -107
- package/dist/v3/hooks/useNFC/typing.d.ts +396 -396
- package/dist/v3/hooks/useNFC/useNFCAndroid.ts +966 -966
- package/dist/v3/hooks/useNFC/useNFCMpWeiXin.ts +812 -812
- package/dist/v3/hooks/useNFC/utils.ts +754 -754
- package/dist/v3/hooks/useRequest/index.ts +586 -586
- package/dist/v3/hooks/useRequest/utils.ts +267 -267
- package/dist/v3/hooks/useScanCode/index.ts +206 -206
- package/dist/v3/hooks/useWebsocket/index.ts +253 -253
- package/dist/v3/styles/theme.ts +12 -12
- package/package.json +9 -1
|
@@ -1,218 +1,218 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<scroll-view
|
|
3
|
-
class="setting-content"
|
|
4
|
-
scroll-y
|
|
5
|
-
:style="{ height: contentHeight - 32 + 'px' }">
|
|
6
|
-
<SettingLanguage :theme="theme" @restart-app="onRestartAppWithConfirm" />
|
|
7
|
-
<SettingDevTool
|
|
8
|
-
:theme="theme"
|
|
9
|
-
:dev-tool-visible="devToolVisible"
|
|
10
|
-
:size-format="sizeFormat"
|
|
11
|
-
:build-info="buildInfo"
|
|
12
|
-
@show-dev-button="onShowDevButton"
|
|
13
|
-
@restart-dev-tool="onRestartDevTool"
|
|
14
|
-
@restart-app="onRestartAppWithConfirm"
|
|
15
|
-
@clear-cache="onClearCache"
|
|
16
|
-
@destroy-dev-tool="onDestroyDevTool" />
|
|
17
|
-
<SettingNetwork
|
|
18
|
-
:theme="theme"
|
|
19
|
-
:net-work-status="netWorkStatus"
|
|
20
|
-
:cache-intercept-config="cacheInterceptConfig"
|
|
21
|
-
:cache-network-log="cacheNetworkLog"
|
|
22
|
-
@change-cache-intercept-config="onChangeCacheInterceptConfig"
|
|
23
|
-
@change-cache-network-log="onChangeCacheNetworkLog" />
|
|
24
|
-
<SettingTheme
|
|
25
|
-
:theme="theme"
|
|
26
|
-
:use-transition="useTransition"
|
|
27
|
-
:base-font-size="baseFontSize"
|
|
28
|
-
:tag-font-size="tagFontSize"
|
|
29
|
-
:tips-font-size="tipsFontSize"
|
|
30
|
-
:font-family="fontFamily"
|
|
31
|
-
:font-weight="fontWeight"
|
|
32
|
-
@change-theme="onChangeTheme"
|
|
33
|
-
@change-use-transition="onChangeUseTransition"
|
|
34
|
-
@change-font="onChangeFont"
|
|
35
|
-
@restart-app="onRestartAppWithConfirm" />
|
|
36
|
-
<SettingInfo :theme="theme" @open-json="onOpenJson" />
|
|
37
|
-
<SettingLog
|
|
38
|
-
:theme="theme"
|
|
39
|
-
:cache-console-log="cacheConsoleLog"
|
|
40
|
-
@export-log="onExportLog"
|
|
41
|
-
@change-cache-console-log="onChangeCacheConsoleLog" />
|
|
42
|
-
<SettingBarrage
|
|
43
|
-
:theme="theme"
|
|
44
|
-
:barrage-visible="barrageVisible"
|
|
45
|
-
:barrage-max-tracks="barrageMaxTracks"
|
|
46
|
-
:barrage-track-height="barrageTrackHeight"
|
|
47
|
-
:barrage-start-top="barrageStartTop"
|
|
48
|
-
:barrage-duration="barrageDuration"
|
|
49
|
-
:barrage-max-length="barrageMaxLength"
|
|
50
|
-
:barrage-types="barrageTypes"
|
|
51
|
-
:barrage-show-when-open="barrageShowWhenOpen"
|
|
52
|
-
:sizeFormat="sizeFormat"
|
|
53
|
-
@change-barrage="onChangeBarrage"
|
|
54
|
-
@change-barrage-max-tracks="onChangeBarrageMaxTracks"
|
|
55
|
-
@change-barrage-track-height="onChangeBarrageTrackHeight"
|
|
56
|
-
@change-barrage-start-top="onChangeBarrageStartTop"
|
|
57
|
-
@change-barrage-duration="onChangeBarrageDuration"
|
|
58
|
-
@change-barrage-max-length="onChangeBarrageMaxLength"
|
|
59
|
-
@change-barrage-types="onChangeBarrageTypes"
|
|
60
|
-
@change-barrage-show-when-open="onChangeBarrageShowWhenOpen" />
|
|
61
|
-
</scroll-view>
|
|
62
|
-
</template>
|
|
63
|
-
|
|
64
|
-
<script lang="ts" setup>
|
|
65
|
-
import SettingLanguage from './modules/SettingLanguage.vue';
|
|
66
|
-
import SettingDevTool from './modules/SettingDevTool.vue';
|
|
67
|
-
import SettingNetwork from './modules/SettingNetwork.vue';
|
|
68
|
-
import SettingTheme from './modules/SettingTheme.vue';
|
|
69
|
-
import SettingInfo from './modules/SettingInfo.vue';
|
|
70
|
-
import SettingLog from './modules/SettingLog.vue';
|
|
71
|
-
import SettingBarrage from './modules/SettingBarrage.vue';
|
|
72
|
-
|
|
73
|
-
defineProps<{
|
|
74
|
-
theme?: string; // Added theme prop here as per instruction for SettingLanguage
|
|
75
|
-
devToolVisible?: boolean;
|
|
76
|
-
sizeFormat?: string;
|
|
77
|
-
cacheInterceptConfig?: boolean;
|
|
78
|
-
cacheNetworkLog?: boolean;
|
|
79
|
-
cacheConsoleLog?: boolean;
|
|
80
|
-
barrageVisible?: boolean;
|
|
81
|
-
useTransition?: boolean;
|
|
82
|
-
baseFontSize?: number;
|
|
83
|
-
tagFontSize?: number;
|
|
84
|
-
tipsFontSize?: number;
|
|
85
|
-
fontFamily?: string;
|
|
86
|
-
fontWeight?: string;
|
|
87
|
-
barrageMaxTracks?: number; // 新增
|
|
88
|
-
barrageTrackHeight?: number; // 新增
|
|
89
|
-
barrageStartTop?: number; // 新增
|
|
90
|
-
barrageDuration?: number; // 时长
|
|
91
|
-
barrageMaxLength?: number; // 长度
|
|
92
|
-
barrageTypes?: string[]; // 类型
|
|
93
|
-
barrageShowWhenOpen?: boolean;
|
|
94
|
-
buildInfo?: {
|
|
95
|
-
devToolVersion?: string;
|
|
96
|
-
devToolBuildTime?: string;
|
|
97
|
-
devToolGit?: string;
|
|
98
|
-
};
|
|
99
|
-
netWorkStatus: {
|
|
100
|
-
isConnected?: boolean;
|
|
101
|
-
networkType?: string;
|
|
102
|
-
ip?: string;
|
|
103
|
-
};
|
|
104
|
-
contentHeight: number;
|
|
105
|
-
}>();
|
|
106
|
-
|
|
107
|
-
const emit = defineEmits<{
|
|
108
|
-
(e: 'showDevButton', show: boolean): void;
|
|
109
|
-
(e: 'restartDevTool'): void;
|
|
110
|
-
(e: 'restartApp', confirm?: boolean): void;
|
|
111
|
-
(e: 'exportLog', params: any): void;
|
|
112
|
-
(e: 'clearCache'): void;
|
|
113
|
-
(e: 'destroyDevTool'): void;
|
|
114
|
-
(e: 'changeTheme', theme: string): void;
|
|
115
|
-
(e: 'change-cache-intercept-config', value: boolean): void;
|
|
116
|
-
(e: 'change-cache-network-log', value: boolean): void;
|
|
117
|
-
(e: 'change-cache-console-log', value: boolean): void;
|
|
118
|
-
(e: 'change-barrage', value: boolean): void;
|
|
119
|
-
(e: 'change-barrage-max-tracks', value: number): void;
|
|
120
|
-
(e: 'change-barrage-track-height', value: number): void;
|
|
121
|
-
(e: 'change-barrage-start-top', value: number): void;
|
|
122
|
-
(e: 'change-barrage-duration', value: number): void;
|
|
123
|
-
(e: 'change-barrage-max-length', value: number): void;
|
|
124
|
-
(e: 'change-barrage-types', value: string[]): void;
|
|
125
|
-
(e: 'change-barrage-show-when-open', value: boolean): void;
|
|
126
|
-
(e: 'change-use-transition', value: boolean): void;
|
|
127
|
-
(e: 'changeFont', data: any): void;
|
|
128
|
-
(e: 'openJson', data: any): void;
|
|
129
|
-
}>();
|
|
130
|
-
|
|
131
|
-
function onShowDevButton(v: boolean) {
|
|
132
|
-
emit('showDevButton', v);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
function onRestartDevTool() {
|
|
136
|
-
emit('restartDevTool');
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
function onRestartAppWithConfirm() {
|
|
140
|
-
emit('restartApp', true);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
function onClearCache() {
|
|
144
|
-
emit('clearCache');
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
function onDestroyDevTool() {
|
|
148
|
-
emit('destroyDevTool');
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
function onChangeCacheInterceptConfig(v: boolean) {
|
|
152
|
-
emit('change-cache-intercept-config', v);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
function onChangeCacheNetworkLog(v: boolean) {
|
|
156
|
-
emit('change-cache-network-log', v);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
function onChangeCacheConsoleLog(v: boolean) {
|
|
160
|
-
emit('change-cache-console-log', v);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
function onChangeBarrageDuration(v: number) {
|
|
164
|
-
emit('change-barrage-duration', v);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
function onChangeBarrageMaxLength(v: number) {
|
|
168
|
-
emit('change-barrage-max-length', v);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
function onChangeBarrageTypes(v: string[]) {
|
|
172
|
-
emit('change-barrage-types', v);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
function onChangeBarrageShowWhenOpen(v: boolean) {
|
|
176
|
-
emit('change-barrage-show-when-open', v);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
function onChangeBarrage(v: boolean) {
|
|
180
|
-
emit('change-barrage', v);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
function onChangeBarrageMaxTracks(v: number) {
|
|
184
|
-
emit('change-barrage-max-tracks', v);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
function onChangeBarrageTrackHeight(v: number) {
|
|
188
|
-
emit('change-barrage-track-height', v);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
function onChangeBarrageStartTop(v: number) {
|
|
192
|
-
emit('change-barrage-start-top', v);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
function onChangeTheme(v: string) {
|
|
196
|
-
emit('changeTheme', v);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
function onChangeUseTransition(v: boolean) {
|
|
200
|
-
emit('change-use-transition', v);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
function onChangeFont(v: any) {
|
|
204
|
-
emit('changeFont', v);
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
function onOpenJson(v: any) {
|
|
208
|
-
emit('openJson', v);
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
function onExportLog(v: any) {
|
|
212
|
-
emit('exportLog', v);
|
|
213
|
-
}
|
|
214
|
-
</script>
|
|
215
|
-
|
|
216
|
-
<style scoped>
|
|
217
|
-
@import './index.css';
|
|
218
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<scroll-view
|
|
3
|
+
class="setting-content"
|
|
4
|
+
scroll-y
|
|
5
|
+
:style="{ height: contentHeight - 32 + 'px' }">
|
|
6
|
+
<SettingLanguage :theme="theme" @restart-app="onRestartAppWithConfirm" />
|
|
7
|
+
<SettingDevTool
|
|
8
|
+
:theme="theme"
|
|
9
|
+
:dev-tool-visible="devToolVisible"
|
|
10
|
+
:size-format="sizeFormat"
|
|
11
|
+
:build-info="buildInfo"
|
|
12
|
+
@show-dev-button="onShowDevButton"
|
|
13
|
+
@restart-dev-tool="onRestartDevTool"
|
|
14
|
+
@restart-app="onRestartAppWithConfirm"
|
|
15
|
+
@clear-cache="onClearCache"
|
|
16
|
+
@destroy-dev-tool="onDestroyDevTool" />
|
|
17
|
+
<SettingNetwork
|
|
18
|
+
:theme="theme"
|
|
19
|
+
:net-work-status="netWorkStatus"
|
|
20
|
+
:cache-intercept-config="cacheInterceptConfig"
|
|
21
|
+
:cache-network-log="cacheNetworkLog"
|
|
22
|
+
@change-cache-intercept-config="onChangeCacheInterceptConfig"
|
|
23
|
+
@change-cache-network-log="onChangeCacheNetworkLog" />
|
|
24
|
+
<SettingTheme
|
|
25
|
+
:theme="theme"
|
|
26
|
+
:use-transition="useTransition"
|
|
27
|
+
:base-font-size="baseFontSize"
|
|
28
|
+
:tag-font-size="tagFontSize"
|
|
29
|
+
:tips-font-size="tipsFontSize"
|
|
30
|
+
:font-family="fontFamily"
|
|
31
|
+
:font-weight="fontWeight"
|
|
32
|
+
@change-theme="onChangeTheme"
|
|
33
|
+
@change-use-transition="onChangeUseTransition"
|
|
34
|
+
@change-font="onChangeFont"
|
|
35
|
+
@restart-app="onRestartAppWithConfirm" />
|
|
36
|
+
<SettingInfo :theme="theme" @open-json="onOpenJson" />
|
|
37
|
+
<SettingLog
|
|
38
|
+
:theme="theme"
|
|
39
|
+
:cache-console-log="cacheConsoleLog"
|
|
40
|
+
@export-log="onExportLog"
|
|
41
|
+
@change-cache-console-log="onChangeCacheConsoleLog" />
|
|
42
|
+
<SettingBarrage
|
|
43
|
+
:theme="theme"
|
|
44
|
+
:barrage-visible="barrageVisible"
|
|
45
|
+
:barrage-max-tracks="barrageMaxTracks"
|
|
46
|
+
:barrage-track-height="barrageTrackHeight"
|
|
47
|
+
:barrage-start-top="barrageStartTop"
|
|
48
|
+
:barrage-duration="barrageDuration"
|
|
49
|
+
:barrage-max-length="barrageMaxLength"
|
|
50
|
+
:barrage-types="barrageTypes"
|
|
51
|
+
:barrage-show-when-open="barrageShowWhenOpen"
|
|
52
|
+
:sizeFormat="sizeFormat"
|
|
53
|
+
@change-barrage="onChangeBarrage"
|
|
54
|
+
@change-barrage-max-tracks="onChangeBarrageMaxTracks"
|
|
55
|
+
@change-barrage-track-height="onChangeBarrageTrackHeight"
|
|
56
|
+
@change-barrage-start-top="onChangeBarrageStartTop"
|
|
57
|
+
@change-barrage-duration="onChangeBarrageDuration"
|
|
58
|
+
@change-barrage-max-length="onChangeBarrageMaxLength"
|
|
59
|
+
@change-barrage-types="onChangeBarrageTypes"
|
|
60
|
+
@change-barrage-show-when-open="onChangeBarrageShowWhenOpen" />
|
|
61
|
+
</scroll-view>
|
|
62
|
+
</template>
|
|
63
|
+
|
|
64
|
+
<script lang="ts" setup>
|
|
65
|
+
import SettingLanguage from './modules/SettingLanguage.vue';
|
|
66
|
+
import SettingDevTool from './modules/SettingDevTool.vue';
|
|
67
|
+
import SettingNetwork from './modules/SettingNetwork.vue';
|
|
68
|
+
import SettingTheme from './modules/SettingTheme.vue';
|
|
69
|
+
import SettingInfo from './modules/SettingInfo.vue';
|
|
70
|
+
import SettingLog from './modules/SettingLog.vue';
|
|
71
|
+
import SettingBarrage from './modules/SettingBarrage.vue';
|
|
72
|
+
|
|
73
|
+
defineProps<{
|
|
74
|
+
theme?: string; // Added theme prop here as per instruction for SettingLanguage
|
|
75
|
+
devToolVisible?: boolean;
|
|
76
|
+
sizeFormat?: string;
|
|
77
|
+
cacheInterceptConfig?: boolean;
|
|
78
|
+
cacheNetworkLog?: boolean;
|
|
79
|
+
cacheConsoleLog?: boolean;
|
|
80
|
+
barrageVisible?: boolean;
|
|
81
|
+
useTransition?: boolean;
|
|
82
|
+
baseFontSize?: number;
|
|
83
|
+
tagFontSize?: number;
|
|
84
|
+
tipsFontSize?: number;
|
|
85
|
+
fontFamily?: string;
|
|
86
|
+
fontWeight?: string;
|
|
87
|
+
barrageMaxTracks?: number; // 新增
|
|
88
|
+
barrageTrackHeight?: number; // 新增
|
|
89
|
+
barrageStartTop?: number; // 新增
|
|
90
|
+
barrageDuration?: number; // 时长
|
|
91
|
+
barrageMaxLength?: number; // 长度
|
|
92
|
+
barrageTypes?: string[]; // 类型
|
|
93
|
+
barrageShowWhenOpen?: boolean;
|
|
94
|
+
buildInfo?: {
|
|
95
|
+
devToolVersion?: string;
|
|
96
|
+
devToolBuildTime?: string;
|
|
97
|
+
devToolGit?: string;
|
|
98
|
+
};
|
|
99
|
+
netWorkStatus: {
|
|
100
|
+
isConnected?: boolean;
|
|
101
|
+
networkType?: string;
|
|
102
|
+
ip?: string;
|
|
103
|
+
};
|
|
104
|
+
contentHeight: number;
|
|
105
|
+
}>();
|
|
106
|
+
|
|
107
|
+
const emit = defineEmits<{
|
|
108
|
+
(e: 'showDevButton', show: boolean): void;
|
|
109
|
+
(e: 'restartDevTool'): void;
|
|
110
|
+
(e: 'restartApp', confirm?: boolean): void;
|
|
111
|
+
(e: 'exportLog', params: any): void;
|
|
112
|
+
(e: 'clearCache'): void;
|
|
113
|
+
(e: 'destroyDevTool'): void;
|
|
114
|
+
(e: 'changeTheme', theme: string): void;
|
|
115
|
+
(e: 'change-cache-intercept-config', value: boolean): void;
|
|
116
|
+
(e: 'change-cache-network-log', value: boolean): void;
|
|
117
|
+
(e: 'change-cache-console-log', value: boolean): void;
|
|
118
|
+
(e: 'change-barrage', value: boolean): void;
|
|
119
|
+
(e: 'change-barrage-max-tracks', value: number): void;
|
|
120
|
+
(e: 'change-barrage-track-height', value: number): void;
|
|
121
|
+
(e: 'change-barrage-start-top', value: number): void;
|
|
122
|
+
(e: 'change-barrage-duration', value: number): void;
|
|
123
|
+
(e: 'change-barrage-max-length', value: number): void;
|
|
124
|
+
(e: 'change-barrage-types', value: string[]): void;
|
|
125
|
+
(e: 'change-barrage-show-when-open', value: boolean): void;
|
|
126
|
+
(e: 'change-use-transition', value: boolean): void;
|
|
127
|
+
(e: 'changeFont', data: any): void;
|
|
128
|
+
(e: 'openJson', data: any): void;
|
|
129
|
+
}>();
|
|
130
|
+
|
|
131
|
+
function onShowDevButton(v: boolean) {
|
|
132
|
+
emit('showDevButton', v);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
function onRestartDevTool() {
|
|
136
|
+
emit('restartDevTool');
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function onRestartAppWithConfirm() {
|
|
140
|
+
emit('restartApp', true);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function onClearCache() {
|
|
144
|
+
emit('clearCache');
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function onDestroyDevTool() {
|
|
148
|
+
emit('destroyDevTool');
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function onChangeCacheInterceptConfig(v: boolean) {
|
|
152
|
+
emit('change-cache-intercept-config', v);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function onChangeCacheNetworkLog(v: boolean) {
|
|
156
|
+
emit('change-cache-network-log', v);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
function onChangeCacheConsoleLog(v: boolean) {
|
|
160
|
+
emit('change-cache-console-log', v);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
function onChangeBarrageDuration(v: number) {
|
|
164
|
+
emit('change-barrage-duration', v);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
function onChangeBarrageMaxLength(v: number) {
|
|
168
|
+
emit('change-barrage-max-length', v);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
function onChangeBarrageTypes(v: string[]) {
|
|
172
|
+
emit('change-barrage-types', v);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
function onChangeBarrageShowWhenOpen(v: boolean) {
|
|
176
|
+
emit('change-barrage-show-when-open', v);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function onChangeBarrage(v: boolean) {
|
|
180
|
+
emit('change-barrage', v);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
function onChangeBarrageMaxTracks(v: number) {
|
|
184
|
+
emit('change-barrage-max-tracks', v);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
function onChangeBarrageTrackHeight(v: number) {
|
|
188
|
+
emit('change-barrage-track-height', v);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
function onChangeBarrageStartTop(v: number) {
|
|
192
|
+
emit('change-barrage-start-top', v);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
function onChangeTheme(v: string) {
|
|
196
|
+
emit('changeTheme', v);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
function onChangeUseTransition(v: boolean) {
|
|
200
|
+
emit('change-use-transition', v);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
function onChangeFont(v: any) {
|
|
204
|
+
emit('changeFont', v);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
function onOpenJson(v: any) {
|
|
208
|
+
emit('openJson', v);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
function onExportLog(v: any) {
|
|
212
|
+
emit('exportLog', v);
|
|
213
|
+
}
|
|
214
|
+
</script>
|
|
215
|
+
|
|
216
|
+
<style scoped>
|
|
217
|
+
@import './index.css';
|
|
218
|
+
</style>
|