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
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<slot v-if="!hasError"></slot>
|
|
3
|
+
<view v-else class="dev-error-boundary">
|
|
4
|
+
<view class="dev-error-card">
|
|
5
|
+
<view class="dev-error-header">
|
|
6
|
+
<view class="dev-error-icon-wrapper">
|
|
7
|
+
<view class="dev-error-icon">!</view>
|
|
8
|
+
<view class="dev-error-icon-pulse"></view>
|
|
9
|
+
</view>
|
|
10
|
+
<view class="dev-error-title-box">
|
|
11
|
+
<text class="dev-error-title">{{ t('errorBoundary.title') }}</text>
|
|
12
|
+
<text class="dev-error-subtitle">Runtime Exception Isolated</text>
|
|
13
|
+
</view>
|
|
14
|
+
</view>
|
|
15
|
+
|
|
16
|
+
<view class="dev-error-body">
|
|
17
|
+
<view class="dev-error-msg-container">
|
|
18
|
+
<view class="dev-error-msg-header">
|
|
19
|
+
<text class="dev-error-msg-label">StackTrace</text>
|
|
20
|
+
<view class="dev-error-copy" @tap="copyError">
|
|
21
|
+
<text class="dev-error-copy-text">Copy</text>
|
|
22
|
+
</view>
|
|
23
|
+
</view>
|
|
24
|
+
<scroll-view scroll-y class="dev-error-msg-box">
|
|
25
|
+
<text class="dev-error-msg">{{ errorMessage }}</text>
|
|
26
|
+
</scroll-view>
|
|
27
|
+
</view>
|
|
28
|
+
<view class="dev-error-tips-box">
|
|
29
|
+
<view class="dev-error-tips-dot"></view>
|
|
30
|
+
<text class="dev-error-tips">{{ t('errorBoundary.tips') }}</text>
|
|
31
|
+
</view>
|
|
32
|
+
</view>
|
|
33
|
+
|
|
34
|
+
<view class="dev-error-footer">
|
|
35
|
+
<view class="dev-error-btn-retry" @tap="retry">
|
|
36
|
+
<text class="dev-error-btn-text">{{ t('errorBoundary.retry') }}</text>
|
|
37
|
+
</view>
|
|
38
|
+
</view>
|
|
39
|
+
</view>
|
|
40
|
+
|
|
41
|
+
<!-- Subtle background decoration -->
|
|
42
|
+
<view class="dev-error-bg-circle-1"></view>
|
|
43
|
+
<view class="dev-error-bg-circle-2"></view>
|
|
44
|
+
</view>
|
|
45
|
+
</template>
|
|
46
|
+
|
|
47
|
+
<script setup lang="ts">
|
|
48
|
+
import { ref, onErrorCaptured, onMounted, onUnmounted, nextTick } from 'vue';
|
|
49
|
+
import { i18n } from '../../../i18n/instance';
|
|
50
|
+
import { DEV_ERROR_BOUNDARY_TRIGGER } from '../../../const';
|
|
51
|
+
import { getCurrentPagePath } from '../../../utils';
|
|
52
|
+
|
|
53
|
+
const t = (key: string) => i18n.t(key);
|
|
54
|
+
|
|
55
|
+
const hasError = ref(false);
|
|
56
|
+
const errorMessage = ref('');
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* 处理错误的核心逻辑
|
|
60
|
+
*/
|
|
61
|
+
const handleError = (err: any, info?: string) => {
|
|
62
|
+
if (hasError.value) return; // 状态锁,防止重复处理
|
|
63
|
+
|
|
64
|
+
console.log('[DevTool] Boundary Handling Error:', err?.message || err);
|
|
65
|
+
hasError.value = true;
|
|
66
|
+
errorMessage.value =
|
|
67
|
+
err?.stack || err?.message || err?.toString() || 'Unknown Error';
|
|
68
|
+
|
|
69
|
+
// 手动打印到控制台
|
|
70
|
+
console.error(`[ErrorBoundary]`, err);
|
|
71
|
+
if (info) console.warn(`[ErrorBoundary] Info: ${info}`);
|
|
72
|
+
|
|
73
|
+
// 强制下一帧显示
|
|
74
|
+
nextTick(() => {
|
|
75
|
+
hasError.value = true;
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
onMounted(() => {
|
|
80
|
+
// #ifndef H5
|
|
81
|
+
// 在非 H5 环境(小程序、APP),由于 onErrorCaptured 可能失效,启用全局监听作为核心捕获方案
|
|
82
|
+
const mountedPath = getCurrentPagePath();
|
|
83
|
+
uni.$on(DEV_ERROR_BOUNDARY_TRIGGER, (data: any) => {
|
|
84
|
+
const currentPath = getCurrentPagePath();
|
|
85
|
+
if (currentPath === mountedPath && !hasError.value) {
|
|
86
|
+
handleError(data.err, data.info);
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
// #endif
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
onUnmounted(() => {
|
|
93
|
+
// #ifndef H5
|
|
94
|
+
uni.$off(DEV_ERROR_BOUNDARY_TRIGGER);
|
|
95
|
+
// #endif
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
onErrorCaptured((err: any, _instance: any, info: string) => {
|
|
99
|
+
// 在 H5 环境,onErrorCaptured 通常能可靠工作
|
|
100
|
+
// 在其它环境,它可能与全局拦截器同时生效,handleError 内部已有 hasError 锁定
|
|
101
|
+
handleError(err, info);
|
|
102
|
+
// 阻止错误继续向上冒泡,防止触发全局拦截器产生的二次 emit
|
|
103
|
+
return false;
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
const retry = () => {
|
|
107
|
+
hasError.value = false;
|
|
108
|
+
errorMessage.value = '';
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const copyError = () => {
|
|
112
|
+
uni.setClipboardData({
|
|
113
|
+
data: errorMessage.value,
|
|
114
|
+
success: () => {
|
|
115
|
+
uni.showToast({
|
|
116
|
+
title: 'Copied to clipboard',
|
|
117
|
+
icon: 'none',
|
|
118
|
+
});
|
|
119
|
+
},
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
defineExpose({
|
|
124
|
+
retry,
|
|
125
|
+
});
|
|
126
|
+
</script>
|
|
127
|
+
|
|
128
|
+
<style scoped>
|
|
129
|
+
.dev-error-boundary {
|
|
130
|
+
position: fixed;
|
|
131
|
+
inset: 0;
|
|
132
|
+
z-index: 995;
|
|
133
|
+
width: 100vw;
|
|
134
|
+
height: 100vh;
|
|
135
|
+
display: flex;
|
|
136
|
+
flex-direction: column;
|
|
137
|
+
align-items: center;
|
|
138
|
+
justify-content: center;
|
|
139
|
+
padding: 80rpx 40rpx;
|
|
140
|
+
background-color: #f6f8fa;
|
|
141
|
+
box-sizing: border-box;
|
|
142
|
+
overflow: hidden;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* Background elements for premium feel */
|
|
146
|
+
.dev-error-bg-circle-1 {
|
|
147
|
+
position: absolute;
|
|
148
|
+
width: 400rpx;
|
|
149
|
+
height: 400rpx;
|
|
150
|
+
border-radius: 50%;
|
|
151
|
+
background: radial-gradient(circle, rgb(255 77 79 / 5%) 0%, transparent 70%);
|
|
152
|
+
top: -100rpx;
|
|
153
|
+
right: -100rpx;
|
|
154
|
+
z-index: 1;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.dev-error-bg-circle-2 {
|
|
158
|
+
position: absolute;
|
|
159
|
+
width: 300rpx;
|
|
160
|
+
height: 300rpx;
|
|
161
|
+
border-radius: 50%;
|
|
162
|
+
background: radial-gradient(circle, rgb(24 144 255 / 5%) 0%, transparent 70%);
|
|
163
|
+
bottom: -50rpx;
|
|
164
|
+
left: -50rpx;
|
|
165
|
+
z-index: 1;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.dev-error-card {
|
|
169
|
+
background-color: rgb(255 255 255 / 95%);
|
|
170
|
+
backdrop-filter: blur(10px);
|
|
171
|
+
border-radius: 32rpx;
|
|
172
|
+
box-shadow:
|
|
173
|
+
0 10rpx 30rpx rgb(0 0 0 / 4%),
|
|
174
|
+
0 30rpx 100rpx rgb(0 0 0 / 8%);
|
|
175
|
+
width: 100%;
|
|
176
|
+
max-width: 680rpx;
|
|
177
|
+
overflow: hidden;
|
|
178
|
+
border: 1rpx solid rgb(255 255 255 / 80%);
|
|
179
|
+
animation: dev-premium-entrance 0.6s cubic-bezier(0.16, 1, 0.3, 1);
|
|
180
|
+
z-index: 2;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
@keyframes dev-premium-entrance {
|
|
184
|
+
from {
|
|
185
|
+
opacity: 0;
|
|
186
|
+
transform: scale(0.95) translateY(40rpx);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
to {
|
|
190
|
+
opacity: 1;
|
|
191
|
+
transform: scale(1) translateY(0);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.dev-error-header {
|
|
196
|
+
display: flex;
|
|
197
|
+
align-items: center;
|
|
198
|
+
padding: 40rpx;
|
|
199
|
+
background: linear-gradient(135deg, #fff7f6 0%, #fff 100%);
|
|
200
|
+
border-bottom: 2rpx solid #f0f0f0;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.dev-error-icon-wrapper {
|
|
204
|
+
position: relative;
|
|
205
|
+
width: 64rpx;
|
|
206
|
+
height: 64rpx;
|
|
207
|
+
background: linear-gradient(135deg, #ff7875 0%, #ff4d4f 100%);
|
|
208
|
+
border-radius: 20rpx;
|
|
209
|
+
display: flex;
|
|
210
|
+
align-items: center;
|
|
211
|
+
justify-content: center;
|
|
212
|
+
margin-right: 28rpx;
|
|
213
|
+
flex-shrink: 0;
|
|
214
|
+
box-shadow: 0 8rpx 20rpx rgb(255 77 79 / 25%);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.dev-error-icon {
|
|
218
|
+
color: #fff;
|
|
219
|
+
font-size: 36rpx;
|
|
220
|
+
font-weight: 900;
|
|
221
|
+
z-index: 3;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.dev-error-icon-pulse {
|
|
225
|
+
position: absolute;
|
|
226
|
+
width: 100%;
|
|
227
|
+
height: 100%;
|
|
228
|
+
background-color: #ff4d4f;
|
|
229
|
+
border-radius: 20rpx;
|
|
230
|
+
opacity: 0.4;
|
|
231
|
+
animation: dev-icon-pulse 2s infinite;
|
|
232
|
+
z-index: 2;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
@keyframes dev-icon-pulse {
|
|
236
|
+
0% {
|
|
237
|
+
transform: scale(1);
|
|
238
|
+
opacity: 0.4;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
70% {
|
|
242
|
+
transform: scale(1.4);
|
|
243
|
+
opacity: 0;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
100% {
|
|
247
|
+
transform: scale(1);
|
|
248
|
+
opacity: 0;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.dev-error-title-box {
|
|
253
|
+
display: flex;
|
|
254
|
+
flex-direction: column;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.dev-error-title {
|
|
258
|
+
font-size: 34rpx;
|
|
259
|
+
font-weight: 700;
|
|
260
|
+
color: #1a1a1a;
|
|
261
|
+
letter-spacing: -0.5rpx;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.dev-error-subtitle {
|
|
265
|
+
font-size: 20rpx;
|
|
266
|
+
color: #ff4d4f;
|
|
267
|
+
text-transform: uppercase;
|
|
268
|
+
font-weight: 600;
|
|
269
|
+
letter-spacing: 1rpx;
|
|
270
|
+
margin-top: 4rpx;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.dev-error-body {
|
|
274
|
+
padding: 40rpx;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.dev-error-msg-container {
|
|
278
|
+
border-radius: 20rpx;
|
|
279
|
+
background-color: #141414;
|
|
280
|
+
overflow: hidden;
|
|
281
|
+
margin-bottom: 30rpx;
|
|
282
|
+
box-shadow: inset 0 2rpx 10rpx rgb(0 0 0 / 20%);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.dev-error-msg-header {
|
|
286
|
+
display: flex;
|
|
287
|
+
justify-content: space-between;
|
|
288
|
+
align-items: center;
|
|
289
|
+
padding: 16rpx 24rpx;
|
|
290
|
+
background-color: #1a1a1a;
|
|
291
|
+
border-bottom: 1rpx solid #2a2a2a;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.dev-error-msg-label {
|
|
295
|
+
color: #8c8c8c;
|
|
296
|
+
font-size: 20rpx;
|
|
297
|
+
font-weight: 600;
|
|
298
|
+
text-transform: uppercase;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.dev-error-copy {
|
|
302
|
+
padding: 4rpx 16rpx;
|
|
303
|
+
background-color: #333;
|
|
304
|
+
border-radius: 8rpx;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.dev-error-copy:active {
|
|
308
|
+
background-color: #444;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.dev-error-copy-text {
|
|
312
|
+
color: #d9d9d9;
|
|
313
|
+
font-size: 20rpx;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.dev-error-msg-box {
|
|
317
|
+
padding: 24rpx;
|
|
318
|
+
max-height: 360rpx;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.dev-error-msg {
|
|
322
|
+
font-size: 22rpx;
|
|
323
|
+
color: #ff7875;
|
|
324
|
+
font-family:
|
|
325
|
+
'SF Mono', Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
|
|
326
|
+
word-break: break-all;
|
|
327
|
+
line-height: 1.6;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.dev-error-tips-box {
|
|
331
|
+
display: flex;
|
|
332
|
+
align-items: center;
|
|
333
|
+
background-color: #fffaf0;
|
|
334
|
+
padding: 20rpx 24rpx;
|
|
335
|
+
border-radius: 12rpx;
|
|
336
|
+
border: 1rpx solid #ffe58f;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.dev-error-tips-dot {
|
|
340
|
+
width: 10rpx;
|
|
341
|
+
height: 10rpx;
|
|
342
|
+
background-color: #faad14;
|
|
343
|
+
border-radius: 50%;
|
|
344
|
+
margin-right: 16rpx;
|
|
345
|
+
flex-shrink: 0;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.dev-error-tips {
|
|
349
|
+
font-size: 24rpx;
|
|
350
|
+
color: #856404;
|
|
351
|
+
line-height: 1.4;
|
|
352
|
+
flex: 1;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.dev-error-footer {
|
|
356
|
+
padding: 0 40rpx 50rpx;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.dev-error-btn-retry {
|
|
360
|
+
background: linear-gradient(135deg, #40a9ff 0%, #1890ff 100%);
|
|
361
|
+
height: 88rpx;
|
|
362
|
+
border-radius: 44rpx;
|
|
363
|
+
display: flex;
|
|
364
|
+
align-items: center;
|
|
365
|
+
justify-content: center;
|
|
366
|
+
box-shadow: 0 8rpx 24rpx rgb(24 144 255 / 30%);
|
|
367
|
+
transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.dev-error-btn-retry:active {
|
|
371
|
+
transform: scale(0.95);
|
|
372
|
+
box-shadow: 0 4rpx 12rpx rgb(24 144 255 / 20%);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.dev-error-btn-text {
|
|
376
|
+
color: #fff;
|
|
377
|
+
font-size: 30rpx;
|
|
378
|
+
font-weight: 600;
|
|
379
|
+
}
|
|
380
|
+
</style>
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<view class="dev-tool-empty">
|
|
3
|
-
<image :src="empty" class="dev-tool-empty-image" />
|
|
4
|
-
<text class="dev-tool-empty-text">{{ text ?? '暂无调试信息' }}</text>
|
|
5
|
-
</view>
|
|
6
|
-
</template>
|
|
7
|
-
<script lang="ts" setup>
|
|
8
|
-
import empty from './empty.png';
|
|
9
|
-
defineProps<{ text?: string }>();
|
|
10
|
-
</script>
|
|
11
|
-
<style scoped>
|
|
12
|
-
.dev-tool-empty {
|
|
13
|
-
display: flex;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
justify-content: center;
|
|
16
|
-
align-items: center;
|
|
17
|
-
margin: 0 auto;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.dev-tool-empty-image {
|
|
21
|
-
margin-top: 50px;
|
|
22
|
-
width: 50px;
|
|
23
|
-
height: 50px;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.dev-tool-empty-text {
|
|
27
|
-
color: #888;
|
|
28
|
-
}
|
|
29
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<view class="dev-tool-empty">
|
|
3
|
+
<image :src="empty" class="dev-tool-empty-image" />
|
|
4
|
+
<text class="dev-tool-empty-text">{{ text ?? '暂无调试信息' }}</text>
|
|
5
|
+
</view>
|
|
6
|
+
</template>
|
|
7
|
+
<script lang="ts" setup>
|
|
8
|
+
import empty from './empty.png';
|
|
9
|
+
defineProps<{ text?: string }>();
|
|
10
|
+
</script>
|
|
11
|
+
<style scoped>
|
|
12
|
+
.dev-tool-empty {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
align-items: center;
|
|
17
|
+
margin: 0 auto;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.dev-tool-empty-image {
|
|
21
|
+
margin-top: 50px;
|
|
22
|
+
width: 50px;
|
|
23
|
+
height: 50px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.dev-tool-empty-text {
|
|
27
|
+
color: #888;
|
|
28
|
+
}
|
|
29
|
+
</style>
|