oxy-uni-ui 2.1.1 → 2.1.2

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.
Files changed (183) hide show
  1. package/attributes.json +1 -1
  2. package/components/common/abstracts/variable.scss +13 -2
  3. package/components/oxy-checkbox/index.scss +37 -2
  4. package/components/oxy-sort-button/index.scss +3 -4
  5. package/components/oxy-tag/index.scss +157 -17
  6. package/components/oxy-tag/oxy-tag.vue +14 -2
  7. package/components/oxy-tag/types.ts +9 -0
  8. package/dev-tools.ts +2 -0
  9. package/devTools/components/DevToolsOverlay.vue +56 -0
  10. package/devTools/components/DevToolsUiHost.vue +589 -0
  11. package/devTools/config.js +55 -0
  12. package/devTools/core/components/mpDevBubble.vue +174 -0
  13. package/devTools/core/libs/createH5Bubble.js +156 -0
  14. package/devTools/core/libs/devCache.js +151 -0
  15. package/devTools/core/libs/devOptions.js +163 -0
  16. package/devTools/core/libs/devUi.js +219 -0
  17. package/devTools/core/libs/drawView.js +140 -0
  18. package/devTools/core/libs/errorReport.js +64 -0
  19. package/devTools/core/libs/jsonCompress.js +334 -0
  20. package/devTools/core/libs/logReport.js +59 -0
  21. package/devTools/core/libs/pageLinkList.js +125 -0
  22. package/devTools/core/libs/timeFormat.js +94 -0
  23. package/devTools/core/proxy/console.js +430 -0
  24. package/devTools/core/proxy/index.js +36 -0
  25. package/devTools/core/proxy/request.js +495 -0
  26. package/devTools/core/proxy/storage.js +113 -0
  27. package/devTools/core/proxy/uniBus.js +153 -0
  28. package/devTools/core/proxy/uniListen.js +192 -0
  29. package/devTools/core/proxy/vueMixin.js +120 -0
  30. package/devTools/index.js +168 -0
  31. package/devTools/page/components/bottomTools.vue +1046 -0
  32. package/devTools/page/components/dialog/addStorage.vue +204 -0
  33. package/devTools/page/components/dialog/createDir.vue +366 -0
  34. package/devTools/page/components/dialog/editDialog.vue +192 -0
  35. package/devTools/page/components/dialog/routeDialog.vue +184 -0
  36. package/devTools/page/components/dialog/sendRequest.vue +603 -0
  37. package/devTools/page/components/dialog/textFileEditDialog.vue +391 -0
  38. package/devTools/page/components/libs/appDelDir.js +86 -0
  39. package/devTools/page/components/libs/dirReader.js +248 -0
  40. package/devTools/page/components/libs/fileSize.js +15 -0
  41. package/devTools/page/components/libs/getRuntimeInfo.js +134 -0
  42. package/devTools/page/components/listItem/consoleItem.vue +314 -0
  43. package/devTools/page/components/listItem/errorItem.vue +292 -0
  44. package/devTools/page/components/listItem/fileSysItem.vue +533 -0
  45. package/devTools/page/components/listItem/infoList.vue +100 -0
  46. package/devTools/page/components/listItem/jsRunnerItem.vue +255 -0
  47. package/devTools/page/components/listItem/logItem.vue +193 -0
  48. package/devTools/page/components/listItem/networkItem.vue +398 -0
  49. package/devTools/page/components/listItem/objectAnalysis.vue +651 -0
  50. package/devTools/page/components/listItem/pages.vue +319 -0
  51. package/devTools/page/components/listItem/routeItem.vue +153 -0
  52. package/devTools/page/components/listItem/setting.vue +734 -0
  53. package/devTools/page/components/listItem/storageList.vue +681 -0
  54. package/devTools/page/components/listItem/tools.vue +315 -0
  55. package/devTools/page/components/listItem/vuexList.vue +599 -0
  56. package/devTools/page/components/main.vue +1867 -0
  57. package/devTools/page/components/mixins/animationControl.js +91 -0
  58. package/devTools/page/components/mixins/mp.js +83 -0
  59. package/devTools/page/components/ui/btnTabs.vue +90 -0
  60. package/devTools/page/components/ui/codeHisPicker.vue +172 -0
  61. package/devTools/page/components/ui/h5Cell.vue +13 -0
  62. package/devTools/page/components/ui/menuBtn.vue +94 -0
  63. package/devTools/page/components/ui/mobileSwiperScroll.vue +74 -0
  64. package/devTools/page/components/ui/requestSpeedLimit.vue +52 -0
  65. package/devTools/page/components/ui/requestTimeoutMock.vue +55 -0
  66. package/devTools/page/components/ui/subTitleBar.vue +101 -0
  67. package/devTools/page/static/copy.png +0 -0
  68. package/devTools/page/static/delete.png +0 -0
  69. package/devTools/page/static/fileSys/AI.png +0 -0
  70. package/devTools/page/static/fileSys/DWG.png +0 -0
  71. package/devTools/page/static/fileSys/EXE.png +0 -0
  72. package/devTools/page/static/fileSys/GIF.png +0 -0
  73. package/devTools/page/static/fileSys/HTML.png +0 -0
  74. package/devTools/page/static/fileSys/PSD.png +0 -0
  75. package/devTools/page/static/fileSys/RVT.png +0 -0
  76. package/devTools/page/static/fileSys/SKP.png +0 -0
  77. package/devTools/page/static/fileSys/SVG.png +0 -0
  78. package/devTools/page/static/fileSys/excel.png +0 -0
  79. package/devTools/page/static/fileSys/pdf.png +0 -0
  80. package/devTools/page/static/fileSys/pptl.png +0 -0
  81. package/devTools/page/static/fileSys/shipin.png +0 -0
  82. package/devTools/page/static/fileSys/tupian.png +0 -0
  83. package/devTools/page/static/fileSys/txt.png +0 -0
  84. package/devTools/page/static/fileSys/weizhiwenjian.png +0 -0
  85. package/devTools/page/static/fileSys/wenjianjia.png +0 -0
  86. package/devTools/page/static/fileSys/word.png +0 -0
  87. package/devTools/page/static/fileSys/yasuo.png +0 -0
  88. package/devTools/page/static/fileSys/yinpin.png +0 -0
  89. package/devTools/page/static/fold.png +0 -0
  90. package/devTools/page/static/menu.png +0 -0
  91. package/devTools/page/static/refresh.png +0 -0
  92. package/devTools/page/static/unfold.png +0 -0
  93. package/devTools/tools.vue +25 -0
  94. package/devTools/type/devTools.d.ts +406 -0
  95. package/oxy-dev-tools/components/DevToolsUiHost.vue +555 -0
  96. package/oxy-dev-tools/config.js +61 -0
  97. package/oxy-dev-tools/core/components/mpDevBubble.vue +176 -0
  98. package/oxy-dev-tools/core/libs/createH5Bubble.js +156 -0
  99. package/oxy-dev-tools/core/libs/devCache.js +149 -0
  100. package/oxy-dev-tools/core/libs/devOptions.js +160 -0
  101. package/oxy-dev-tools/core/libs/devUi.js +219 -0
  102. package/oxy-dev-tools/core/libs/drawView.js +144 -0
  103. package/oxy-dev-tools/core/libs/errorReport.js +60 -0
  104. package/oxy-dev-tools/core/libs/jsonCompress.js +328 -0
  105. package/oxy-dev-tools/core/libs/logReport.js +55 -0
  106. package/oxy-dev-tools/core/libs/pageLinkList.js +121 -0
  107. package/oxy-dev-tools/core/libs/timeFormat.js +93 -0
  108. package/oxy-dev-tools/core/proxy/console.js +398 -0
  109. package/oxy-dev-tools/core/proxy/index.js +33 -0
  110. package/oxy-dev-tools/core/proxy/request.js +473 -0
  111. package/oxy-dev-tools/core/proxy/storage.js +96 -0
  112. package/oxy-dev-tools/core/proxy/uniBus.js +148 -0
  113. package/oxy-dev-tools/core/proxy/uniListen.js +190 -0
  114. package/oxy-dev-tools/core/proxy/vueMixin.js +115 -0
  115. package/oxy-dev-tools/index.ts +183 -0
  116. package/oxy-dev-tools/oxy-dev-tools.vue +62 -0
  117. package/oxy-dev-tools/page/components/bottomTools.vue +933 -0
  118. package/oxy-dev-tools/page/components/dialog/addStorage.vue +184 -0
  119. package/oxy-dev-tools/page/components/dialog/createDir.vue +352 -0
  120. package/oxy-dev-tools/page/components/dialog/editDialog.vue +178 -0
  121. package/oxy-dev-tools/page/components/dialog/routeDialog.vue +170 -0
  122. package/oxy-dev-tools/page/components/dialog/sendRequest.vue +530 -0
  123. package/oxy-dev-tools/page/components/dialog/textFileEditDialog.vue +379 -0
  124. package/oxy-dev-tools/page/components/libs/appDelDir.js +77 -0
  125. package/oxy-dev-tools/page/components/libs/dirReader.js +239 -0
  126. package/oxy-dev-tools/page/components/libs/fileSize.js +15 -0
  127. package/oxy-dev-tools/page/components/libs/getRuntimeInfo.js +132 -0
  128. package/oxy-dev-tools/page/components/listItem/consoleItem.vue +292 -0
  129. package/oxy-dev-tools/page/components/listItem/errorItem.vue +268 -0
  130. package/oxy-dev-tools/page/components/listItem/fileSysItem.vue +511 -0
  131. package/oxy-dev-tools/page/components/listItem/infoList.vue +89 -0
  132. package/oxy-dev-tools/page/components/listItem/jsRunnerItem.vue +236 -0
  133. package/oxy-dev-tools/page/components/listItem/logItem.vue +185 -0
  134. package/oxy-dev-tools/page/components/listItem/networkItem.vue +362 -0
  135. package/oxy-dev-tools/page/components/listItem/objectAnalysis.vue +642 -0
  136. package/oxy-dev-tools/page/components/listItem/pages.vue +285 -0
  137. package/oxy-dev-tools/page/components/listItem/routeItem.vue +140 -0
  138. package/oxy-dev-tools/page/components/listItem/setting.vue +687 -0
  139. package/oxy-dev-tools/page/components/listItem/storageList.vue +623 -0
  140. package/oxy-dev-tools/page/components/listItem/tools.vue +273 -0
  141. package/oxy-dev-tools/page/components/listItem/vuexList.vue +559 -0
  142. package/oxy-dev-tools/page/components/main.vue +1824 -0
  143. package/oxy-dev-tools/page/components/mixins/animationControl.js +80 -0
  144. package/oxy-dev-tools/page/components/mixins/mp.js +76 -0
  145. package/oxy-dev-tools/page/components/ui/btnTabs.vue +77 -0
  146. package/oxy-dev-tools/page/components/ui/codeHisPicker.vue +161 -0
  147. package/oxy-dev-tools/page/components/ui/h5Cell.vue +13 -0
  148. package/oxy-dev-tools/page/components/ui/menuBtn.vue +87 -0
  149. package/oxy-dev-tools/page/components/ui/mobileSwiperScroll.vue +71 -0
  150. package/oxy-dev-tools/page/components/ui/requestSpeedLimit.vue +47 -0
  151. package/oxy-dev-tools/page/components/ui/requestTimeoutMock.vue +50 -0
  152. package/oxy-dev-tools/page/components/ui/subTitleBar.vue +87 -0
  153. package/oxy-dev-tools/page/static/copy.png +0 -0
  154. package/oxy-dev-tools/page/static/delete.png +0 -0
  155. package/oxy-dev-tools/page/static/fileSys/AI.png +0 -0
  156. package/oxy-dev-tools/page/static/fileSys/DWG.png +0 -0
  157. package/oxy-dev-tools/page/static/fileSys/EXE.png +0 -0
  158. package/oxy-dev-tools/page/static/fileSys/GIF.png +0 -0
  159. package/oxy-dev-tools/page/static/fileSys/HTML.png +0 -0
  160. package/oxy-dev-tools/page/static/fileSys/PSD.png +0 -0
  161. package/oxy-dev-tools/page/static/fileSys/RVT.png +0 -0
  162. package/oxy-dev-tools/page/static/fileSys/SKP.png +0 -0
  163. package/oxy-dev-tools/page/static/fileSys/SVG.png +0 -0
  164. package/oxy-dev-tools/page/static/fileSys/excel.png +0 -0
  165. package/oxy-dev-tools/page/static/fileSys/pdf.png +0 -0
  166. package/oxy-dev-tools/page/static/fileSys/pptl.png +0 -0
  167. package/oxy-dev-tools/page/static/fileSys/shipin.png +0 -0
  168. package/oxy-dev-tools/page/static/fileSys/tupian.png +0 -0
  169. package/oxy-dev-tools/page/static/fileSys/txt.png +0 -0
  170. package/oxy-dev-tools/page/static/fileSys/weizhiwenjian.png +0 -0
  171. package/oxy-dev-tools/page/static/fileSys/wenjianjia.png +0 -0
  172. package/oxy-dev-tools/page/static/fileSys/word.png +0 -0
  173. package/oxy-dev-tools/page/static/fileSys/yasuo.png +0 -0
  174. package/oxy-dev-tools/page/static/fileSys/yinpin.png +0 -0
  175. package/oxy-dev-tools/page/static/fold.png +0 -0
  176. package/oxy-dev-tools/page/static/menu.png +0 -0
  177. package/oxy-dev-tools/page/static/refresh.png +0 -0
  178. package/oxy-dev-tools/page/static/unfold.png +0 -0
  179. package/oxy-dev-tools/tools.vue +22 -0
  180. package/oxy-dev-tools/type/devTools.d.ts +406 -0
  181. package/package.json +1 -1
  182. package/tags.json +1 -1
  183. package/web-types.json +1 -1
@@ -0,0 +1,589 @@
1
+ <template>
2
+ <view
3
+ v-show="visible"
4
+ class="devtools-ui-host"
5
+ >
6
+ <view
7
+ v-if="loading.show"
8
+ class="loading-mask"
9
+ :class="{ passthrough: !loading.mask }"
10
+ >
11
+ <view class="loading-card">
12
+ <view class="loading-spinner"></view>
13
+ <text class="loading-text">{{ loading.title || "加载中..." }}</text>
14
+ </view>
15
+ </view>
16
+
17
+ <view
18
+ v-if="modal.show"
19
+ class="modal-mask"
20
+ @click="onModalMaskClick"
21
+ >
22
+ <view class="modal-card" :class="`tone-${modal.tone}`" @click.stop>
23
+ <view class="modal-head">
24
+ <view class="modal-head-dot"></view>
25
+ <text class="modal-title">{{ modal.title }}</text>
26
+ </view>
27
+ <text class="modal-content">{{ modal.content }}</text>
28
+ <view class="modal-actions">
29
+ <view
30
+ v-if="modal.showCancel"
31
+ class="modal-btn cancel"
32
+ @click="closeModal(false)"
33
+ >
34
+ <text class="modal-btn-text" :style="{ color: modal.cancelColor }">{{ modal.cancelText }}</text>
35
+ </view>
36
+ <view
37
+ class="modal-btn confirm"
38
+ @click="closeModal(true)"
39
+ >
40
+ <text class="modal-btn-text" :style="{ color: modal.confirmColor }">{{ modal.confirmText }}</text>
41
+ </view>
42
+ </view>
43
+ </view>
44
+ </view>
45
+
46
+ <view
47
+ v-if="actionSheet.show"
48
+ class="action-sheet-mask"
49
+ @click="closeActionSheet(-1)"
50
+ >
51
+ <view class="action-sheet-wrap" @click.stop>
52
+ <view class="action-sheet-card">
53
+ <text
54
+ v-if="actionSheet.title"
55
+ class="action-sheet-title"
56
+ >
57
+ {{ actionSheet.title }}
58
+ </text>
59
+ <view
60
+ v-for="(item, index) in actionSheet.itemList"
61
+ :key="`${index}_${item.title}`"
62
+ class="action-sheet-item"
63
+ @click="closeActionSheet(index)"
64
+ >
65
+ <view class="action-sheet-item-content">
66
+ <text
67
+ class="action-sheet-item-text"
68
+ :style="{
69
+ color:
70
+ index === actionSheet.destructiveIndex
71
+ ? '#dc2626'
72
+ : index === actionSheet.selectedIndex
73
+ ? actionSheet.selectedColor || '#2563eb'
74
+ : actionSheet.itemColor || '#1e3a8a',
75
+ }"
76
+ >
77
+ {{ item.title }}
78
+ </text>
79
+ <text
80
+ v-if="item.msg"
81
+ class="action-sheet-item-msg"
82
+ >
83
+ {{ item.msg }}
84
+ </text>
85
+ </view>
86
+ </view>
87
+ </view>
88
+ <view
89
+ class="action-sheet-cancel"
90
+ @click="closeActionSheet(-1)"
91
+ >
92
+ <text class="action-sheet-cancel-text">{{ actionSheet.cancelText || "取消" }}</text>
93
+ </view>
94
+ </view>
95
+ </view>
96
+
97
+ <view
98
+ v-if="toast.show"
99
+ class="toast-wrap"
100
+ >
101
+ <view class="toast-card" :class="`type-${toastType}`">
102
+ <view class="toast-dot"></view>
103
+ <text class="toast-text">{{ toast.title }}</text>
104
+ </view>
105
+ </view>
106
+ </view>
107
+ </template>
108
+
109
+ <script setup>
110
+ import { computed, onBeforeUnmount, onMounted, reactive } from "vue";
111
+
112
+ const EVENT_HOST_READY = "devTools_ui_host_ready";
113
+ const EVENT_HOST_DESTROYED = "devTools_ui_host_destroyed";
114
+ const EVENT_MODAL_SHOW = "devTools_ui_modal_show";
115
+ const EVENT_TOAST_SHOW = "devTools_ui_toast_show";
116
+ const EVENT_LOADING_SHOW = "devTools_ui_loading_show";
117
+ const EVENT_LOADING_HIDE = "devTools_ui_loading_hide";
118
+ const EVENT_ACTION_SHEET_SHOW = "devTools_ui_action_sheet_show";
119
+
120
+ let toastTimer = 0;
121
+ let activeModalEvent = "";
122
+ let activeActionSheetEvent = "";
123
+
124
+ const modal = reactive({
125
+ show: false,
126
+ title: "提示",
127
+ content: "",
128
+ tone: "default",
129
+ showCancel: true,
130
+ cancelText: "取消",
131
+ cancelColor: "#6b7280",
132
+ confirmText: "确定",
133
+ confirmColor: "#3b82f6",
134
+ });
135
+
136
+ const toast = reactive({
137
+ show: false,
138
+ title: "",
139
+ icon: "none",
140
+ });
141
+
142
+ const loading = reactive({
143
+ show: false,
144
+ title: "加载中...",
145
+ mask: false,
146
+ });
147
+
148
+ const actionSheet = reactive({
149
+ show: false,
150
+ title: "",
151
+ itemList: [],
152
+ itemColor: "#1e3a8a",
153
+ selectedIndex: -1,
154
+ selectedColor: "#2563eb",
155
+ cancelText: "取消",
156
+ destructiveIndex: -1,
157
+ });
158
+
159
+ const visible = computed(() => modal.show || toast.show || loading.show || actionSheet.show);
160
+ const toastType = computed(() => {
161
+ if (toast.icon === "success") return "success";
162
+ if (toast.icon === "error") return "error";
163
+ return "info";
164
+ });
165
+
166
+ function openModal(payload = {}) {
167
+ const options = payload.options || {};
168
+ activeModalEvent = payload.resultEvent || "";
169
+ modal.show = true;
170
+ modal.title = options.title || "提示";
171
+ modal.content = options.content || "";
172
+ modal.tone = options.tone || "default";
173
+ modal.showCancel = options.showCancel !== false;
174
+ modal.cancelText = options.cancelText || "取消";
175
+ modal.cancelColor = options.cancelColor || "#6b7280";
176
+ modal.confirmText = options.confirmText || "确定";
177
+ modal.confirmColor = options.confirmColor || "#3b82f6";
178
+ }
179
+
180
+ function closeModal(confirm) {
181
+ const res = {
182
+ confirm,
183
+ cancel: !confirm,
184
+ errMsg: "showModal:ok",
185
+ };
186
+ const eventName = activeModalEvent;
187
+ modal.show = false;
188
+ activeModalEvent = "";
189
+ if (eventName) {
190
+ uni.$emit(eventName, res);
191
+ // 兼容未实现 $once 的运行时,确保 $on 监听也能及时释放
192
+ uni.$off(eventName);
193
+ }
194
+ }
195
+
196
+ function onModalMaskClick() {
197
+ if (!modal.showCancel) return;
198
+ closeModal(false);
199
+ }
200
+
201
+ function openActionSheet(payload = {}) {
202
+ const options = payload.options || {};
203
+ activeActionSheetEvent = payload.resultEvent || "";
204
+ actionSheet.show = true;
205
+ actionSheet.title = options.title || "";
206
+ actionSheet.itemList = Array.isArray(options.itemList)
207
+ ? options.itemList.map((item) => {
208
+ if (item && typeof item === "object") {
209
+ return {
210
+ title: String(item.title || item.text || ""),
211
+ msg: item.msg ? String(item.msg) : "",
212
+ };
213
+ }
214
+ return {
215
+ title: String(item),
216
+ msg: "",
217
+ };
218
+ })
219
+ : [];
220
+ actionSheet.itemColor = options.itemColor || "#1e3a8a";
221
+ actionSheet.selectedIndex = typeof options.selectedIndex === "number" ? options.selectedIndex : -1;
222
+ actionSheet.selectedColor = options.selectedColor || "#2563eb";
223
+ actionSheet.cancelText = options.cancelText || "取消";
224
+ actionSheet.destructiveIndex = typeof options.destructiveIndex === "number" ? options.destructiveIndex : -1;
225
+ }
226
+
227
+ function closeActionSheet(tapIndex = -1) {
228
+ const eventName = activeActionSheetEvent;
229
+ actionSheet.show = false;
230
+ activeActionSheetEvent = "";
231
+ const res = {
232
+ tapIndex,
233
+ cancel: tapIndex < 0,
234
+ errMsg: tapIndex < 0 ? "showActionSheet:fail cancel" : "showActionSheet:ok",
235
+ };
236
+ if (eventName) {
237
+ uni.$emit(eventName, res);
238
+ uni.$off(eventName);
239
+ }
240
+ }
241
+
242
+ function openToast(options = {}) {
243
+ toast.show = true;
244
+ toast.title = options.title || "";
245
+ toast.icon = options.icon || "none";
246
+ if (toastTimer) {
247
+ clearTimeout(toastTimer);
248
+ toastTimer = 0;
249
+ }
250
+ const duration = typeof options.duration === "number" ? options.duration : 1500;
251
+ toastTimer = setTimeout(() => {
252
+ toast.show = false;
253
+ }, Math.max(duration, 300));
254
+ }
255
+
256
+ function showLoading(options = {}) {
257
+ loading.show = true;
258
+ loading.title = options.title || "加载中...";
259
+ loading.mask = options.mask === true;
260
+ }
261
+
262
+ function hideLoading() {
263
+ loading.show = false;
264
+ }
265
+
266
+ onMounted(() => {
267
+ uni.$on(EVENT_MODAL_SHOW, openModal);
268
+ uni.$on(EVENT_ACTION_SHEET_SHOW, openActionSheet);
269
+ uni.$on(EVENT_TOAST_SHOW, openToast);
270
+ uni.$on(EVENT_LOADING_SHOW, showLoading);
271
+ uni.$on(EVENT_LOADING_HIDE, hideLoading);
272
+ uni.$emit(EVENT_HOST_READY);
273
+ });
274
+
275
+ onBeforeUnmount(() => {
276
+ if (toastTimer) {
277
+ clearTimeout(toastTimer);
278
+ toastTimer = 0;
279
+ }
280
+ uni.$off(EVENT_MODAL_SHOW, openModal);
281
+ uni.$off(EVENT_ACTION_SHEET_SHOW, openActionSheet);
282
+ uni.$off(EVENT_TOAST_SHOW, openToast);
283
+ uni.$off(EVENT_LOADING_SHOW, showLoading);
284
+ uni.$off(EVENT_LOADING_HIDE, hideLoading);
285
+ uni.$emit(EVENT_HOST_DESTROYED);
286
+ });
287
+ </script>
288
+
289
+ <style scoped lang="scss">
290
+ .devtools-ui-host {
291
+ position: fixed;
292
+ inset: 0;
293
+ z-index: 2147483647;
294
+ pointer-events: none;
295
+ }
296
+
297
+ .modal-mask,
298
+ .loading-mask,
299
+ .action-sheet-mask {
300
+ position: absolute;
301
+ inset: 0;
302
+ display: flex;
303
+ align-items: flex-end;
304
+ justify-content: center;
305
+ pointer-events: auto;
306
+ }
307
+
308
+ .modal-mask,
309
+ .loading-mask {
310
+ align-items: center;
311
+ }
312
+
313
+ .modal-mask {
314
+ background: rgba(15, 23, 42, 0.52);
315
+ backdrop-filter: blur(2px);
316
+ }
317
+
318
+ .modal-card {
319
+ width: 640rpx;
320
+ border-radius: 22rpx;
321
+ background: linear-gradient(180deg, #f8fbff 0%, #ffffff 45%);
322
+ overflow: hidden;
323
+ border: 1px solid rgba(59, 130, 246, 0.28);
324
+ box-shadow: 0 14rpx 36rpx rgba(15, 23, 42, 0.25);
325
+ }
326
+
327
+ .modal-card.tone-warning {
328
+ border-color: rgba(220, 38, 38, 0.35);
329
+ background: linear-gradient(180deg, #fff7f7 0%, #ffffff 45%);
330
+ }
331
+
332
+ .modal-head {
333
+ display: flex;
334
+ align-items: center;
335
+ gap: 10rpx;
336
+ padding: 24rpx 28rpx 4rpx;
337
+ }
338
+
339
+ .modal-head-dot {
340
+ width: 12rpx;
341
+ height: 12rpx;
342
+ border-radius: 50%;
343
+ background: #3b82f6;
344
+ box-shadow: 0 0 0 6rpx #dbeafe;
345
+ }
346
+
347
+ .modal-card.tone-warning .modal-head-dot {
348
+ background: #ef4444;
349
+ box-shadow: 0 0 0 6rpx rgba(254, 226, 226, 0.95);
350
+ }
351
+
352
+ .modal-title {
353
+ display: block;
354
+ font-size: 30rpx;
355
+ line-height: 38rpx;
356
+ color: #0f172a;
357
+ font-weight: 600;
358
+ }
359
+
360
+ .modal-card.tone-warning .modal-title {
361
+ color: #b91c1c;
362
+ }
363
+
364
+ .modal-content {
365
+ display: block;
366
+ padding: 6rpx 28rpx 28rpx;
367
+ font-size: 26rpx;
368
+ line-height: 36rpx;
369
+ color: #334155;
370
+ }
371
+
372
+ .modal-card.tone-warning .modal-content {
373
+ color: #dc2626;
374
+ }
375
+
376
+ .modal-actions {
377
+ display: flex;
378
+ border-top: 1px solid rgba(148, 163, 184, 0.28);
379
+ background: #f8fafc;
380
+ }
381
+
382
+ .modal-btn {
383
+ flex: 1;
384
+ height: 88rpx;
385
+ display: flex;
386
+ align-items: center;
387
+ justify-content: center;
388
+ transition: background-color 0.15s ease;
389
+ &:active {
390
+ background: rgba(59, 130, 246, 0.09);
391
+ }
392
+ }
393
+
394
+ .modal-btn.cancel {
395
+ border-right: 1px solid rgba(148, 163, 184, 0.28);
396
+ }
397
+
398
+ .modal-btn-text {
399
+ font-size: 28rpx;
400
+ line-height: 28rpx;
401
+ font-weight: 500;
402
+ }
403
+
404
+ .toast-wrap {
405
+ position: absolute;
406
+ left: 50%;
407
+ bottom: 210rpx;
408
+ transform: translateX(-50%);
409
+ pointer-events: none;
410
+ }
411
+
412
+ .toast-card {
413
+ min-width: 220rpx;
414
+ max-width: 560rpx;
415
+ padding: 16rpx 24rpx;
416
+ border-radius: 14rpx;
417
+ display: flex;
418
+ flex-direction: row;
419
+ align-items: center;
420
+ gap: 12rpx;
421
+ border: 1px solid rgba(148, 163, 184, 0.35);
422
+ box-shadow: 0 8rpx 24rpx rgba(15, 23, 42, 0.22);
423
+ }
424
+
425
+ .toast-card.type-info {
426
+ background: rgba(15, 23, 42, 0.9);
427
+ }
428
+
429
+ .toast-card.type-success {
430
+ background: rgba(22, 163, 74, 0.95);
431
+ }
432
+
433
+ .toast-card.type-error {
434
+ background: rgba(220, 38, 38, 0.96);
435
+ }
436
+
437
+ .toast-dot {
438
+ width: 10rpx;
439
+ height: 10rpx;
440
+ border-radius: 50%;
441
+ background: rgba(255, 255, 255, 0.9);
442
+ }
443
+
444
+ .toast-text {
445
+ display: inline-block;
446
+ font-size: 24rpx;
447
+ line-height: 32rpx;
448
+ color: #fff;
449
+ text-align: left;
450
+ word-break: break-all;
451
+ }
452
+
453
+ .loading-mask {
454
+ background: rgba(15, 23, 42, 0.36);
455
+ }
456
+
457
+ .action-sheet-mask {
458
+ background: rgba(15, 23, 42, 0.52);
459
+ backdrop-filter: blur(2px);
460
+ }
461
+
462
+ .action-sheet-wrap {
463
+ width: 710rpx;
464
+ margin-bottom: 26rpx;
465
+ display: flex;
466
+ flex-direction: column;
467
+ gap: 14rpx;
468
+ }
469
+
470
+ .action-sheet-card {
471
+ border-radius: 20rpx;
472
+ overflow: hidden;
473
+ background: linear-gradient(180deg, #f8fbff 0%, #ffffff 40%);
474
+ border: 1px solid rgba(59, 130, 246, 0.2);
475
+ box-shadow: 0 14rpx 36rpx rgba(15, 23, 42, 0.26);
476
+ }
477
+
478
+ .action-sheet-title {
479
+ display: block;
480
+ padding: 24rpx 26rpx 16rpx;
481
+ font-size: 22rpx;
482
+ line-height: 32rpx;
483
+ color: #64748b;
484
+ text-align: center;
485
+ border-bottom: 1px solid rgba(148, 163, 184, 0.2);
486
+ }
487
+
488
+ .action-sheet-item {
489
+ min-height: 92rpx;
490
+ display: flex;
491
+ align-items: center;
492
+ justify-content: center;
493
+ border-bottom: 1px solid rgba(148, 163, 184, 0.16);
494
+ &:last-child {
495
+ border-bottom: none;
496
+ }
497
+ &:active {
498
+ background: rgba(59, 130, 246, 0.08);
499
+ }
500
+ }
501
+
502
+ .action-sheet-item-content {
503
+ width: 100%;
504
+ padding: 14rpx 16rpx;
505
+ display: flex;
506
+ flex-direction: column;
507
+ align-items: center;
508
+ justify-content: center;
509
+ }
510
+
511
+ .action-sheet-item-text {
512
+ font-size: 30rpx;
513
+ line-height: 38rpx;
514
+ font-weight: 500;
515
+ }
516
+
517
+ .action-sheet-item-msg {
518
+ margin-top: 6rpx;
519
+ font-size: 23rpx;
520
+ line-height: 31rpx;
521
+ color: #94a3b8;
522
+ }
523
+
524
+ .action-sheet-cancel {
525
+ height: 92rpx;
526
+ border-radius: 20rpx;
527
+ background: #fff;
528
+ border: 1px solid rgba(148, 163, 184, 0.24);
529
+ box-shadow: 0 10rpx 26rpx rgba(15, 23, 42, 0.18);
530
+ display: flex;
531
+ align-items: center;
532
+ justify-content: center;
533
+ &:active {
534
+ background: #f8fafc;
535
+ }
536
+ }
537
+
538
+ .action-sheet-cancel-text {
539
+ font-size: 30rpx;
540
+ line-height: 38rpx;
541
+ color: #334155;
542
+ font-weight: 500;
543
+ }
544
+
545
+ .loading-mask.passthrough {
546
+ pointer-events: none;
547
+ background: transparent;
548
+ }
549
+
550
+ .loading-card {
551
+ width: 210rpx;
552
+ min-height: 176rpx;
553
+ padding: 24rpx 18rpx;
554
+ border-radius: 18rpx;
555
+ background: rgba(15, 23, 42, 0.9);
556
+ border: 1px solid rgba(59, 130, 246, 0.35);
557
+ display: flex;
558
+ flex-direction: column;
559
+ align-items: center;
560
+ justify-content: center;
561
+ box-shadow: 0 10rpx 26rpx rgba(15, 23, 42, 0.35);
562
+ }
563
+
564
+ .loading-spinner {
565
+ width: 48rpx;
566
+ height: 48rpx;
567
+ border-radius: 50%;
568
+ border: 4rpx solid rgba(59, 130, 246, 0.25);
569
+ border-top-color: #60a5fa;
570
+ animation: spin 0.66s linear infinite;
571
+ }
572
+
573
+ .loading-text {
574
+ margin-top: 14rpx;
575
+ font-size: 23rpx;
576
+ line-height: 31rpx;
577
+ color: #e2e8f0;
578
+ text-align: center;
579
+ }
580
+
581
+ @keyframes spin {
582
+ from {
583
+ transform: rotate(0deg);
584
+ }
585
+ to {
586
+ transform: rotate(360deg);
587
+ }
588
+ }
589
+ </style>
@@ -0,0 +1,55 @@
1
+ let config = {
2
+ status: true, //调试工具总开关
3
+ bubble: { //调试弹窗气泡设置
4
+ status: true, // 气泡标签是否显示,生产环境建议关闭
5
+ text: "DevTools", // 气泡上展示的文字
6
+ color: "#ffffff", // 气泡文字颜色
7
+ bgColor: "rgba(250, 53, 52,0.7)", // 气泡背景颜色
8
+ },
9
+
10
+ // 注意: 以下配置不建议更改
11
+ console: { //console日志配置
12
+ status: true, //功能总开关
13
+ isOutput: true, //打印的日志是否对外输出到浏览器调试界面,建议在生产环境时关闭
14
+ cache: {
15
+ status: true, //是否启用本地缓存
16
+ size: 512 * 1024, //缓存上限,单位byte
17
+ rowSize: 1024 * 4,//单条记录缓存上限,单位byte
18
+ },
19
+ },
20
+ uniBus: { // uni event bus 监听设置
21
+ status: true,
22
+ cache: {
23
+ status: true,
24
+ size: 1024 * 512, // bus调用日志上限 byte
25
+ rowSize: 1024 * 10,
26
+ countMaxSize: 1024 * 10, // bus统计上限 byte
27
+ },
28
+ },
29
+ error: { //报错拦截配置
30
+ status: true,
31
+ cache: {
32
+ status: true,
33
+ size: 512 * 1024,
34
+ rowSize: 1024 * 4,
35
+ },
36
+ },
37
+ network: { //请求拦截配置
38
+ status: true,
39
+ cache: {
40
+ status: true,
41
+ size: 512 * 1024,
42
+ rowSize: 1024 * 4,
43
+ },
44
+ },
45
+ logs: { //运行日志
46
+ status: true,
47
+ cache: {
48
+ status: true,
49
+ size: 512 * 1024,
50
+ rowSize: 1024 * 4,
51
+ },
52
+ },
53
+ };
54
+
55
+ export default config;