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
|
@@ -21,10 +21,6 @@
|
|
|
21
21
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
:deep(.mp-html) {
|
|
25
|
-
// Styles are now handled via tagStyle prop
|
|
26
|
-
}
|
|
27
|
-
|
|
28
24
|
.editor_toolbox {
|
|
29
25
|
width: 100%;
|
|
30
26
|
background: $-rich-text-toolbox-bg-gradient;
|
|
@@ -138,12 +134,12 @@
|
|
|
138
134
|
}
|
|
139
135
|
|
|
140
136
|
.oxy-rich-text__link-input {
|
|
141
|
-
margin-bottom:
|
|
137
|
+
margin-bottom: $-spacing-32;
|
|
142
138
|
|
|
143
139
|
.oxy-rich-text__link-label {
|
|
144
140
|
font-size: $-fs-content;
|
|
145
141
|
color: $-color-secondary;
|
|
146
|
-
margin-bottom:
|
|
142
|
+
margin-bottom: $-spacing-16;
|
|
147
143
|
}
|
|
148
144
|
}
|
|
149
145
|
|
|
@@ -50,6 +50,8 @@ export interface MpHtmlEmits {
|
|
|
50
50
|
(e: 'imgtap', attrs: { src: string; i: number }): void;
|
|
51
51
|
/** 链接被点击时触发 */
|
|
52
52
|
(e: 'linktap', attrs: { href: string }): void;
|
|
53
|
+
/** 自定义节点被点击时触发 */
|
|
54
|
+
(e: 'customtap', attrs: Record<string, any> & { innerText?: string }): void;
|
|
53
55
|
/** 音视频播放时触发 */
|
|
54
56
|
(e: 'play'): void;
|
|
55
57
|
/** 媒体加载出错时触发 */
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
* @event {Function} ready 所有图片加载完毕时触发
|
|
77
77
|
* @event {Function} imgtap 图片被点击时触发
|
|
78
78
|
* @event {Function} linktap 链接被点击时触发
|
|
79
|
+
* @event {Function} customtap 自定义节点被点击时触发
|
|
79
80
|
* @event {Function} play 音视频播放时触发
|
|
80
81
|
* @event {Function} error 媒体加载出错时触发
|
|
81
82
|
* @event {Function} pause 音视频暂停时触发
|
|
@@ -159,7 +160,7 @@ export default {
|
|
|
159
160
|
useAnchor: [Boolean, Number]
|
|
160
161
|
},
|
|
161
162
|
// #ifdef VUE3
|
|
162
|
-
emits: ['load', 'ready', 'imgtap', 'linktap', 'play', 'error'],
|
|
163
|
+
emits: ['load', 'ready', 'imgtap', 'linktap', 'customtap', 'play', 'error'],
|
|
163
164
|
// #endif
|
|
164
165
|
// #ifndef APP-PLUS-NVUE
|
|
165
166
|
components: {
|
|
@@ -37,6 +37,10 @@
|
|
|
37
37
|
<view v-else-if="n.name==='a'" :id="n.attrs.id" :class="(n.attrs.href?'_a ':'')+n.attrs.class" hover-class="_hover" :style="'display:inline;'+n.attrs.style" :data-i="i" @tap.stop="linkTap">
|
|
38
38
|
<node name="span" :childs="n.children" :opts="[opts[0],opts[1],opts[2],opts[3],opts[4],opts[5],opts[6],opts[7]+'.'+i+'.children']" style="display:inherit" />
|
|
39
39
|
</view>
|
|
40
|
+
<!-- 自定义节点 -->
|
|
41
|
+
<view v-else-if="n.name==='custom-node'" :id="n.attrs.id" :class="'_custom-node custom-node '+n.attrs.class" :style="'display:inline;'+n.attrs.style" :data-i="i" @tap.stop="customTap">
|
|
42
|
+
<node name="span" :childs="n.children" :opts="[opts[0],opts[1],opts[2],opts[3],opts[4],opts[5],opts[6],opts[7]+'.'+i+'.children']" style="display:inherit" />
|
|
43
|
+
</view>
|
|
40
44
|
<!-- 视频 -->
|
|
41
45
|
<!-- #ifdef APP-PLUS -->
|
|
42
46
|
<view v-else-if="n.html" :data-i="i" @tap="mediaTap" :id="n.attrs.id" :class="'_video '+n.attrs.class" :style="n.attrs.style" v-html="n.html" @vplay.stop="play" />
|
|
@@ -91,6 +95,7 @@ var inlineTags = {
|
|
|
91
95
|
b: true,
|
|
92
96
|
big: true,
|
|
93
97
|
code: true,
|
|
98
|
+
'custom-node': true,
|
|
94
99
|
del: true,
|
|
95
100
|
em: true,
|
|
96
101
|
i: true,
|
|
@@ -879,6 +884,19 @@ export default {
|
|
|
879
884
|
})
|
|
880
885
|
}
|
|
881
886
|
},
|
|
887
|
+
/**
|
|
888
|
+
* @description 自定义节点点击事件
|
|
889
|
+
* @param {Event} e
|
|
890
|
+
*/
|
|
891
|
+
customTap (e) {
|
|
892
|
+
if (!this.opts[5]) {
|
|
893
|
+
const node = e.currentTarget ? this.childs[e.currentTarget.dataset.i] : {}
|
|
894
|
+
const attrs = node.attrs || e
|
|
895
|
+
this.root.$emit('customtap', Object.assign({
|
|
896
|
+
innerText: this.root.getText(node.children || [])
|
|
897
|
+
}, attrs))
|
|
898
|
+
}
|
|
899
|
+
},
|
|
882
900
|
/**
|
|
883
901
|
* @description 错误事件
|
|
884
902
|
* @param {Event} e
|
|
@@ -1006,6 +1024,10 @@ export default {
|
|
|
1006
1024
|
word-break: break-all;
|
|
1007
1025
|
}
|
|
1008
1026
|
|
|
1027
|
+
._custom-node {
|
|
1028
|
+
display: inline;
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1009
1031
|
/* a 标签点击态效果 */
|
|
1010
1032
|
._hover {
|
|
1011
1033
|
text-decoration: underline;
|
|
@@ -1150,6 +1172,7 @@ export default {
|
|
|
1150
1172
|
._abbr,
|
|
1151
1173
|
._b,
|
|
1152
1174
|
._code,
|
|
1175
|
+
._custom-node,
|
|
1153
1176
|
._del,
|
|
1154
1177
|
._em,
|
|
1155
1178
|
._i,
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
// 配置
|
|
6
6
|
const config = {
|
|
7
7
|
// 信任的标签(保持标签名不变)
|
|
8
|
-
trustTags: makeMap('a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,ruby,rt,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video'),
|
|
8
|
+
trustTags: makeMap('a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,custom-node,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,ruby,rt,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video'),
|
|
9
9
|
|
|
10
10
|
// 块级标签(转为 div,其他的非信任标签转为 span)
|
|
11
11
|
blockTags: makeMap('address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section'),
|
|
12
12
|
|
|
13
13
|
// #ifdef (MP-WEIXIN || MP-QQ || APP-PLUS || MP-360) && VUE3
|
|
14
14
|
// 行内标签
|
|
15
|
-
inlineTags: makeMap('abbr,b,big,code,del,em,i,ins,label,q,small,span,strong,sub,sup'),
|
|
15
|
+
inlineTags: makeMap('abbr,b,big,code,custom-node,del,em,i,ins,label,q,small,span,strong,sub,sup'),
|
|
16
16
|
// #endif
|
|
17
17
|
|
|
18
18
|
// 要移除的标签
|
|
@@ -212,7 +212,7 @@ Parser.prototype.expose = function () {
|
|
|
212
212
|
// #ifndef APP-PLUS-NVUE
|
|
213
213
|
for (let i = this.stack.length; i--;) {
|
|
214
214
|
const item = this.stack[i]
|
|
215
|
-
if (item.c || item.name === 'a' || item.name === 'video' || item.name === 'audio') return
|
|
215
|
+
if (item.c || item.name === 'a' || item.name === 'custom-node' || item.name === 'video' || item.name === 'audio') return
|
|
216
216
|
item.c = 1
|
|
217
217
|
}
|
|
218
218
|
// #endif
|
|
@@ -369,8 +369,8 @@ Parser.prototype.onAttrName = function (name) {
|
|
|
369
369
|
if (name === 'data-src' && !this.attrs.src) {
|
|
370
370
|
// data-src 自动转为 src
|
|
371
371
|
this.attrName = 'src'
|
|
372
|
-
} else if (this.tagName === 'img' || this.tagName === 'a') {
|
|
373
|
-
// a
|
|
372
|
+
} else if (this.tagName === 'img' || this.tagName === 'a' || this.tagName === 'custom-node') {
|
|
373
|
+
// a、img、custom-node 标签保留 data- 的属性,可以在相应点击事件中使用
|
|
374
374
|
this.attrName = name
|
|
375
375
|
} else {
|
|
376
376
|
// 剩余的移除以减小大小
|
|
@@ -825,7 +825,7 @@ Parser.prototype.popNode = function () {
|
|
|
825
825
|
node.name = 'span'
|
|
826
826
|
}
|
|
827
827
|
|
|
828
|
-
if (node.name === 'a' || node.name === 'ad'
|
|
828
|
+
if (node.name === 'a' || node.name === 'ad' || node.name === 'custom-node'
|
|
829
829
|
// #ifdef H5 || APP-PLUS
|
|
830
830
|
|| node.name === 'iframe' // eslint-disable-line
|
|
831
831
|
// #endif
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
:tag-style="tagStyle"
|
|
17
17
|
:markdown="true"
|
|
18
18
|
:content="contentAi"
|
|
19
|
+
@linktap="handleLinkTap"
|
|
20
|
+
@customtap="handleCustomTap"
|
|
19
21
|
@remove="remove"
|
|
20
22
|
></mp-html>
|
|
21
23
|
</view>
|
|
@@ -103,10 +105,23 @@ import title from './icon/title.svg'
|
|
|
103
105
|
|
|
104
106
|
const props = defineProps(richTextProps)
|
|
105
107
|
|
|
108
|
+
type LinkTapEvent = {
|
|
109
|
+
href: string
|
|
110
|
+
innerText?: string
|
|
111
|
+
[key: string]: unknown
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
type CustomTapEvent = {
|
|
115
|
+
innerText?: string
|
|
116
|
+
[key: string]: unknown
|
|
117
|
+
}
|
|
118
|
+
|
|
106
119
|
const emit = defineEmits<{
|
|
107
120
|
save: [value: string]
|
|
108
121
|
clear: [void]
|
|
109
122
|
remove: [event: RemoveEvent]
|
|
123
|
+
linktap: [event: LinkTapEvent]
|
|
124
|
+
customtap: [event: CustomTapEvent]
|
|
110
125
|
}>()
|
|
111
126
|
const { translate } = useTranslate('richText')
|
|
112
127
|
const templates = [
|
|
@@ -396,6 +411,14 @@ function remove(e: RemoveEvent): void {
|
|
|
396
411
|
emit('remove', e)
|
|
397
412
|
}
|
|
398
413
|
|
|
414
|
+
function handleLinkTap(e: LinkTapEvent): void {
|
|
415
|
+
emit('linktap', e)
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
function handleCustomTap(e: CustomTapEvent): void {
|
|
419
|
+
emit('customtap', e)
|
|
420
|
+
}
|
|
421
|
+
|
|
399
422
|
// 处理底部弹窗
|
|
400
423
|
function openDialog(btn: ToolButton): void {
|
|
401
424
|
dialog.value = true
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
background-color: $-color-theme;
|
|
25
25
|
|
|
26
26
|
@include when(disabled) {
|
|
27
|
-
opacity:
|
|
27
|
+
opacity: $-opacity-disabled;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -55,19 +55,15 @@
|
|
|
55
55
|
min-width: 0;
|
|
56
56
|
z-index: 1;
|
|
57
57
|
min-height: 56rpx;
|
|
58
|
-
line-height:
|
|
58
|
+
line-height: $-line-height-base;
|
|
59
59
|
padding: 0 24rpx;
|
|
60
60
|
font-size: $-fs-content;
|
|
61
61
|
color: $-segmented-item-color;
|
|
62
62
|
font-weight: 400;
|
|
63
63
|
|
|
64
|
-
@include when(active) {
|
|
65
|
-
font-weight: 550;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
64
|
@include when(large) {
|
|
69
65
|
min-height: 64rpx;
|
|
70
|
-
line-height:
|
|
66
|
+
line-height: $-line-height-base;
|
|
71
67
|
padding: 0 24rpx;
|
|
72
68
|
font-size: $-fs-title;
|
|
73
69
|
}
|
|
@@ -75,7 +71,7 @@
|
|
|
75
71
|
|
|
76
72
|
@include when(small) {
|
|
77
73
|
min-height: 48rpx;
|
|
78
|
-
line-height:
|
|
74
|
+
line-height: $-line-height-base;
|
|
79
75
|
padding: 0 16rpx;
|
|
80
76
|
font-size: $-fs-secondary;
|
|
81
77
|
}
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
display: flex;
|
|
93
93
|
flex-wrap: wrap;
|
|
94
94
|
min-width: 0;
|
|
95
|
-
padding:
|
|
95
|
+
padding: 8rpx 0;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
.oxy-select__tags-item {
|
|
@@ -230,7 +230,7 @@
|
|
|
230
230
|
|
|
231
231
|
.oxy-select__selector-scroll {
|
|
232
232
|
/* #ifndef APP-NVUE */
|
|
233
|
-
max-height:
|
|
233
|
+
max-height: 400rpx;
|
|
234
234
|
box-sizing: border-box;
|
|
235
235
|
/* #endif */
|
|
236
236
|
}
|
|
@@ -240,10 +240,10 @@
|
|
|
240
240
|
/* #ifndef APP-NVUE */
|
|
241
241
|
display: flex;
|
|
242
242
|
/* #endif */
|
|
243
|
-
min-height:
|
|
243
|
+
min-height: 72rpx;
|
|
244
244
|
line-height: 1.4;
|
|
245
245
|
font-size: $-fs-content;
|
|
246
|
-
padding:
|
|
246
|
+
padding: 16rpx 24rpx;
|
|
247
247
|
box-sizing: border-box;
|
|
248
248
|
transition: background-color 0.2s;
|
|
249
249
|
}
|
|
@@ -262,7 +262,7 @@
|
|
|
262
262
|
&.oxy-select_selector-item_active {
|
|
263
263
|
color: $-color-theme;
|
|
264
264
|
background-color: $-select-active-bg;
|
|
265
|
-
font-weight:
|
|
265
|
+
font-weight: $-fw-medium;
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
268
|
|
|
@@ -281,7 +281,7 @@
|
|
|
281
281
|
font-size: $-fs-secondary;
|
|
282
282
|
|
|
283
283
|
&-icon {
|
|
284
|
-
margin-right:
|
|
284
|
+
margin-right: $-spacing-16;
|
|
285
285
|
animation: rotate 1s linear infinite;
|
|
286
286
|
}
|
|
287
287
|
}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
@include m(disabled) {
|
|
19
19
|
color: $-dark-color-gray;
|
|
20
|
-
|
|
20
|
+
|
|
21
21
|
&:active {
|
|
22
22
|
background-color: $-dark-background2;
|
|
23
23
|
}
|
|
@@ -39,26 +39,35 @@
|
|
|
39
39
|
box-sizing: border-box;
|
|
40
40
|
white-space: wrap;
|
|
41
41
|
line-height: $-sidebar-item-line-height;
|
|
42
|
+
transition: background-color $-sidebar-transition-duration $-sidebar-transition-timing-function,
|
|
43
|
+
border-radius $-sidebar-transition-duration $-sidebar-transition-timing-function;
|
|
42
44
|
|
|
43
45
|
&:active {
|
|
44
46
|
background-color: $-sidebar-hover-bg;
|
|
45
47
|
}
|
|
46
48
|
|
|
49
|
+
&::before {
|
|
50
|
+
position: absolute;
|
|
51
|
+
top: 50%;
|
|
52
|
+
left: 0;
|
|
53
|
+
width: $-sidebar-active-border-width;
|
|
54
|
+
height: $-sidebar-active-border-height;
|
|
55
|
+
background: $-sidebar-active-color;
|
|
56
|
+
transform: translateY(-50%) scaleY(0.5);
|
|
57
|
+
transform-origin: center;
|
|
58
|
+
opacity: 0;
|
|
59
|
+
content: '';
|
|
60
|
+
border-radius: $-sidebar-active-border-width;
|
|
61
|
+
transition: all $-sidebar-transition-duration $-sidebar-transition-timing-function;
|
|
62
|
+
}
|
|
63
|
+
|
|
47
64
|
@include m(active) {
|
|
48
|
-
font-weight: 600;
|
|
49
65
|
background: $-sidebar-active-bg;
|
|
50
66
|
color: $-sidebar-active-color;
|
|
51
67
|
|
|
52
68
|
&::before {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
left: 0;
|
|
56
|
-
width: $-sidebar-active-border-width;
|
|
57
|
-
height: $-sidebar-active-border-height;
|
|
58
|
-
background: $-sidebar-active-color;
|
|
59
|
-
transform: translateY(-50%);
|
|
60
|
-
content: '';
|
|
61
|
-
border-radius: $-sidebar-active-border-width;
|
|
69
|
+
transform: translateY(-50%) scaleY(1);
|
|
70
|
+
opacity: 1;
|
|
62
71
|
}
|
|
63
72
|
|
|
64
73
|
&:active {
|
|
@@ -34,12 +34,11 @@
|
|
|
34
34
|
@include e(label) {
|
|
35
35
|
text-align: center;
|
|
36
36
|
width: calc($-slider-handle-radius * 2);
|
|
37
|
-
line-height: calc($-slider-handle-radius * 2);
|
|
38
37
|
font-size: $-slider-fs;
|
|
39
|
-
line-height:
|
|
38
|
+
line-height: $-line-height-base;
|
|
40
39
|
color: $-slider-color;
|
|
41
40
|
background-color: $-slider-label-bg;
|
|
42
|
-
border-radius:
|
|
41
|
+
border-radius: $-radius-circle;
|
|
43
42
|
position: absolute;
|
|
44
43
|
bottom: calc($-slider-handle-radius * 2 + 16rpx);
|
|
45
44
|
}
|
|
@@ -76,8 +75,8 @@
|
|
|
76
75
|
height: calc($-slider-handle-radius * 2);
|
|
77
76
|
width: calc($-slider-handle-radius * 2);
|
|
78
77
|
background: $-slider-handle-bg;
|
|
79
|
-
border-radius:
|
|
80
|
-
border:
|
|
78
|
+
border-radius: $-radius-circle;
|
|
79
|
+
border: #{$-border-width-base} solid $-slider-axie-bg;
|
|
81
80
|
box-sizing: border-box;
|
|
82
81
|
box-shadow: 0 4rpx 8rpx 0 $-slider-button-shadow-color;
|
|
83
82
|
}
|
|
@@ -64,26 +64,23 @@
|
|
|
64
64
|
min-width: 28rpx;
|
|
65
65
|
margin-left: 4rpx;
|
|
66
66
|
vertical-align: middle;
|
|
67
|
-
line-height:
|
|
67
|
+
line-height: $-line-height-tight;
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
:
|
|
72
|
-
:deep(.oxy-sort-button__icon-down) {
|
|
73
|
-
transform: scale(calc((10 / 14)));
|
|
74
|
-
}
|
|
69
|
+
:deep(.oxy-sort-button__icon-up),
|
|
70
|
+
:deep(.oxy-sort-button__icon-down) {
|
|
71
|
+
transform: scale(calc((10 / 14)));
|
|
75
72
|
}
|
|
76
73
|
}
|
|
77
74
|
|
|
78
75
|
@include edeep(icon-up) {
|
|
79
76
|
display: block !important;
|
|
80
|
-
line-height:
|
|
77
|
+
line-height: $-line-height-tight;
|
|
81
78
|
transform: scale(calc((10 / 14))) translate(0, 14rpx);
|
|
82
79
|
}
|
|
83
80
|
|
|
84
81
|
@include edeep(icon-down) {
|
|
85
82
|
display: block !important;
|
|
86
|
-
line-height:
|
|
83
|
+
line-height: $-line-height-tight;
|
|
87
84
|
transform: scale(calc((10 / 14))) translate(0, -14rpx);
|
|
88
85
|
}
|
|
89
86
|
}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
justify-content: center;
|
|
24
24
|
flex-shrink: 0;
|
|
25
25
|
background-color: transparent;
|
|
26
|
-
transition: background-color
|
|
26
|
+
transition: background-color $-transition-duration-fast ease, box-shadow $-transition-duration-fast ease;
|
|
27
27
|
|
|
28
28
|
&::before {
|
|
29
29
|
position: absolute;
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
content: '';
|
|
32
32
|
background-color: $-splitter-line-color;
|
|
33
33
|
border-radius: $-splitter-bar-radius;
|
|
34
|
-
transition: background-color
|
|
34
|
+
transition: background-color $-transition-duration-fast ease, opacity $-transition-duration-fast ease;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
&::after {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
background-color: $-splitter-grip-active-color;
|
|
43
43
|
opacity: 0;
|
|
44
44
|
pointer-events: none;
|
|
45
|
-
transition: opacity
|
|
45
|
+
transition: opacity $-transition-duration-fast ease, transform $-transition-duration-fast ease;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
&.has-action {
|
|
@@ -157,11 +157,11 @@
|
|
|
157
157
|
width: calc(#{$-splitter-action-size} - 2rpx);
|
|
158
158
|
height: calc(#{$-splitter-action-size} * 1.72);
|
|
159
159
|
border-radius: $-splitter-action-radius;
|
|
160
|
-
border:
|
|
160
|
+
border: #{$-border-width-base} solid $-splitter-action-border;
|
|
161
161
|
background-color: $-splitter-action-bg;
|
|
162
162
|
box-shadow: $-splitter-action-shadow;
|
|
163
163
|
color: $-splitter-arrow-color;
|
|
164
|
-
transition: opacity
|
|
164
|
+
transition: opacity $-transition-duration-fast ease, box-shadow $-transition-duration-fast ease;
|
|
165
165
|
|
|
166
166
|
.oxy-splitter-panel__bar--horizontal & {
|
|
167
167
|
left: 50%;
|
|
@@ -189,11 +189,11 @@
|
|
|
189
189
|
align-items: center;
|
|
190
190
|
justify-content: center;
|
|
191
191
|
border-radius: $-splitter-action-group-radius;
|
|
192
|
-
border:
|
|
192
|
+
border: #{$-border-width-base} solid $-splitter-action-border;
|
|
193
193
|
background-color: $-splitter-action-bg;
|
|
194
194
|
box-shadow: $-splitter-action-shadow;
|
|
195
195
|
overflow: hidden;
|
|
196
|
-
transition: opacity
|
|
196
|
+
transition: opacity $-transition-duration-fast ease, box-shadow $-transition-duration-fast ease;
|
|
197
197
|
|
|
198
198
|
.oxy-splitter-panel__bar--horizontal & {
|
|
199
199
|
left: 50%;
|
|
@@ -249,7 +249,7 @@
|
|
|
249
249
|
border-radius: $-splitter-grip-radius;
|
|
250
250
|
background-color: $-splitter-grip-color;
|
|
251
251
|
opacity: 0.9;
|
|
252
|
-
transition: background-color
|
|
252
|
+
transition: background-color $-transition-duration-fast ease, opacity $-transition-duration-fast ease, transform $-transition-duration-fast ease;
|
|
253
253
|
|
|
254
254
|
.oxy-splitter-panel__bar--horizontal & {
|
|
255
255
|
top: 50%;
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
:deep(.oxy-step__icon-outer),:deep(.oxy-step__icon-inner){
|
|
33
|
-
color: $-dark-color3;
|
|
33
|
+
color: $-dark-color3;
|
|
34
34
|
border-color: $-dark-color-gray;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
@include when(dot) {
|
|
68
68
|
width: $-steps-dot-size;
|
|
69
69
|
height: $-steps-dot-size;
|
|
70
|
-
border:
|
|
70
|
+
border: #{$-border-width-base} solid transparent;
|
|
71
71
|
margin-left: -1px;
|
|
72
|
-
border-radius:
|
|
72
|
+
border-radius: $-radius-circle;
|
|
73
73
|
background: transparent;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
@@ -80,11 +80,11 @@
|
|
|
80
80
|
@include e(icon-outer) {
|
|
81
81
|
width: calc($-steps-icon-size - 4rpx);
|
|
82
82
|
height: calc($-steps-icon-size - 4rpx);
|
|
83
|
-
border:
|
|
83
|
+
border: #{$-border-width-base} solid $-steps-inactive-color;
|
|
84
84
|
color: $-steps-inactive-color;
|
|
85
85
|
text-align: center;
|
|
86
86
|
line-height: calc($-steps-icon-size - 4rpx);
|
|
87
|
-
border-radius:
|
|
87
|
+
border-radius: $-radius-circle;
|
|
88
88
|
font-size: $-steps-icon-text-fs;
|
|
89
89
|
}
|
|
90
90
|
@include e(line) {
|
|
@@ -101,17 +101,17 @@
|
|
|
101
101
|
display: block;
|
|
102
102
|
width: 100%;
|
|
103
103
|
height: 100%;
|
|
104
|
-
border-radius:
|
|
104
|
+
border-radius: $-radius-circle;
|
|
105
105
|
background: $-steps-line-color;
|
|
106
106
|
}
|
|
107
107
|
@include e(content){
|
|
108
|
-
margin-top:
|
|
108
|
+
margin-top: $-spacing-16;
|
|
109
109
|
color: $-steps-inactive-color;
|
|
110
110
|
font-size: $-steps-label-fs;
|
|
111
111
|
}
|
|
112
112
|
@include e(title) {
|
|
113
113
|
font-weight: $-steps-title-fw;
|
|
114
|
-
line-height:
|
|
114
|
+
line-height: $-line-height-loose;
|
|
115
115
|
|
|
116
116
|
@include when(description) {
|
|
117
117
|
font-size: $-steps-title-fs;
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
height: $-steps-dot-size + 20rpx;
|
|
168
168
|
left: -10rpx;
|
|
169
169
|
top: -10rpx;
|
|
170
|
-
border-radius:
|
|
170
|
+
border-radius: $-radius-circle;
|
|
171
171
|
background: $-steps-finished-color;
|
|
172
172
|
opacity: 0.2;
|
|
173
173
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
transform: translateY(-50%);
|
|
11
11
|
width: $-swiper-nav-btn-size;
|
|
12
12
|
height: $-swiper-nav-btn-size;
|
|
13
|
-
border-radius:
|
|
13
|
+
border-radius: $-radius-circle;
|
|
14
14
|
background: $-swiper-nav-btn-bg-color;
|
|
15
15
|
|
|
16
16
|
&::after {
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
width: $-swiper-nav-dot-size;
|
|
69
69
|
height: $-swiper-nav-dot-size;
|
|
70
70
|
background: $-swiper-nav-dot-color;
|
|
71
|
-
border-radius:
|
|
71
|
+
border-radius: $-radius-circle;
|
|
72
72
|
margin: 0 12rpx;
|
|
73
73
|
transition: all 0.4s ease-in;
|
|
74
74
|
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
top: 4rpx;
|
|
28
28
|
left: 4rpx;
|
|
29
29
|
background: $-switch-circle-bg;
|
|
30
|
-
border-radius:
|
|
30
|
+
border-radius: $-radius-circle;
|
|
31
31
|
transition: left .3s ease-out;
|
|
32
32
|
box-shadow: 0 4rpx 8rpx 0 $-switch-inactive-shadow-color;
|
|
33
33
|
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
left: 50%;
|
|
41
41
|
transform: translate(-50%, -50%) scale(0.5);
|
|
42
42
|
border: 2rpx solid $-switch-border-color;
|
|
43
|
-
border-radius:
|
|
43
|
+
border-radius: $-radius-circle;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
@include when(checked) {
|
|
@@ -53,6 +53,6 @@
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
@include when(disabled) {
|
|
56
|
-
opacity:
|
|
56
|
+
opacity: $-opacity-muted;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
@@ -10,17 +10,23 @@
|
|
|
10
10
|
@include e(body) {
|
|
11
11
|
@include m(inactive) {
|
|
12
12
|
height: 0;
|
|
13
|
-
transition: height
|
|
13
|
+
transition: height $-transition-duration-slow ease-in-out;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
.is-fullscreen {
|
|
19
19
|
.oxy-tab {
|
|
20
|
-
height:
|
|
20
|
+
height: auto;
|
|
21
21
|
overflow: hidden;
|
|
22
22
|
.oxy-tab__body {
|
|
23
23
|
height: 100%;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
+
|
|
27
|
+
.oxy-tabs__body.is-animated {
|
|
28
|
+
.oxy-tab {
|
|
29
|
+
height: 100%;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
26
32
|
}
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
@include m(round) {
|
|
25
|
-
margin-left:
|
|
26
|
-
margin-right:
|
|
25
|
+
margin-left: $-spacing-32;
|
|
26
|
+
margin-right: $-spacing-32;
|
|
27
27
|
border-radius: $-tabbar-round-radius;
|
|
28
28
|
box-shadow: $-tabbar-box-shadow;
|
|
29
29
|
|
|
@@ -57,6 +57,6 @@
|
|
|
57
57
|
left: 0;
|
|
58
58
|
bottom: 0;
|
|
59
59
|
right: 0;
|
|
60
|
-
z-index:
|
|
60
|
+
z-index: $-z-index-fixed;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
@@ -23,7 +23,7 @@ export default {
|
|
|
23
23
|
<script lang="ts" setup>
|
|
24
24
|
import { getCurrentInstance, onMounted, ref, watch, nextTick, computed, type CSSProperties } from 'vue'
|
|
25
25
|
import type { TabbarItem } from '../oxy-tabbar-item/types'
|
|
26
|
-
import { getRect, isDef, objToStyle } from '../common/util'
|
|
26
|
+
import { convertPxToRpx, getRect, isDef, objToStyle } from '../common/util'
|
|
27
27
|
import { useChildren } from '../composables/useChildren'
|
|
28
28
|
import { useWindowResize } from '../composables/useWindowResize'
|
|
29
29
|
import { TABBAR_KEY, tabbarProps } from './types'
|
|
@@ -103,9 +103,9 @@ function setPlaceholderHeight() {
|
|
|
103
103
|
.then((res) => {
|
|
104
104
|
const rectHeight = Number(res.height) || 0
|
|
105
105
|
const rectTop = Number(res.top)
|
|
106
|
-
const { windowHeight = 0
|
|
106
|
+
const { windowHeight = 0 } = uni.getSystemInfoSync()
|
|
107
107
|
const occupiedHeight = windowHeight && !Number.isNaN(rectTop) ? Math.max(windowHeight - rectTop, 0) : rectHeight
|
|
108
|
-
const occupiedHeightInRpx =
|
|
108
|
+
const occupiedHeightInRpx = convertPxToRpx(occupiedHeight)
|
|
109
109
|
|
|
110
110
|
placeholderHeight.value = occupiedHeight ? occupiedHeightInRpx : ''
|
|
111
111
|
})
|