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,319 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view
|
|
3
|
+
v-if="isShow"
|
|
4
|
+
class="pagesList"
|
|
5
|
+
>
|
|
6
|
+
<!-- <objectAnalysis
|
|
7
|
+
v-if="isLoaded"
|
|
8
|
+
:data="pages"
|
|
9
|
+
:isOpenFirst="true"
|
|
10
|
+
:width="710"
|
|
11
|
+
/> -->
|
|
12
|
+
<template v-if="isLoaded">
|
|
13
|
+
<view
|
|
14
|
+
v-for="(item, index) in pages"
|
|
15
|
+
:key="index"
|
|
16
|
+
class="pageItem"
|
|
17
|
+
>
|
|
18
|
+
<view class="card">
|
|
19
|
+
<text
|
|
20
|
+
v-if="pages.length === index + 1"
|
|
21
|
+
class="t-red"
|
|
22
|
+
>
|
|
23
|
+
当前页面
|
|
24
|
+
</text>
|
|
25
|
+
<view class="routeInfo">
|
|
26
|
+
<text class="path">{{ item.route }}</text>
|
|
27
|
+
<text class="options">{{ item.options || "无参数" }}</text>
|
|
28
|
+
</view>
|
|
29
|
+
<view class="actionBar">
|
|
30
|
+
<view
|
|
31
|
+
class="actionBtn"
|
|
32
|
+
@click.stop="copyRoute(item)"
|
|
33
|
+
>
|
|
34
|
+
<text class="actionText">复制路径</text>
|
|
35
|
+
</view>
|
|
36
|
+
<view
|
|
37
|
+
class="actionBtn"
|
|
38
|
+
@click.stop="copyRouteWithOptions(item)"
|
|
39
|
+
>
|
|
40
|
+
<text class="actionText">复制完整</text>
|
|
41
|
+
</view>
|
|
42
|
+
<view
|
|
43
|
+
class="actionBtn more"
|
|
44
|
+
@click.stop="openMenu(item)"
|
|
45
|
+
>
|
|
46
|
+
<text class="actionText">更多</text>
|
|
47
|
+
</view>
|
|
48
|
+
</view>
|
|
49
|
+
</view>
|
|
50
|
+
</view>
|
|
51
|
+
</template>
|
|
52
|
+
<view
|
|
53
|
+
v-else
|
|
54
|
+
class="dataLoading"
|
|
55
|
+
>
|
|
56
|
+
<text class="status">加载中</text>
|
|
57
|
+
</view>
|
|
58
|
+
</view>
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
<script>
|
|
62
|
+
import devUi from '../../../core/libs/devUi.js'
|
|
63
|
+
|
|
64
|
+
export default {
|
|
65
|
+
props: {
|
|
66
|
+
/**
|
|
67
|
+
* 是否渲染
|
|
68
|
+
*/
|
|
69
|
+
isShow: {
|
|
70
|
+
type: Boolean,
|
|
71
|
+
default: true,
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
data() {
|
|
75
|
+
return {
|
|
76
|
+
/**
|
|
77
|
+
* 是否完成加载
|
|
78
|
+
*/
|
|
79
|
+
isLoaded: false,
|
|
80
|
+
/**
|
|
81
|
+
* 页面路由数据
|
|
82
|
+
*/
|
|
83
|
+
pages: [],
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
watch: {
|
|
87
|
+
isShow(val) {
|
|
88
|
+
if (val) {
|
|
89
|
+
this.getData()
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
mounted() {
|
|
94
|
+
if (this.isShow) {
|
|
95
|
+
this.getData()
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
methods: {
|
|
99
|
+
/**
|
|
100
|
+
* 加载数据
|
|
101
|
+
*/
|
|
102
|
+
getData() {
|
|
103
|
+
this.isLoaded = false
|
|
104
|
+
|
|
105
|
+
try {
|
|
106
|
+
const currentPages = typeof getCurrentPages === 'function' ? getCurrentPages() : []
|
|
107
|
+
const pageList = currentPages
|
|
108
|
+
.map((x) => {
|
|
109
|
+
const route = this.resolvePageRoute(x)
|
|
110
|
+
const optionsObj = this.resolvePageOptions(x)
|
|
111
|
+
let options = ''
|
|
112
|
+
if (optionsObj && typeof optionsObj === 'object') {
|
|
113
|
+
Object.keys(optionsObj).forEach((key) => {
|
|
114
|
+
options = `${options + (options === '' ? '' : '&') + key}=${optionsObj[key]}`
|
|
115
|
+
})
|
|
116
|
+
}
|
|
117
|
+
return {
|
|
118
|
+
route,
|
|
119
|
+
options,
|
|
120
|
+
}
|
|
121
|
+
})
|
|
122
|
+
.filter(x => !!x.route)
|
|
123
|
+
|
|
124
|
+
this.pages = pageList
|
|
125
|
+
}
|
|
126
|
+
catch (error) {
|
|
127
|
+
this.pages = []
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
this.isLoaded = true
|
|
131
|
+
},
|
|
132
|
+
/**
|
|
133
|
+
* 解析页面路由(兼容不同平台页面实例结构)
|
|
134
|
+
*/
|
|
135
|
+
resolvePageRoute(page) {
|
|
136
|
+
try {
|
|
137
|
+
if (!page)
|
|
138
|
+
return ''
|
|
139
|
+
if (page.route)
|
|
140
|
+
return String(page.route)
|
|
141
|
+
if (page.$page && page.$page.route)
|
|
142
|
+
return String(page.$page.route)
|
|
143
|
+
if (page.$page && page.$page.fullPath)
|
|
144
|
+
return String(page.$page.fullPath).replace(/^\//, '')
|
|
145
|
+
}
|
|
146
|
+
catch (error) {}
|
|
147
|
+
return ''
|
|
148
|
+
},
|
|
149
|
+
/**
|
|
150
|
+
* 解析页面参数(兼容不同平台页面实例结构)
|
|
151
|
+
*/
|
|
152
|
+
resolvePageOptions(page) {
|
|
153
|
+
try {
|
|
154
|
+
if (!page)
|
|
155
|
+
return {}
|
|
156
|
+
if (page.options && typeof page.options === 'object')
|
|
157
|
+
return page.options
|
|
158
|
+
if (page.$page && page.$page.options && typeof page.$page.options === 'object')
|
|
159
|
+
return page.$page.options
|
|
160
|
+
}
|
|
161
|
+
catch (error) {}
|
|
162
|
+
return {}
|
|
163
|
+
},
|
|
164
|
+
/**
|
|
165
|
+
* 更多菜单
|
|
166
|
+
*/
|
|
167
|
+
openMenu(item) {
|
|
168
|
+
const that = this
|
|
169
|
+
const menu = [
|
|
170
|
+
{
|
|
171
|
+
text: `复制路径`,
|
|
172
|
+
click() {
|
|
173
|
+
that.copyToClipboard(item.route)
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
...(item.options
|
|
177
|
+
? [
|
|
178
|
+
{
|
|
179
|
+
text: `复制参数`,
|
|
180
|
+
click() {
|
|
181
|
+
that.copyToClipboard(item.options)
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
text: `复制路径+参数`,
|
|
186
|
+
click() {
|
|
187
|
+
that.copyToClipboard(item.route + (item.options ? `?${item.options}` : ''))
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
]
|
|
191
|
+
: []),
|
|
192
|
+
]
|
|
193
|
+
|
|
194
|
+
devUi.showActionSheet({
|
|
195
|
+
itemList: menu.map(x => x.text),
|
|
196
|
+
success({ tapIndex }) {
|
|
197
|
+
menu[tapIndex].click()
|
|
198
|
+
},
|
|
199
|
+
})
|
|
200
|
+
},
|
|
201
|
+
copyRoute(item) {
|
|
202
|
+
this.copyToClipboard(item.route)
|
|
203
|
+
},
|
|
204
|
+
copyRouteWithOptions(item) {
|
|
205
|
+
this.copyToClipboard(item.route + (item.options ? `?${item.options}` : ''))
|
|
206
|
+
},
|
|
207
|
+
copyToClipboard(data) {
|
|
208
|
+
uni.setClipboardData({
|
|
209
|
+
data,
|
|
210
|
+
success: () => {
|
|
211
|
+
devUi.showToast({
|
|
212
|
+
icon: 'success',
|
|
213
|
+
title: '复制成功',
|
|
214
|
+
})
|
|
215
|
+
},
|
|
216
|
+
})
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
}
|
|
220
|
+
</script>
|
|
221
|
+
|
|
222
|
+
<style lang="scss" scoped>
|
|
223
|
+
.pagesList {
|
|
224
|
+
width: 100%;
|
|
225
|
+
box-sizing: border-box;
|
|
226
|
+
display: flex;
|
|
227
|
+
flex-direction: column;
|
|
228
|
+
.pageItem {
|
|
229
|
+
padding: 10rpx 20rpx;
|
|
230
|
+
.card {
|
|
231
|
+
width: 100%;
|
|
232
|
+
box-sizing: border-box;
|
|
233
|
+
border-radius: 16rpx;
|
|
234
|
+
padding: 14rpx 16rpx 12rpx;
|
|
235
|
+
border: 1px solid rgba(148, 163, 184, 0.2);
|
|
236
|
+
background: #fff;
|
|
237
|
+
box-shadow: 0 4rpx 16rpx rgba(15, 23, 42, 0.05);
|
|
238
|
+
}
|
|
239
|
+
.t-red {
|
|
240
|
+
display: inline-flex;
|
|
241
|
+
width: fit-content;
|
|
242
|
+
font-size: 18rpx;
|
|
243
|
+
color: #fff;
|
|
244
|
+
padding: 2rpx 10rpx;
|
|
245
|
+
background-color: #3b82f6;
|
|
246
|
+
border-radius: 999rpx;
|
|
247
|
+
margin-bottom: 8rpx;
|
|
248
|
+
line-height: 24rpx;
|
|
249
|
+
}
|
|
250
|
+
.routeInfo {
|
|
251
|
+
display: flex;
|
|
252
|
+
flex-direction: column;
|
|
253
|
+
width: 100%;
|
|
254
|
+
.path {
|
|
255
|
+
font-size: 24rpx;
|
|
256
|
+
line-height: 32rpx;
|
|
257
|
+
color: #0f172a;
|
|
258
|
+
width: 100%;
|
|
259
|
+
/* #ifndef APP-PLUS */
|
|
260
|
+
word-wrap: break-word;
|
|
261
|
+
overflow-wrap: break-word;
|
|
262
|
+
white-space: normal;
|
|
263
|
+
/* #endif */
|
|
264
|
+
}
|
|
265
|
+
.options {
|
|
266
|
+
margin-top: 6rpx;
|
|
267
|
+
font-size: 20rpx;
|
|
268
|
+
line-height: 28rpx;
|
|
269
|
+
color: #64748b;
|
|
270
|
+
width: 100%;
|
|
271
|
+
/* #ifndef APP-PLUS */
|
|
272
|
+
word-wrap: break-word;
|
|
273
|
+
overflow-wrap: break-word;
|
|
274
|
+
white-space: normal;
|
|
275
|
+
/* #endif */
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
.actionBar {
|
|
279
|
+
margin-top: 10rpx;
|
|
280
|
+
display: flex;
|
|
281
|
+
justify-content: flex-end;
|
|
282
|
+
gap: 10rpx;
|
|
283
|
+
.actionBtn {
|
|
284
|
+
height: 40rpx;
|
|
285
|
+
border-radius: 999rpx;
|
|
286
|
+
border: 1px solid #bfdbfe;
|
|
287
|
+
background: #eff6ff;
|
|
288
|
+
padding: 0 14rpx;
|
|
289
|
+
display: flex;
|
|
290
|
+
align-items: center;
|
|
291
|
+
&:active {
|
|
292
|
+
background: #dbeafe;
|
|
293
|
+
}
|
|
294
|
+
&.more {
|
|
295
|
+
border-color: #cbd5e1;
|
|
296
|
+
background: #f8fafc;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
.actionText {
|
|
300
|
+
font-size: 20rpx;
|
|
301
|
+
color: #1e3a8a;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
.dataLoading {
|
|
307
|
+
width: 100%;
|
|
308
|
+
height: 100rpx;
|
|
309
|
+
display: flex;
|
|
310
|
+
flex-direction: row;
|
|
311
|
+
align-items: center;
|
|
312
|
+
justify-content: center;
|
|
313
|
+
.status {
|
|
314
|
+
font-size: 20rpx;
|
|
315
|
+
color: #888;
|
|
316
|
+
line-height: 20rpx;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
</style>
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view
|
|
3
|
+
class="routeItem"
|
|
4
|
+
@click.stop="showMenu"
|
|
5
|
+
>
|
|
6
|
+
<view class="card">
|
|
7
|
+
<text class="label">路由路径</text>
|
|
8
|
+
<text class="routeText">{{ item.path }}</text>
|
|
9
|
+
<view class="actionBar">
|
|
10
|
+
<view
|
|
11
|
+
class="actionBtn"
|
|
12
|
+
@click.stop="copyPath"
|
|
13
|
+
>
|
|
14
|
+
<text class="actionText">复制路径</text>
|
|
15
|
+
</view>
|
|
16
|
+
<view
|
|
17
|
+
v-if="!isTabBar"
|
|
18
|
+
class="actionBtn"
|
|
19
|
+
@click.stop="goRoute"
|
|
20
|
+
>
|
|
21
|
+
<text class="actionText">跳转页面</text>
|
|
22
|
+
</view>
|
|
23
|
+
<view
|
|
24
|
+
class="actionBtn more"
|
|
25
|
+
@click.stop="showMenu"
|
|
26
|
+
>
|
|
27
|
+
<text class="actionText">更多</text>
|
|
28
|
+
</view>
|
|
29
|
+
</view>
|
|
30
|
+
</view>
|
|
31
|
+
</view>
|
|
32
|
+
</template>
|
|
33
|
+
<script>
|
|
34
|
+
import devUi from "../../../core/libs/devUi.js";
|
|
35
|
+
|
|
36
|
+
export default {
|
|
37
|
+
props: {
|
|
38
|
+
item: {
|
|
39
|
+
type: Object,
|
|
40
|
+
default: () => ({}),
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
computed: {
|
|
44
|
+
isTabBar() {
|
|
45
|
+
return !!(this.item.meta && this.item.meta.isTabBar);
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
methods: {
|
|
49
|
+
/**
|
|
50
|
+
* 展示菜单
|
|
51
|
+
*/
|
|
52
|
+
showMenu() {
|
|
53
|
+
let that = this;
|
|
54
|
+
|
|
55
|
+
let menuList = [];
|
|
56
|
+
|
|
57
|
+
let p = that.item.path.substr(0, 20);
|
|
58
|
+
if (p.length == 20) {
|
|
59
|
+
p = p + "...";
|
|
60
|
+
}
|
|
61
|
+
menuList.push(`复制路径(${p})`);
|
|
62
|
+
|
|
63
|
+
if (!that.isTabBar) {
|
|
64
|
+
menuList.push("跳转至此页面");
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
devUi.showActionSheet({
|
|
68
|
+
itemList: menuList,
|
|
69
|
+
success({ tapIndex }) {
|
|
70
|
+
if (tapIndex == 0) {
|
|
71
|
+
that.copyToClipboard(that.item.path);
|
|
72
|
+
} else {
|
|
73
|
+
uni.$emit("devTools_showRouteDialog", that.item.path);
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
},
|
|
78
|
+
copyPath() {
|
|
79
|
+
this.copyToClipboard(this.item.path);
|
|
80
|
+
},
|
|
81
|
+
copyToClipboard(data) {
|
|
82
|
+
uni.setClipboardData({
|
|
83
|
+
data,
|
|
84
|
+
success: () => {
|
|
85
|
+
devUi.showToast({
|
|
86
|
+
title: "复制成功",
|
|
87
|
+
icon: "success",
|
|
88
|
+
});
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
},
|
|
92
|
+
goRoute() {
|
|
93
|
+
uni.$emit("devTools_showRouteDialog", this.item.path);
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
</script>
|
|
98
|
+
<style lang="scss" scoped>
|
|
99
|
+
.routeItem {
|
|
100
|
+
padding: 10rpx 20rpx;
|
|
101
|
+
display: flex;
|
|
102
|
+
flex-direction: column;
|
|
103
|
+
.card {
|
|
104
|
+
width: 100%;
|
|
105
|
+
box-sizing: border-box;
|
|
106
|
+
border-radius: 16rpx;
|
|
107
|
+
padding: 14rpx 16rpx 12rpx;
|
|
108
|
+
border: 1px solid rgba(148, 163, 184, 0.2);
|
|
109
|
+
background: #fff;
|
|
110
|
+
box-shadow: 0 4rpx 16rpx rgba(15, 23, 42, 0.05);
|
|
111
|
+
}
|
|
112
|
+
.label {
|
|
113
|
+
display: block;
|
|
114
|
+
font-size: 18rpx;
|
|
115
|
+
color: #64748b;
|
|
116
|
+
line-height: 24rpx;
|
|
117
|
+
margin-bottom: 4rpx;
|
|
118
|
+
}
|
|
119
|
+
.routeText {
|
|
120
|
+
width: 100%;
|
|
121
|
+
font-size: 22rpx;
|
|
122
|
+
line-height: 30rpx;
|
|
123
|
+
color: #1f2937;
|
|
124
|
+
word-break: break-all;
|
|
125
|
+
}
|
|
126
|
+
.actionBar {
|
|
127
|
+
margin-top: 10rpx;
|
|
128
|
+
display: flex;
|
|
129
|
+
justify-content: flex-end;
|
|
130
|
+
gap: 10rpx;
|
|
131
|
+
.actionBtn {
|
|
132
|
+
height: 40rpx;
|
|
133
|
+
border-radius: 999rpx;
|
|
134
|
+
border: 1px solid #bfdbfe;
|
|
135
|
+
background: #eff6ff;
|
|
136
|
+
padding: 0 14rpx;
|
|
137
|
+
display: flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
&:active {
|
|
140
|
+
background: #dbeafe;
|
|
141
|
+
}
|
|
142
|
+
&.more {
|
|
143
|
+
border-color: #cbd5e1;
|
|
144
|
+
background: #f8fafc;
|
|
145
|
+
}
|
|
146
|
+
.actionText {
|
|
147
|
+
font-size: 20rpx;
|
|
148
|
+
color: #1e3a8a;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
</style>
|