oxy-uni-ui 2.1.0 → 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.
- package/attributes.json +1 -1
- package/components/common/abstracts/variable.scss +145 -100
- package/components/common/util.ts +25 -0
- package/components/composables/useDynamicVirtualScroll.ts +80 -0
- package/components/oxy-action-sheet/index.scss +6 -6
- package/components/oxy-backtop/index.scss +1 -1
- package/components/oxy-badge/index.scss +2 -2
- package/components/oxy-button/index.scss +3 -6
- package/components/oxy-calendar/index.scss +2 -2
- package/components/oxy-calendar/oxy-calendar.vue +3 -3
- package/components/oxy-calendar-view/monthPanel/month-panel.vue +72 -37
- package/components/oxy-calendar-view/monthPanel/types.ts +43 -1
- package/components/oxy-calendar-view/types.ts +1 -1
- package/components/oxy-calendar-view/utils.ts +12 -1
- package/components/oxy-calendar-view/yearPanel/types.ts +36 -2
- package/components/oxy-calendar-view/yearPanel/year-panel.vue +64 -45
- package/components/oxy-card/index.scss +4 -4
- package/components/oxy-cell/index.scss +1 -1
- package/components/oxy-cell-group/index.scss +2 -2
- package/components/oxy-checkbox/index.scss +87 -197
- package/components/oxy-collapse/index.scss +1 -1
- package/components/oxy-collapse-item/index.scss +2 -2
- package/components/oxy-corner/index.scss +3 -3
- package/components/oxy-count-to/oxy-count-to.vue +3 -3
- package/components/oxy-count-to/types.ts +1 -1
- package/components/oxy-date-strip-item/index.scss +4 -4
- package/components/oxy-datetime-picker/types.ts +1 -1
- package/components/oxy-datetime-picker-view/types.ts +2 -2
- package/components/oxy-fab/index.scss +1 -5
- package/components/oxy-file-list/index.scss +2 -2
- package/components/oxy-footer/index.scss +2 -2
- package/components/oxy-footer/oxy-footer.vue +2 -3
- package/components/oxy-form-item/index.scss +0 -5
- package/components/oxy-grid/oxy-grid.vue +1 -1
- package/components/oxy-grid-item/index.scss +1 -1
- package/components/oxy-guidance/index.scss +2 -2
- package/components/oxy-img/index.scss +2 -2
- package/components/oxy-img-cropper/index.scss +0 -2
- package/components/oxy-img-lazy/index.scss +0 -1
- package/components/oxy-index-anchor/index.scss +3 -3
- package/components/oxy-input/index.scss +2 -2
- package/components/oxy-input-number/index.scss +21 -3
- package/components/oxy-input-number/oxy-input-number.vue +9 -1
- package/components/oxy-keyboard/index.scss +1 -1
- package/components/oxy-link/index.scss +11 -10
- package/components/oxy-loading/index.scss +1 -1
- package/components/oxy-loadmore/index.scss +1 -1
- package/components/oxy-message-box/index.scss +7 -7
- package/components/oxy-navbar/index.scss +1 -1
- package/components/oxy-navbar/oxy-navbar.vue +2 -3
- package/components/oxy-password-input/index.scss +4 -4
- package/components/oxy-picker/types.ts +1 -1
- package/components/oxy-picker-view/oxy-picker-view.vue +8 -5
- package/components/oxy-picker-view/types.ts +2 -2
- package/components/oxy-progress/index.scss +2 -2
- package/components/oxy-radio/index.scss +8 -4
- package/components/oxy-radio-group/index.scss +0 -1
- package/components/oxy-rich-text/index.scss +2 -6
- package/components/oxy-rich-text/mp-html/mp-html.d.ts +2 -0
- package/components/oxy-rich-text/mp-html/mp-html.vue +2 -1
- package/components/oxy-rich-text/mp-html/node/node.vue +23 -0
- package/components/oxy-rich-text/mp-html/parser.js +6 -6
- package/components/oxy-rich-text/oxy-rich-text.vue +23 -0
- package/components/oxy-search/index.scss +1 -1
- package/components/oxy-segmented/index.scss +4 -8
- package/components/oxy-select/index.scss +6 -6
- package/components/oxy-sidebar-item/index.scss +20 -11
- package/components/oxy-slider/index.scss +4 -5
- package/components/oxy-sort-button/index.scss +6 -9
- package/components/oxy-splitter-panel/index.scss +8 -8
- package/components/oxy-step/index.scss +9 -9
- package/components/oxy-swiper-nav/index.scss +2 -2
- package/components/oxy-switch/index.scss +3 -3
- package/components/oxy-tab/index.scss +8 -2
- package/components/oxy-tabbar/index.scss +3 -3
- package/components/oxy-tabbar/oxy-tabbar.vue +3 -3
- package/components/oxy-table/index.scss +0 -1
- package/components/oxy-table-col/index.scss +1 -2
- package/components/oxy-tabs/index.scss +3 -3
- package/components/oxy-tag/index.scss +160 -20
- package/components/oxy-tag/oxy-tag.vue +14 -2
- package/components/oxy-tag/types.ts +9 -0
- package/components/oxy-text/index.scss +1 -1
- package/components/oxy-textarea/index.scss +2 -6
- package/components/oxy-toast/index.scss +1 -1
- package/components/oxy-tree/index.scss +31 -11
- package/components/oxy-tree/oxy-tree.vue +113 -2
- package/components/oxy-tree/types.ts +1 -0
- package/components/oxy-upload/index.scss +3 -3
- package/components/oxy-video-preview/index.scss +3 -3
- package/components/oxy-virtual-scroll/index.scss +1 -1
- package/components/oxy-voice-player/index.scss +36 -36
- package/components/oxy-watermark/index.scss +1 -1
- package/dev-tools.ts +2 -0
- package/devTools/components/DevToolsOverlay.vue +56 -0
- package/devTools/components/DevToolsUiHost.vue +589 -0
- package/devTools/config.js +55 -0
- package/devTools/core/components/mpDevBubble.vue +174 -0
- package/devTools/core/libs/createH5Bubble.js +156 -0
- package/devTools/core/libs/devCache.js +151 -0
- package/devTools/core/libs/devOptions.js +163 -0
- package/devTools/core/libs/devUi.js +219 -0
- package/devTools/core/libs/drawView.js +140 -0
- package/devTools/core/libs/errorReport.js +64 -0
- package/devTools/core/libs/jsonCompress.js +334 -0
- package/devTools/core/libs/logReport.js +59 -0
- package/devTools/core/libs/pageLinkList.js +125 -0
- package/devTools/core/libs/timeFormat.js +94 -0
- package/devTools/core/proxy/console.js +430 -0
- package/devTools/core/proxy/index.js +36 -0
- package/devTools/core/proxy/request.js +495 -0
- package/devTools/core/proxy/storage.js +113 -0
- package/devTools/core/proxy/uniBus.js +153 -0
- package/devTools/core/proxy/uniListen.js +192 -0
- package/devTools/core/proxy/vueMixin.js +120 -0
- package/devTools/index.js +168 -0
- package/devTools/page/components/bottomTools.vue +1046 -0
- package/devTools/page/components/dialog/addStorage.vue +204 -0
- package/devTools/page/components/dialog/createDir.vue +366 -0
- package/devTools/page/components/dialog/editDialog.vue +192 -0
- package/devTools/page/components/dialog/routeDialog.vue +184 -0
- package/devTools/page/components/dialog/sendRequest.vue +603 -0
- package/devTools/page/components/dialog/textFileEditDialog.vue +391 -0
- package/devTools/page/components/libs/appDelDir.js +86 -0
- package/devTools/page/components/libs/dirReader.js +248 -0
- package/devTools/page/components/libs/fileSize.js +15 -0
- package/devTools/page/components/libs/getRuntimeInfo.js +134 -0
- package/devTools/page/components/listItem/consoleItem.vue +314 -0
- package/devTools/page/components/listItem/errorItem.vue +292 -0
- package/devTools/page/components/listItem/fileSysItem.vue +533 -0
- package/devTools/page/components/listItem/infoList.vue +100 -0
- package/devTools/page/components/listItem/jsRunnerItem.vue +255 -0
- package/devTools/page/components/listItem/logItem.vue +193 -0
- package/devTools/page/components/listItem/networkItem.vue +398 -0
- package/devTools/page/components/listItem/objectAnalysis.vue +651 -0
- package/devTools/page/components/listItem/pages.vue +319 -0
- package/devTools/page/components/listItem/routeItem.vue +153 -0
- package/devTools/page/components/listItem/setting.vue +734 -0
- package/devTools/page/components/listItem/storageList.vue +681 -0
- package/devTools/page/components/listItem/tools.vue +315 -0
- package/devTools/page/components/listItem/vuexList.vue +599 -0
- package/devTools/page/components/main.vue +1867 -0
- package/devTools/page/components/mixins/animationControl.js +91 -0
- package/devTools/page/components/mixins/mp.js +83 -0
- package/devTools/page/components/ui/btnTabs.vue +90 -0
- package/devTools/page/components/ui/codeHisPicker.vue +172 -0
- package/devTools/page/components/ui/h5Cell.vue +13 -0
- package/devTools/page/components/ui/menuBtn.vue +94 -0
- package/devTools/page/components/ui/mobileSwiperScroll.vue +74 -0
- package/devTools/page/components/ui/requestSpeedLimit.vue +52 -0
- package/devTools/page/components/ui/requestTimeoutMock.vue +55 -0
- package/devTools/page/components/ui/subTitleBar.vue +101 -0
- package/devTools/page/static/copy.png +0 -0
- package/devTools/page/static/delete.png +0 -0
- package/devTools/page/static/fileSys/AI.png +0 -0
- package/devTools/page/static/fileSys/DWG.png +0 -0
- package/devTools/page/static/fileSys/EXE.png +0 -0
- package/devTools/page/static/fileSys/GIF.png +0 -0
- package/devTools/page/static/fileSys/HTML.png +0 -0
- package/devTools/page/static/fileSys/PSD.png +0 -0
- package/devTools/page/static/fileSys/RVT.png +0 -0
- package/devTools/page/static/fileSys/SKP.png +0 -0
- package/devTools/page/static/fileSys/SVG.png +0 -0
- package/devTools/page/static/fileSys/excel.png +0 -0
- package/devTools/page/static/fileSys/pdf.png +0 -0
- package/devTools/page/static/fileSys/pptl.png +0 -0
- package/devTools/page/static/fileSys/shipin.png +0 -0
- package/devTools/page/static/fileSys/tupian.png +0 -0
- package/devTools/page/static/fileSys/txt.png +0 -0
- package/devTools/page/static/fileSys/weizhiwenjian.png +0 -0
- package/devTools/page/static/fileSys/wenjianjia.png +0 -0
- package/devTools/page/static/fileSys/word.png +0 -0
- package/devTools/page/static/fileSys/yasuo.png +0 -0
- package/devTools/page/static/fileSys/yinpin.png +0 -0
- package/devTools/page/static/fold.png +0 -0
- package/devTools/page/static/menu.png +0 -0
- package/devTools/page/static/refresh.png +0 -0
- package/devTools/page/static/unfold.png +0 -0
- package/devTools/tools.vue +25 -0
- package/devTools/type/devTools.d.ts +406 -0
- package/oxy-dev-tools/components/DevToolsUiHost.vue +555 -0
- package/oxy-dev-tools/config.js +61 -0
- package/oxy-dev-tools/core/components/mpDevBubble.vue +176 -0
- package/oxy-dev-tools/core/libs/createH5Bubble.js +156 -0
- package/oxy-dev-tools/core/libs/devCache.js +149 -0
- package/oxy-dev-tools/core/libs/devOptions.js +160 -0
- package/oxy-dev-tools/core/libs/devUi.js +219 -0
- package/oxy-dev-tools/core/libs/drawView.js +144 -0
- package/oxy-dev-tools/core/libs/errorReport.js +60 -0
- package/oxy-dev-tools/core/libs/jsonCompress.js +328 -0
- package/oxy-dev-tools/core/libs/logReport.js +55 -0
- package/oxy-dev-tools/core/libs/pageLinkList.js +121 -0
- package/oxy-dev-tools/core/libs/timeFormat.js +93 -0
- package/oxy-dev-tools/core/proxy/console.js +398 -0
- package/oxy-dev-tools/core/proxy/index.js +33 -0
- package/oxy-dev-tools/core/proxy/request.js +473 -0
- package/oxy-dev-tools/core/proxy/storage.js +96 -0
- package/oxy-dev-tools/core/proxy/uniBus.js +148 -0
- package/oxy-dev-tools/core/proxy/uniListen.js +190 -0
- package/oxy-dev-tools/core/proxy/vueMixin.js +115 -0
- package/oxy-dev-tools/index.ts +183 -0
- package/oxy-dev-tools/oxy-dev-tools.vue +62 -0
- package/oxy-dev-tools/page/components/bottomTools.vue +933 -0
- package/oxy-dev-tools/page/components/dialog/addStorage.vue +184 -0
- package/oxy-dev-tools/page/components/dialog/createDir.vue +352 -0
- package/oxy-dev-tools/page/components/dialog/editDialog.vue +178 -0
- package/oxy-dev-tools/page/components/dialog/routeDialog.vue +170 -0
- package/oxy-dev-tools/page/components/dialog/sendRequest.vue +530 -0
- package/oxy-dev-tools/page/components/dialog/textFileEditDialog.vue +379 -0
- package/oxy-dev-tools/page/components/libs/appDelDir.js +77 -0
- package/oxy-dev-tools/page/components/libs/dirReader.js +239 -0
- package/oxy-dev-tools/page/components/libs/fileSize.js +15 -0
- package/oxy-dev-tools/page/components/libs/getRuntimeInfo.js +132 -0
- package/oxy-dev-tools/page/components/listItem/consoleItem.vue +292 -0
- package/oxy-dev-tools/page/components/listItem/errorItem.vue +268 -0
- package/oxy-dev-tools/page/components/listItem/fileSysItem.vue +511 -0
- package/oxy-dev-tools/page/components/listItem/infoList.vue +89 -0
- package/oxy-dev-tools/page/components/listItem/jsRunnerItem.vue +236 -0
- package/oxy-dev-tools/page/components/listItem/logItem.vue +185 -0
- package/oxy-dev-tools/page/components/listItem/networkItem.vue +362 -0
- package/oxy-dev-tools/page/components/listItem/objectAnalysis.vue +642 -0
- package/oxy-dev-tools/page/components/listItem/pages.vue +285 -0
- package/oxy-dev-tools/page/components/listItem/routeItem.vue +140 -0
- package/oxy-dev-tools/page/components/listItem/setting.vue +687 -0
- package/oxy-dev-tools/page/components/listItem/storageList.vue +623 -0
- package/oxy-dev-tools/page/components/listItem/tools.vue +273 -0
- package/oxy-dev-tools/page/components/listItem/vuexList.vue +559 -0
- package/oxy-dev-tools/page/components/main.vue +1824 -0
- package/oxy-dev-tools/page/components/mixins/animationControl.js +80 -0
- package/oxy-dev-tools/page/components/mixins/mp.js +76 -0
- package/oxy-dev-tools/page/components/ui/btnTabs.vue +77 -0
- package/oxy-dev-tools/page/components/ui/codeHisPicker.vue +161 -0
- package/oxy-dev-tools/page/components/ui/h5Cell.vue +13 -0
- package/oxy-dev-tools/page/components/ui/menuBtn.vue +87 -0
- package/oxy-dev-tools/page/components/ui/mobileSwiperScroll.vue +71 -0
- package/oxy-dev-tools/page/components/ui/requestSpeedLimit.vue +47 -0
- package/oxy-dev-tools/page/components/ui/requestTimeoutMock.vue +50 -0
- package/oxy-dev-tools/page/components/ui/subTitleBar.vue +87 -0
- package/oxy-dev-tools/page/static/copy.png +0 -0
- package/oxy-dev-tools/page/static/delete.png +0 -0
- package/oxy-dev-tools/page/static/fileSys/AI.png +0 -0
- package/oxy-dev-tools/page/static/fileSys/DWG.png +0 -0
- package/oxy-dev-tools/page/static/fileSys/EXE.png +0 -0
- package/oxy-dev-tools/page/static/fileSys/GIF.png +0 -0
- package/oxy-dev-tools/page/static/fileSys/HTML.png +0 -0
- package/oxy-dev-tools/page/static/fileSys/PSD.png +0 -0
- package/oxy-dev-tools/page/static/fileSys/RVT.png +0 -0
- package/oxy-dev-tools/page/static/fileSys/SKP.png +0 -0
- package/oxy-dev-tools/page/static/fileSys/SVG.png +0 -0
- package/oxy-dev-tools/page/static/fileSys/excel.png +0 -0
- package/oxy-dev-tools/page/static/fileSys/pdf.png +0 -0
- package/oxy-dev-tools/page/static/fileSys/pptl.png +0 -0
- package/oxy-dev-tools/page/static/fileSys/shipin.png +0 -0
- package/oxy-dev-tools/page/static/fileSys/tupian.png +0 -0
- package/oxy-dev-tools/page/static/fileSys/txt.png +0 -0
- package/oxy-dev-tools/page/static/fileSys/weizhiwenjian.png +0 -0
- package/oxy-dev-tools/page/static/fileSys/wenjianjia.png +0 -0
- package/oxy-dev-tools/page/static/fileSys/word.png +0 -0
- package/oxy-dev-tools/page/static/fileSys/yasuo.png +0 -0
- package/oxy-dev-tools/page/static/fileSys/yinpin.png +0 -0
- package/oxy-dev-tools/page/static/fold.png +0 -0
- package/oxy-dev-tools/page/static/menu.png +0 -0
- package/oxy-dev-tools/page/static/refresh.png +0 -0
- package/oxy-dev-tools/page/static/unfold.png +0 -0
- package/oxy-dev-tools/tools.vue +22 -0
- package/oxy-dev-tools/type/devTools.d.ts +406 -0
- package/package.json +1 -1
- package/tags.json +1 -1
- package/web-types.json +1 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view>
|
|
3
|
+
<MenuBtn
|
|
4
|
+
:list="typeList"
|
|
5
|
+
:value="index"
|
|
6
|
+
@indexChange="change"
|
|
7
|
+
title="超时:"
|
|
8
|
+
/>
|
|
9
|
+
</view>
|
|
10
|
+
</template>
|
|
11
|
+
<script>
|
|
12
|
+
import MenuBtn from "./menuBtn.vue";
|
|
13
|
+
export default {
|
|
14
|
+
components: {
|
|
15
|
+
MenuBtn,
|
|
16
|
+
},
|
|
17
|
+
data() {
|
|
18
|
+
return {
|
|
19
|
+
/**
|
|
20
|
+
* 随机响应超时
|
|
21
|
+
*/
|
|
22
|
+
typeList: [
|
|
23
|
+
{ title: "无", type: "", msg: "正常响应请求" },
|
|
24
|
+
{ title: "5%", type: "5", msg: "随机5%的概率请求响应超时或报错" },
|
|
25
|
+
{ title: "10%", type: "10", msg: "随机10%的概率请求响应超时或报错" },
|
|
26
|
+
{ title: "30%", type: "30", msg: "随机30%的概率请求响应超时或报错" },
|
|
27
|
+
{ title: "50%", type: "50", msg: "随机50%的概率请求响应超时或报错" },
|
|
28
|
+
{ title: "70%", type: "70", msg: "随机70%的概率请求响应超时或报错" },
|
|
29
|
+
{ title: "90%", type: "90", msg: "随机90%的概率请求响应超时或报错" },
|
|
30
|
+
{ title: "100%", type: "100", msg: "所有请求均响应超时或报错" },
|
|
31
|
+
],
|
|
32
|
+
/**
|
|
33
|
+
* 当前选中的索引
|
|
34
|
+
*/
|
|
35
|
+
index: 0,
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
mounted() {
|
|
39
|
+
let cache = uni.getStorageSync("devtools_uniResTimeout");
|
|
40
|
+
let index = this.typeList.findIndex((x) => x.type == cache);
|
|
41
|
+
if (index == -1) index = 0;
|
|
42
|
+
this.index = index;
|
|
43
|
+
},
|
|
44
|
+
methods: {
|
|
45
|
+
/**
|
|
46
|
+
* 选项发生改变事件
|
|
47
|
+
*/
|
|
48
|
+
change(index) {
|
|
49
|
+
uni.setStorageSync("devtools_uniResTimeout", this.typeList[index].type);
|
|
50
|
+
this.index = index;
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
</script>
|
|
55
|
+
<style lang="scss"></style>
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view
|
|
3
|
+
class="subTitleBar"
|
|
4
|
+
@click.stop="click"
|
|
5
|
+
>
|
|
6
|
+
<view class="left">
|
|
7
|
+
<view class="titleLine"></view>
|
|
8
|
+
<text class="titleText">{{ title }}</text>
|
|
9
|
+
</view>
|
|
10
|
+
<view
|
|
11
|
+
v-if="showArrow"
|
|
12
|
+
class="right"
|
|
13
|
+
>
|
|
14
|
+
<image
|
|
15
|
+
v-if="isOpen"
|
|
16
|
+
src="@/devTools/page/static/fold.png"
|
|
17
|
+
class="arrow"
|
|
18
|
+
/>
|
|
19
|
+
<image
|
|
20
|
+
v-else
|
|
21
|
+
src="@/devTools/page/static/unfold.png"
|
|
22
|
+
class="arrow"
|
|
23
|
+
/>
|
|
24
|
+
</view>
|
|
25
|
+
</view>
|
|
26
|
+
</template>
|
|
27
|
+
<script>
|
|
28
|
+
export default {
|
|
29
|
+
emits: ['click'],
|
|
30
|
+
props: {
|
|
31
|
+
/**
|
|
32
|
+
* 标题名称
|
|
33
|
+
*/
|
|
34
|
+
title: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: "标题",
|
|
37
|
+
},
|
|
38
|
+
/**
|
|
39
|
+
* 是否显示右侧箭头
|
|
40
|
+
*/
|
|
41
|
+
showArrow: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: true,
|
|
44
|
+
},
|
|
45
|
+
/**
|
|
46
|
+
* 是否为开启状态
|
|
47
|
+
*/
|
|
48
|
+
isOpen: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: false,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
data() {
|
|
54
|
+
return {};
|
|
55
|
+
},
|
|
56
|
+
methods: {
|
|
57
|
+
click(){
|
|
58
|
+
this.$emit('click');
|
|
59
|
+
},
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
</script>
|
|
63
|
+
<style lang="scss" scoped>
|
|
64
|
+
.subTitleBar {
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-direction: row;
|
|
67
|
+
align-items: center;
|
|
68
|
+
justify-content: space-between;
|
|
69
|
+
padding: 20rpx 0;
|
|
70
|
+
width: 100%;
|
|
71
|
+
&:active {
|
|
72
|
+
background-color: rgba(15, 23, 42, 0.04);
|
|
73
|
+
}
|
|
74
|
+
.left {
|
|
75
|
+
display: flex;
|
|
76
|
+
flex-direction: row;
|
|
77
|
+
align-items: center;
|
|
78
|
+
margin-left: 20rpx;
|
|
79
|
+
.titleLine {
|
|
80
|
+
width: 4rpx;
|
|
81
|
+
height: 24rpx;
|
|
82
|
+
border-radius: 4px;
|
|
83
|
+
background-color: #3b82f6;
|
|
84
|
+
}
|
|
85
|
+
.titleText {
|
|
86
|
+
color: #1f2937;
|
|
87
|
+
margin-left: 10rpx;
|
|
88
|
+
font-size: 28rpx;
|
|
89
|
+
font-weight: 500;
|
|
90
|
+
line-height: 30rpx;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
.right {
|
|
94
|
+
margin-right: 20rpx;
|
|
95
|
+
.arrow {
|
|
96
|
+
width: 30rpx;
|
|
97
|
+
height: 30rpx;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
</style>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="tools">
|
|
3
|
+
<!-- 在这里可以开发自己的DIY工具 -->
|
|
4
|
+
<text style="margin-top: 50rpx;color: grey;font-size: 24rpx;">Empty</text>
|
|
5
|
+
</view>
|
|
6
|
+
</template>
|
|
7
|
+
<script>
|
|
8
|
+
export default {
|
|
9
|
+
data() {
|
|
10
|
+
return {};
|
|
11
|
+
},
|
|
12
|
+
methods: {
|
|
13
|
+
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
</script>
|
|
17
|
+
<style lang="scss" scoped>
|
|
18
|
+
.tools {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
align-items: center;
|
|
22
|
+
width: 750rpx;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
</style>
|
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DevTools 导出配置选项
|
|
3
|
+
*/
|
|
4
|
+
export interface DevToolsExportOptions {
|
|
5
|
+
/**
|
|
6
|
+
* 导出时的 DevTools 版本号
|
|
7
|
+
*/
|
|
8
|
+
version: number;
|
|
9
|
+
/**
|
|
10
|
+
* 当前导出的完整配置
|
|
11
|
+
*/
|
|
12
|
+
config: DevToolsConfig;
|
|
13
|
+
/**
|
|
14
|
+
* 导出时间戳(毫秒)
|
|
15
|
+
*/
|
|
16
|
+
exportTime: number;
|
|
17
|
+
/**
|
|
18
|
+
* 导出平台标识,如 'h5'、'app'、'mp-weixin' 等
|
|
19
|
+
*/
|
|
20
|
+
platform: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* DevTools 配置
|
|
25
|
+
*/
|
|
26
|
+
export interface DevToolsConfig {
|
|
27
|
+
/**
|
|
28
|
+
* 配置版本号
|
|
29
|
+
*/
|
|
30
|
+
version: number;
|
|
31
|
+
/**
|
|
32
|
+
* 是否启用调试工具
|
|
33
|
+
*/
|
|
34
|
+
status: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* 浮窗气泡配置
|
|
37
|
+
*/
|
|
38
|
+
bubble: {
|
|
39
|
+
/**
|
|
40
|
+
* 是否显示气泡
|
|
41
|
+
*/
|
|
42
|
+
status: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* 气泡显示文字
|
|
45
|
+
*/
|
|
46
|
+
text: string;
|
|
47
|
+
/**
|
|
48
|
+
* 气泡文字颜色
|
|
49
|
+
*/
|
|
50
|
+
color: string;
|
|
51
|
+
/**
|
|
52
|
+
* 气泡背景色
|
|
53
|
+
*/
|
|
54
|
+
bgColor: string;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* 控制台日志配置
|
|
58
|
+
*/
|
|
59
|
+
console: DevToolsCacheConfig & {
|
|
60
|
+
/**
|
|
61
|
+
* 是否输出到浏览器控制台
|
|
62
|
+
*/
|
|
63
|
+
isOutput: boolean;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* 错误日志配置
|
|
67
|
+
*/
|
|
68
|
+
error: DevToolsCacheConfig;
|
|
69
|
+
/**
|
|
70
|
+
* 网络请求日志配置
|
|
71
|
+
*/
|
|
72
|
+
network: DevToolsCacheConfig;
|
|
73
|
+
/**
|
|
74
|
+
* 运行日志配置
|
|
75
|
+
*/
|
|
76
|
+
logs: DevToolsCacheConfig;
|
|
77
|
+
/**
|
|
78
|
+
* uniBus 事件总线配置
|
|
79
|
+
*/
|
|
80
|
+
uniBus: DevToolsCacheConfig & {
|
|
81
|
+
/**
|
|
82
|
+
* bus统计上限(字节)
|
|
83
|
+
*/
|
|
84
|
+
countMaxSize: number;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* 缓存相关配置
|
|
90
|
+
*/
|
|
91
|
+
export interface DevToolsCacheConfig {
|
|
92
|
+
/**
|
|
93
|
+
* 是否启用该功能
|
|
94
|
+
*/
|
|
95
|
+
status: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* 缓存相关设置
|
|
98
|
+
*/
|
|
99
|
+
cache: {
|
|
100
|
+
/**
|
|
101
|
+
* 是否启用缓存
|
|
102
|
+
*/
|
|
103
|
+
status: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* 缓存上限(字节)
|
|
106
|
+
*/
|
|
107
|
+
size: number;
|
|
108
|
+
/**
|
|
109
|
+
* 单条记录缓存上限(字节)
|
|
110
|
+
*/
|
|
111
|
+
rowSize: number;
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* 错误日志项
|
|
117
|
+
*/
|
|
118
|
+
export interface DevToolsErrorLog {
|
|
119
|
+
/**
|
|
120
|
+
* 日志时间戳
|
|
121
|
+
*/
|
|
122
|
+
t: number;
|
|
123
|
+
/**
|
|
124
|
+
* 错误信息
|
|
125
|
+
*/
|
|
126
|
+
m: string;
|
|
127
|
+
/**
|
|
128
|
+
* 错误堆栈/trace
|
|
129
|
+
*/
|
|
130
|
+
tr: string;
|
|
131
|
+
/**
|
|
132
|
+
* 页面路径
|
|
133
|
+
*/
|
|
134
|
+
p: string;
|
|
135
|
+
/**
|
|
136
|
+
* 错误类型(ve: vue error, vw: vue warn, oe: other error, n: unknown)
|
|
137
|
+
*/
|
|
138
|
+
type: string;
|
|
139
|
+
/**
|
|
140
|
+
* 可选,格式化时间
|
|
141
|
+
*/
|
|
142
|
+
date?: string;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* 控制台日志项
|
|
147
|
+
*/
|
|
148
|
+
export interface DevToolsConsoleLog {
|
|
149
|
+
/**
|
|
150
|
+
* 日志内容数组
|
|
151
|
+
*/
|
|
152
|
+
list: any[];
|
|
153
|
+
/**
|
|
154
|
+
* 日志时间戳
|
|
155
|
+
*/
|
|
156
|
+
time: number;
|
|
157
|
+
/**
|
|
158
|
+
* 日志所在页面
|
|
159
|
+
*/
|
|
160
|
+
page: string;
|
|
161
|
+
/**
|
|
162
|
+
* 日志类型
|
|
163
|
+
*/
|
|
164
|
+
type: 'log' | 'error' | 'warn' | 'info';
|
|
165
|
+
/**
|
|
166
|
+
* 可选,格式化时间
|
|
167
|
+
*/
|
|
168
|
+
date?: string;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* 网络请求日志项
|
|
173
|
+
*/
|
|
174
|
+
export interface DevToolsNetworkLog {
|
|
175
|
+
/**
|
|
176
|
+
* 请求唯一ID
|
|
177
|
+
*/
|
|
178
|
+
id: string;
|
|
179
|
+
/**
|
|
180
|
+
* 请求类型(0:请求中 1:成功 2:失败)
|
|
181
|
+
*/
|
|
182
|
+
type: number;
|
|
183
|
+
/**
|
|
184
|
+
* 请求发起时间戳
|
|
185
|
+
*/
|
|
186
|
+
sendTime: number;
|
|
187
|
+
/**
|
|
188
|
+
* 响应时间戳
|
|
189
|
+
*/
|
|
190
|
+
responseTime: number;
|
|
191
|
+
/**
|
|
192
|
+
* 请求耗时(秒,字符串)
|
|
193
|
+
*/
|
|
194
|
+
useTime: string;
|
|
195
|
+
/**
|
|
196
|
+
* 请求地址
|
|
197
|
+
*/
|
|
198
|
+
url: string;
|
|
199
|
+
/**
|
|
200
|
+
* 请求头
|
|
201
|
+
*/
|
|
202
|
+
header?: Record<string, any>;
|
|
203
|
+
/**
|
|
204
|
+
* 请求方法
|
|
205
|
+
*/
|
|
206
|
+
method: string;
|
|
207
|
+
/**
|
|
208
|
+
* 请求参数
|
|
209
|
+
*/
|
|
210
|
+
data: any;
|
|
211
|
+
/**
|
|
212
|
+
* 响应主体内容
|
|
213
|
+
*/
|
|
214
|
+
responseBody: string;
|
|
215
|
+
/**
|
|
216
|
+
* 响应头
|
|
217
|
+
*/
|
|
218
|
+
responseHeader: string;
|
|
219
|
+
/**
|
|
220
|
+
* 响应状态码
|
|
221
|
+
*/
|
|
222
|
+
responseStatus: string;
|
|
223
|
+
/**
|
|
224
|
+
* 响应错误信息
|
|
225
|
+
*/
|
|
226
|
+
responseMsg: string;
|
|
227
|
+
/**
|
|
228
|
+
* 可选,格式化时间
|
|
229
|
+
*/
|
|
230
|
+
date?: string;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* 普通日志项
|
|
235
|
+
*/
|
|
236
|
+
export interface DevToolsLog {
|
|
237
|
+
/**
|
|
238
|
+
* 日志时间戳
|
|
239
|
+
*/
|
|
240
|
+
t: number;
|
|
241
|
+
/**
|
|
242
|
+
* 日志内容
|
|
243
|
+
*/
|
|
244
|
+
m: string;
|
|
245
|
+
/**
|
|
246
|
+
* 可选,格式化时间
|
|
247
|
+
*/
|
|
248
|
+
date?: string;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* uniBus 事件日志项
|
|
253
|
+
*/
|
|
254
|
+
export interface DevToolsUniBusLog {
|
|
255
|
+
/**
|
|
256
|
+
* 日志时间戳
|
|
257
|
+
*/
|
|
258
|
+
t: number;
|
|
259
|
+
/**
|
|
260
|
+
* 事件内容
|
|
261
|
+
*/
|
|
262
|
+
e: string;
|
|
263
|
+
/**
|
|
264
|
+
* 可选,格式化时间
|
|
265
|
+
*/
|
|
266
|
+
date?: string;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* uniBus 事件统计
|
|
271
|
+
*/
|
|
272
|
+
export interface DevToolsBusCount {
|
|
273
|
+
/**
|
|
274
|
+
* 事件名
|
|
275
|
+
*/
|
|
276
|
+
e: string;
|
|
277
|
+
/**
|
|
278
|
+
* on调用次数
|
|
279
|
+
*/
|
|
280
|
+
on: number;
|
|
281
|
+
/**
|
|
282
|
+
* off调用次数
|
|
283
|
+
*/
|
|
284
|
+
off: number;
|
|
285
|
+
/**
|
|
286
|
+
* emit调用次数
|
|
287
|
+
*/
|
|
288
|
+
emit: number;
|
|
289
|
+
/**
|
|
290
|
+
* once调用次数
|
|
291
|
+
*/
|
|
292
|
+
once: number;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* 页面路由映射
|
|
297
|
+
*/
|
|
298
|
+
export interface DevToolsPageRouteMap {
|
|
299
|
+
/**
|
|
300
|
+
* 路由key:出现次数
|
|
301
|
+
*/
|
|
302
|
+
[key: string]: number;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* 页面路由Key映射
|
|
307
|
+
*/
|
|
308
|
+
export interface DevToolsPageRouteKeyMap {
|
|
309
|
+
/**
|
|
310
|
+
* 路由路径:唯一key
|
|
311
|
+
*/
|
|
312
|
+
[key: string]: number;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* 本地存储内容
|
|
317
|
+
*/
|
|
318
|
+
export interface DevToolsStorage {
|
|
319
|
+
/**
|
|
320
|
+
* 存储键值对
|
|
321
|
+
*/
|
|
322
|
+
[key: string]: any;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Pinia 状态内容
|
|
327
|
+
*/
|
|
328
|
+
export interface DevToolsPinia {
|
|
329
|
+
/**
|
|
330
|
+
* store名:状态对象
|
|
331
|
+
*/
|
|
332
|
+
[store: string]: any;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* 全局数据内容
|
|
337
|
+
*/
|
|
338
|
+
export interface DevToolsGlobalData {
|
|
339
|
+
/**
|
|
340
|
+
* 全局数据键值对
|
|
341
|
+
*/
|
|
342
|
+
[key: string]: any;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* DevTools 日志主结构
|
|
347
|
+
*/
|
|
348
|
+
export interface DevToolsLogData {
|
|
349
|
+
/**
|
|
350
|
+
* 导出配置选项
|
|
351
|
+
*/
|
|
352
|
+
exportOptions: DevToolsExportOptions;
|
|
353
|
+
/**
|
|
354
|
+
* 错误日志数组
|
|
355
|
+
*/
|
|
356
|
+
error: DevToolsErrorLog[];
|
|
357
|
+
/**
|
|
358
|
+
* 控制台日志数组
|
|
359
|
+
*/
|
|
360
|
+
console: DevToolsConsoleLog[];
|
|
361
|
+
/**
|
|
362
|
+
* 网络请求日志数组
|
|
363
|
+
*/
|
|
364
|
+
network: DevToolsNetworkLog[];
|
|
365
|
+
/**
|
|
366
|
+
* 运行日志数组
|
|
367
|
+
*/
|
|
368
|
+
logs: DevToolsLog[];
|
|
369
|
+
/**
|
|
370
|
+
* uniBus事件日志数组
|
|
371
|
+
*/
|
|
372
|
+
uniBus: DevToolsUniBusLog[];
|
|
373
|
+
/**
|
|
374
|
+
* uniBus事件统计数组
|
|
375
|
+
*/
|
|
376
|
+
busCount: DevToolsBusCount[];
|
|
377
|
+
/**
|
|
378
|
+
* 页面路由映射
|
|
379
|
+
*/
|
|
380
|
+
pageRouteMap: DevToolsPageRouteMap;
|
|
381
|
+
/**
|
|
382
|
+
* 页面路由Key映射
|
|
383
|
+
*/
|
|
384
|
+
pageRouteKeyMap: DevToolsPageRouteKeyMap;
|
|
385
|
+
/**
|
|
386
|
+
* localStorage内容
|
|
387
|
+
*/
|
|
388
|
+
storage: DevToolsStorage;
|
|
389
|
+
/**
|
|
390
|
+
* sessionStorage内容
|
|
391
|
+
*/
|
|
392
|
+
sessionStorage: DevToolsStorage;
|
|
393
|
+
/**
|
|
394
|
+
* cookie内容
|
|
395
|
+
*/
|
|
396
|
+
cookie: DevToolsStorage;
|
|
397
|
+
/**
|
|
398
|
+
* Pinia状态内容
|
|
399
|
+
*/
|
|
400
|
+
pinia: DevToolsPinia;
|
|
401
|
+
vuex: DevToolsPinia;
|
|
402
|
+
/**
|
|
403
|
+
* 全局数据内容
|
|
404
|
+
*/
|
|
405
|
+
globalData: DevToolsGlobalData;
|
|
406
|
+
}
|