oxy-uni-ui 2.1.1 → 2.1.3
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/AbortablePromise.ts +4 -0
- package/components/common/abstracts/variable.scss +185 -68
- package/components/common/base64.ts +6 -0
- package/components/common/clickoutside.ts +5 -0
- package/components/common/interceptor.ts +9 -0
- package/components/common/path.ts +4 -0
- package/components/common/props.ts +23 -0
- package/components/common/util.ts +18 -1
- package/components/composables/index.ts +2 -0
- package/components/composables/useCell.ts +8 -1
- package/components/composables/useChildren.ts +27 -1
- package/components/composables/useCountDown.ts +10 -1
- package/components/composables/useDynamicVirtualScroll.ts +9 -0
- package/components/composables/useGlobalLoading.ts +6 -0
- package/components/composables/useGlobalMessage.ts +6 -0
- package/components/composables/useGlobalToast.ts +6 -0
- package/components/composables/useLockScroll.ts +9 -0
- package/components/composables/useParent.ts +65 -14
- package/components/composables/usePopover.ts +9 -0
- package/components/composables/useQueue.ts +8 -0
- package/components/composables/useRaf.ts +10 -0
- package/components/composables/useSharedState.ts +284 -0
- package/components/composables/useTouch.ts +8 -0
- package/components/composables/useTranslate.ts +9 -0
- package/components/composables/useUpload.ts +83 -11
- package/components/composables/useVirtualScroll.ts +7 -0
- package/components/composables/useWindowResize.ts +9 -0
- package/components/oxy-action-sheet/index.scss +5 -5
- package/components/oxy-action-sheet/oxy-action-sheet.vue +11 -0
- package/components/oxy-backtop/index.scss +2 -2
- package/components/oxy-backtop/oxy-backtop.vue +2 -0
- package/components/oxy-badge/oxy-badge.vue +2 -0
- package/components/oxy-badge/types.ts +3 -0
- package/components/oxy-button/index.scss +13 -13
- package/components/oxy-button/oxy-button.vue +11 -0
- package/components/oxy-button/types.ts +3 -3
- package/components/oxy-calendar/index.scss +17 -17
- package/components/oxy-calendar/oxy-calendar.vue +31 -0
- package/components/oxy-calendar/types.ts +3 -0
- package/components/oxy-calendar-view/month/month.vue +2 -0
- package/components/oxy-calendar-view/monthPanel/month-panel.vue +3 -1
- package/components/oxy-calendar-view/monthPanel/types.ts +10 -7
- package/components/oxy-calendar-view/oxy-calendar-view.vue +2 -0
- package/components/oxy-calendar-view/types.ts +3 -1
- package/components/oxy-calendar-view/year/types.ts +33 -1
- package/components/oxy-calendar-view/year/year.vue +2 -0
- package/components/oxy-calendar-view/yearPanel/year-panel.vue +2 -0
- package/components/oxy-card/index.scss +1 -1
- package/components/oxy-card/oxy-card.vue +2 -0
- package/components/oxy-cell/index.scss +3 -1
- package/components/oxy-cell/oxy-cell.vue +6 -4
- package/components/oxy-cell-group/oxy-cell-group.vue +2 -0
- package/components/oxy-checkbox/index.scss +41 -6
- package/components/oxy-checkbox/oxy-checkbox.vue +22 -16
- package/components/oxy-checkbox/types.ts +9 -0
- package/components/oxy-checkbox-group/index.scss +1 -1
- package/components/oxy-checkbox-group/oxy-checkbox-group.vue +2 -0
- package/components/oxy-circle/oxy-circle.vue +2 -0
- package/components/oxy-col/oxy-col.vue +3 -1
- package/components/oxy-col-picker/index.scss +3 -3
- package/components/oxy-col-picker/oxy-col-picker.vue +17 -1
- package/components/oxy-col-picker/types.ts +3 -0
- package/components/oxy-collapse/index.scss +2 -2
- package/components/oxy-collapse/oxy-collapse.vue +9 -0
- package/components/oxy-collapse-item/oxy-collapse-item.vue +4 -2
- package/components/oxy-config-provider/oxy-config-provider.vue +18 -0
- package/components/oxy-config-provider/types.ts +18 -0
- package/components/oxy-corner/index.scss +50 -32
- package/components/oxy-corner/oxy-corner.vue +2 -0
- package/components/oxy-count-down/oxy-count-down.vue +2 -0
- package/components/oxy-count-to/oxy-count-to.vue +12 -1
- package/components/oxy-count-to/types.ts +14 -4
- package/components/oxy-curtain/index.scss +10 -9
- package/components/oxy-curtain/oxy-curtain.vue +2 -0
- package/components/oxy-date-strip/oxy-date-strip.vue +22 -1
- package/components/oxy-date-strip-item/index.scss +4 -4
- package/components/oxy-date-strip-item/oxy-date-strip-item.vue +2 -0
- package/components/oxy-datetime-picker/index.scss +3 -3
- package/components/oxy-datetime-picker/oxy-datetime-picker.vue +11 -1
- package/components/oxy-datetime-picker-view/oxy-datetime-picker-view.vue +2 -0
- package/components/oxy-divider/oxy-divider.vue +2 -0
- package/components/oxy-drop-menu/index.scss +2 -2
- package/components/oxy-drop-menu/oxy-drop-menu.vue +3 -0
- package/components/oxy-drop-menu-item/index.scss +1 -1
- package/components/oxy-drop-menu-item/oxy-drop-menu-item.vue +17 -9
- package/components/oxy-echarts/oxy-echarts.vue +2 -0
- package/components/oxy-fab/index.scss +1 -1
- package/components/oxy-fab/oxy-fab.vue +27 -0
- package/components/oxy-file-list/index.scss +9 -9
- package/components/oxy-file-list/oxy-file-list.vue +29 -17
- package/components/oxy-floating-panel/oxy-floating-panel.vue +34 -10
- package/components/oxy-footer/index.scss +7 -0
- package/components/oxy-footer/oxy-footer.vue +4 -2
- package/components/oxy-footer/types.ts +9 -6
- package/components/oxy-form/oxy-form.vue +13 -1
- package/components/oxy-form-item/oxy-form-item.vue +5 -3
- package/components/oxy-gap/oxy-gap.vue +2 -0
- package/components/oxy-global-loading/oxy-global-loading.vue +18 -5
- package/components/oxy-global-message/oxy-global-message.vue +30 -17
- package/components/oxy-global-toast/oxy-global-toast.vue +18 -5
- package/components/oxy-grid/oxy-grid.vue +6 -0
- package/components/oxy-grid-item/index.scss +1 -1
- package/components/oxy-grid-item/oxy-grid-item.vue +22 -20
- package/components/oxy-guidance/index.scss +9 -9
- package/components/oxy-guidance/oxy-guidance.vue +22 -16
- package/components/oxy-icon/oxy-icon.vue +2 -0
- package/components/oxy-icon/types.ts +3 -0
- package/components/oxy-image-preview/index.scss +75 -0
- package/components/oxy-image-preview/index.ts +56 -0
- package/components/oxy-image-preview/oxy-image-preview.vue +221 -0
- package/components/oxy-image-preview/types.ts +164 -0
- package/components/oxy-img/oxy-img.vue +2 -0
- package/components/oxy-img-cropper/index.scss +2 -2
- package/components/oxy-img-cropper/oxy-img-cropper.vue +6 -0
- package/components/oxy-img-lazy/oxy-img-lazy.vue +9 -0
- package/components/oxy-index-anchor/index.scss +1 -1
- package/components/oxy-index-anchor/oxy-index-anchor.vue +2 -2
- package/components/oxy-index-bar/index.scss +1 -1
- package/components/oxy-index-bar/oxy-index-bar.vue +18 -0
- package/components/oxy-input/index.scss +2 -1
- package/components/oxy-input/oxy-input.vue +18 -4
- package/components/oxy-input/types.ts +6 -0
- package/components/oxy-input-number/index.scss +3 -1
- package/components/oxy-input-number/oxy-input-number.vue +2 -0
- package/components/oxy-keyboard/index.scss +3 -3
- package/components/oxy-keyboard/key/index.vue +2 -0
- package/components/oxy-keyboard/oxy-keyboard.vue +11 -2
- package/components/oxy-link/index.scss +8 -4
- package/components/oxy-link/oxy-link.vue +9 -3
- package/components/oxy-link/types.ts +2 -2
- package/components/oxy-list/oxy-list.vue +2 -0
- package/components/oxy-list/types.ts +7 -0
- package/components/oxy-loading/oxy-loading.vue +6 -0
- package/components/oxy-loadmore/index.scss +1 -1
- package/components/oxy-loadmore/oxy-loadmore.vue +2 -0
- package/components/oxy-long-press-menu/index.scss +1 -1
- package/components/oxy-long-press-menu/oxy-long-press-menu.vue +42 -13
- package/components/oxy-message-box/index.scss +223 -36
- package/components/oxy-message-box/index.ts +49 -23
- package/components/oxy-message-box/oxy-message-box.vue +181 -56
- package/components/oxy-message-box/types.ts +60 -2
- package/components/oxy-navbar/index.scss +1 -1
- package/components/oxy-navbar/oxy-navbar.vue +9 -6
- package/components/oxy-navbar-capsule/oxy-navbar-capsule.vue +2 -0
- package/components/oxy-notice-bar/index.scss +1 -1
- package/components/oxy-notice-bar/oxy-notice-bar.vue +29 -0
- package/components/oxy-notify/index.ts +16 -12
- package/components/oxy-notify/oxy-notify.vue +11 -4
- package/components/oxy-overlay/oxy-overlay.vue +34 -2
- package/components/oxy-pagination/oxy-pagination.vue +2 -0
- package/components/oxy-password-input/oxy-password-input.vue +2 -0
- package/components/oxy-picker/index.scss +7 -7
- package/components/oxy-picker/oxy-picker.vue +11 -0
- package/components/oxy-picker-view/index.scss +1 -1
- package/components/oxy-picker-view/oxy-picker-view.vue +2 -0
- package/components/oxy-popover/index.scss +2 -2
- package/components/oxy-popover/oxy-popover.vue +4 -1
- package/components/oxy-popup/oxy-popup.vue +8 -0
- package/components/oxy-progress/index.scss +2 -2
- package/components/oxy-progress/oxy-progress.vue +7 -0
- package/components/oxy-qrcode/draw.ts +15 -1
- package/components/oxy-qrcode/oxy-qrcode.vue +10 -3
- package/components/oxy-radio/index.scss +8 -8
- package/components/oxy-radio/oxy-radio.vue +13 -11
- package/components/oxy-radio-group/index.scss +1 -1
- package/components/oxy-radio-group/oxy-radio-group.vue +2 -0
- package/components/oxy-rate/oxy-rate.vue +5 -0
- package/components/oxy-rate/types.ts +2 -2
- package/components/oxy-resize/oxy-resize.vue +12 -0
- package/components/oxy-rich-text/index.scss +9 -9
- package/components/oxy-rich-text/oxy-rich-text.vue +6 -0
- package/components/oxy-rich-text/types.ts +15 -0
- package/components/oxy-root-portal/oxy-root-portal.vue +23 -15
- package/components/oxy-row/oxy-row.vue +2 -0
- package/components/oxy-search/index.scss +3 -3
- package/components/oxy-search/oxy-search.vue +19 -0
- package/components/oxy-segmented/index.scss +4 -4
- package/components/oxy-segmented/oxy-segmented.vue +2 -0
- package/components/oxy-select/index.scss +25 -25
- package/components/oxy-select/oxy-select.vue +27 -0
- package/components/oxy-select/types.ts +3 -0
- package/components/oxy-select-picker/index.scss +5 -5
- package/components/oxy-select-picker/oxy-select-picker.vue +7 -0
- package/components/oxy-sidebar/oxy-sidebar.vue +2 -0
- package/components/oxy-sidebar-item/index.scss +3 -3
- package/components/oxy-sidebar-item/oxy-sidebar-item.vue +17 -31
- package/components/oxy-signature/oxy-signature.vue +17 -0
- package/components/oxy-skeleton/oxy-skeleton.vue +7 -1
- package/components/oxy-slide-verify/index.scss +95 -0
- package/components/oxy-slide-verify/oxy-slide-verify.vue +244 -0
- package/components/oxy-slide-verify/types.ts +98 -0
- package/components/oxy-slider/oxy-slider.vue +3 -0
- package/components/oxy-sort-button/index.scss +6 -5
- package/components/oxy-sort-button/oxy-sort-button.vue +6 -0
- package/components/oxy-splitter/index.scss +9 -0
- package/components/oxy-splitter/oxy-splitter.vue +23 -2
- package/components/oxy-splitter-panel/index.scss +7 -5
- package/components/oxy-splitter-panel/oxy-splitter-panel.vue +93 -89
- package/components/oxy-status-tip/index.scss +3 -3
- package/components/oxy-status-tip/oxy-status-tip.vue +2 -0
- package/components/oxy-step/index.scss +4 -4
- package/components/oxy-step/oxy-step.vue +15 -13
- package/components/oxy-steps/oxy-steps.vue +2 -0
- package/components/oxy-sticky/oxy-sticky.vue +5 -3
- package/components/oxy-stream-render/oxy-stream-render.vue +29 -0
- package/components/oxy-swipe-action/oxy-swipe-action.vue +8 -0
- package/components/oxy-swiper/oxy-swiper.vue +6 -0
- package/components/oxy-swiper-nav/index.scss +4 -4
- package/components/oxy-switch/index.scss +6 -3
- package/components/oxy-switch/oxy-switch.vue +10 -0
- package/components/oxy-tab/index.scss +1 -7
- package/components/oxy-tab/oxy-tab.vue +12 -10
- package/components/oxy-tabbar/oxy-tabbar.vue +5 -0
- package/components/oxy-tabbar-item/oxy-tabbar-item.vue +11 -9
- package/components/oxy-table/index.scss +1 -1
- package/components/oxy-table/oxy-table.vue +8 -0
- package/components/oxy-table/types.ts +3 -0
- package/components/oxy-table-col/oxy-table-col.vue +21 -19
- package/components/oxy-tabs/index.scss +11 -11
- package/components/oxy-tabs/oxy-tabs.vue +17 -0
- package/components/oxy-tag/index.scss +176 -17
- package/components/oxy-tag/oxy-tag.vue +29 -2
- package/components/oxy-tag/types.ts +16 -0
- package/components/oxy-text/oxy-text.vue +12 -1
- package/components/oxy-textarea/index.scss +3 -2
- package/components/oxy-textarea/oxy-textarea.vue +10 -4
- package/components/oxy-toast/index.ts +21 -20
- package/components/oxy-toast/oxy-toast.vue +30 -5
- package/components/oxy-toast/types.ts +20 -9
- package/components/oxy-tooltip/index.scss +1 -1
- package/components/oxy-tooltip/oxy-tooltip.vue +2 -0
- package/components/oxy-transition/index.scss +3 -1
- package/components/oxy-transition/oxy-transition.vue +14 -0
- package/components/oxy-tree/index.scss +3 -3
- package/components/oxy-tree/oxy-tree.vue +28 -5
- package/components/oxy-tree/types.ts +57 -1
- package/components/oxy-upload/index.scss +9 -9
- package/components/oxy-upload/oxy-upload.vue +5 -3
- package/components/oxy-verification-code/oxy-verification-code.vue +24 -0
- package/components/oxy-video-preview/index.scss +12 -7
- package/components/oxy-video-preview/index.ts +64 -0
- package/components/oxy-video-preview/oxy-video-preview.vue +102 -31
- package/components/oxy-video-preview/types.ts +54 -8
- package/components/oxy-virtual-scroll/index.scss +1 -1
- package/components/oxy-virtual-scroll/oxy-virtual-scroll.vue +2 -0
- package/components/oxy-voice-player/index.scss +64 -64
- package/components/oxy-voice-player/oxy-voice-player.vue +38 -10
- package/components/oxy-waterfall/oxy-waterfall.vue +13 -0
- package/components/oxy-waterfall/types.ts +7 -0
- package/components/oxy-waterfall-item/oxy-waterfall-item.vue +9 -0
- package/components/oxy-watermark/oxy-watermark.vue +2 -0
- 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/global.d.ts +2 -0
- package/index.ts +2 -0
- package/locale/lang/en-US.ts +51 -2
- package/locale/lang/zh-CN.ts +51 -2
- 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 +2 -2
- package/styles/all.scss +125 -0
- package/tags.json +1 -1
- package/vite-plugins/vite-plugin-host-class.ts +166 -0
- package/web-types.json +1 -1
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import type { ComponentPublicInstance, ExtractPropTypes, PropType } from 'vue'
|
|
2
|
+
import { baseProps, makeBooleanProp, makeNumberProp, makeStringProp } from '../common/props'
|
|
3
|
+
|
|
4
|
+
export type ImagePreviewCloseIconPosition = 'top-left' | 'top-right'
|
|
5
|
+
|
|
6
|
+
export type ImagePreviewOptions = {
|
|
7
|
+
/**
|
|
8
|
+
* 图片地址列表
|
|
9
|
+
*/
|
|
10
|
+
images?: string[]
|
|
11
|
+
/**
|
|
12
|
+
* 初始展示的图片下标
|
|
13
|
+
*/
|
|
14
|
+
startPosition?: number
|
|
15
|
+
/**
|
|
16
|
+
* 是否显示页码
|
|
17
|
+
*/
|
|
18
|
+
showIndex?: boolean
|
|
19
|
+
/**
|
|
20
|
+
* 是否循环切换
|
|
21
|
+
*/
|
|
22
|
+
loop?: boolean
|
|
23
|
+
/**
|
|
24
|
+
* 是否显示关闭按钮
|
|
25
|
+
*/
|
|
26
|
+
closeable?: boolean
|
|
27
|
+
/**
|
|
28
|
+
* 关闭图标名称
|
|
29
|
+
*/
|
|
30
|
+
closeIcon?: string
|
|
31
|
+
/**
|
|
32
|
+
* 关闭图标位置
|
|
33
|
+
*/
|
|
34
|
+
closeIconPosition?: ImagePreviewCloseIconPosition
|
|
35
|
+
/**
|
|
36
|
+
* 点击图片或蒙层是否关闭
|
|
37
|
+
*/
|
|
38
|
+
closeOnClick?: boolean
|
|
39
|
+
/**
|
|
40
|
+
* 是否开启长按菜单
|
|
41
|
+
*/
|
|
42
|
+
showMenuByLongpress?: boolean
|
|
43
|
+
/**
|
|
44
|
+
* 是否显示预览层
|
|
45
|
+
*/
|
|
46
|
+
show?: boolean
|
|
47
|
+
/**
|
|
48
|
+
* 预览层级
|
|
49
|
+
*/
|
|
50
|
+
zIndex?: number
|
|
51
|
+
/**
|
|
52
|
+
* 打开回调
|
|
53
|
+
*/
|
|
54
|
+
onOpen?: () => void
|
|
55
|
+
/**
|
|
56
|
+
* 关闭回调
|
|
57
|
+
*/
|
|
58
|
+
onClose?: () => void
|
|
59
|
+
/**
|
|
60
|
+
* 切换回调
|
|
61
|
+
*/
|
|
62
|
+
onChange?: (index: number) => void
|
|
63
|
+
/**
|
|
64
|
+
* 长按回调
|
|
65
|
+
*/
|
|
66
|
+
onLongPress?: (image: string) => void
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface ImagePreview {
|
|
70
|
+
/**
|
|
71
|
+
* 打开图片预览
|
|
72
|
+
*/
|
|
73
|
+
previewImage: (options: ImagePreviewOptions | string[]) => void
|
|
74
|
+
/**
|
|
75
|
+
* 关闭图片预览
|
|
76
|
+
*/
|
|
77
|
+
closeImagePreview: () => void
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export const imagePreviewProps = {
|
|
81
|
+
...baseProps,
|
|
82
|
+
/**
|
|
83
|
+
* 指定实例标识
|
|
84
|
+
*/
|
|
85
|
+
selector: makeStringProp(''),
|
|
86
|
+
/**
|
|
87
|
+
* 图片地址列表
|
|
88
|
+
*/
|
|
89
|
+
images: {
|
|
90
|
+
type: Array as PropType<string[]>,
|
|
91
|
+
default: () => []
|
|
92
|
+
},
|
|
93
|
+
/**
|
|
94
|
+
* 初始展示的图片下标
|
|
95
|
+
*/
|
|
96
|
+
startPosition: makeNumberProp(0),
|
|
97
|
+
/**
|
|
98
|
+
* 是否显示页码
|
|
99
|
+
*/
|
|
100
|
+
showIndex: makeBooleanProp(true),
|
|
101
|
+
/**
|
|
102
|
+
* 是否循环切换
|
|
103
|
+
*/
|
|
104
|
+
loop: makeBooleanProp(true),
|
|
105
|
+
/**
|
|
106
|
+
* 是否显示关闭按钮
|
|
107
|
+
*/
|
|
108
|
+
closeable: makeBooleanProp(true),
|
|
109
|
+
/**
|
|
110
|
+
* 关闭图标名称
|
|
111
|
+
*/
|
|
112
|
+
closeIcon: makeStringProp('close'),
|
|
113
|
+
/**
|
|
114
|
+
* 关闭图标位置
|
|
115
|
+
*/
|
|
116
|
+
closeIconPosition: makeStringProp<ImagePreviewCloseIconPosition>('top-right'),
|
|
117
|
+
/**
|
|
118
|
+
* 点击图片或蒙层是否关闭
|
|
119
|
+
*/
|
|
120
|
+
closeOnClick: makeBooleanProp(true),
|
|
121
|
+
/**
|
|
122
|
+
* 是否开启长按菜单
|
|
123
|
+
*/
|
|
124
|
+
showMenuByLongpress: makeBooleanProp(true),
|
|
125
|
+
/**
|
|
126
|
+
* 打开回调
|
|
127
|
+
*/
|
|
128
|
+
onOpen: Function as PropType<() => void>,
|
|
129
|
+
/**
|
|
130
|
+
* 关闭回调
|
|
131
|
+
*/
|
|
132
|
+
onClose: Function as PropType<() => void>,
|
|
133
|
+
/**
|
|
134
|
+
* 切换回调
|
|
135
|
+
*/
|
|
136
|
+
onChange: Function as PropType<(index: number) => void>,
|
|
137
|
+
/**
|
|
138
|
+
* 长按回调
|
|
139
|
+
*/
|
|
140
|
+
onLongPress: Function as PropType<(image: string) => void>,
|
|
141
|
+
/**
|
|
142
|
+
* 预览层级
|
|
143
|
+
*/
|
|
144
|
+
zIndex: makeNumberProp(1000)
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export type ImagePreviewProps = ExtractPropTypes<typeof imagePreviewProps>
|
|
148
|
+
|
|
149
|
+
export type ImagePreviewExpose = {
|
|
150
|
+
/**
|
|
151
|
+
* 打开图片预览
|
|
152
|
+
*/
|
|
153
|
+
open: (options?: ImagePreviewOptions | string[]) => void
|
|
154
|
+
/**
|
|
155
|
+
* 关闭图片预览
|
|
156
|
+
*/
|
|
157
|
+
close: () => void
|
|
158
|
+
/**
|
|
159
|
+
* 切换到指定图片
|
|
160
|
+
*/
|
|
161
|
+
setActive: (index: number) => void
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export type ImagePreviewInstance = ComponentPublicInstance<ImagePreviewProps, ImagePreviewExpose>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
left: 0;
|
|
9
9
|
width: 100vw;
|
|
10
10
|
height: 100vh;
|
|
11
|
-
z-index:
|
|
11
|
+
z-index: $-z-index-sticky;
|
|
12
12
|
|
|
13
13
|
// 裁剪框包裹器
|
|
14
14
|
@include e(wrapper) {
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
@include m(button) {
|
|
203
203
|
position: relative;
|
|
204
204
|
text-align: left;
|
|
205
|
-
margin: 0
|
|
205
|
+
margin: 0 $-spacing-40;
|
|
206
206
|
padding-top: 4vh;
|
|
207
207
|
box-sizing: border-box;
|
|
208
208
|
|
|
@@ -69,7 +69,9 @@
|
|
|
69
69
|
export default {
|
|
70
70
|
name: 'oxy-img-cropper',
|
|
71
71
|
options: {
|
|
72
|
+
// #ifndef MP-TOUTIAO
|
|
72
73
|
virtualHost: true,
|
|
74
|
+
// #endif
|
|
73
75
|
addGlobalClass: true,
|
|
74
76
|
styleIsolation: 'shared'
|
|
75
77
|
}
|
|
@@ -170,6 +172,10 @@ const updateSystemInfo = (res?: WindowResizeResult) => {
|
|
|
170
172
|
}
|
|
171
173
|
}
|
|
172
174
|
|
|
175
|
+
/**
|
|
176
|
+
* 计算裁剪布局。根据 aspectRatio 和窗口尺寸计算裁剪框(cutWidth/cutHeight),
|
|
177
|
+
* 裁剪框垂直居中于窗口上部 85% 区域,并初始化 canvas 输出尺寸和 exportScale。
|
|
178
|
+
*/
|
|
173
179
|
function updateCropLayout() {
|
|
174
180
|
INIT_IMGWIDTH = props.imgWidth
|
|
175
181
|
INIT_IMGHEIGHT = props.imgHeight
|
|
@@ -55,7 +55,9 @@
|
|
|
55
55
|
export default {
|
|
56
56
|
name: 'oxy-img-lazy',
|
|
57
57
|
options: {
|
|
58
|
+
// #ifndef MP-TOUTIAO
|
|
58
59
|
virtualHost: true,
|
|
60
|
+
// #endif
|
|
59
61
|
addGlobalClass: true,
|
|
60
62
|
styleIsolation: 'shared'
|
|
61
63
|
}
|
|
@@ -196,6 +198,10 @@ const init = async () => {
|
|
|
196
198
|
}
|
|
197
199
|
|
|
198
200
|
// 检查组件是否在视口内
|
|
201
|
+
/**
|
|
202
|
+
* 检查组件是否在视口内。通过 boundingClientRect 与窗口尺寸对比判断。
|
|
203
|
+
* @returns 是否在视口内
|
|
204
|
+
*/
|
|
199
205
|
const isComponentInViewport = (): Promise<boolean> => {
|
|
200
206
|
return new Promise((resolve) => {
|
|
201
207
|
try {
|
|
@@ -287,6 +293,9 @@ const setupScrollDetection = () => {
|
|
|
287
293
|
}
|
|
288
294
|
|
|
289
295
|
// 滚动时检查可见性
|
|
296
|
+
/**
|
|
297
|
+
* 滚动停止后检查可见性。若未加载且进入视口则触发加载,用于 scroll-view/swiper 等场景的降级方案。
|
|
298
|
+
*/
|
|
290
299
|
const checkVisibilityOnScroll = async () => {
|
|
291
300
|
if (status.value === 0) {
|
|
292
301
|
// 只有在未加载状态下检查
|
|
@@ -30,12 +30,12 @@ const { proxy } = getCurrentInstance()!
|
|
|
30
30
|
const top = ref<number>(0)
|
|
31
31
|
|
|
32
32
|
const isSticky = computed(() => {
|
|
33
|
-
return indexBar && indexBar.props.sticky && indexBar.anchorState.activeIndex === props.index
|
|
33
|
+
return indexBar.value && indexBar.value.props.sticky && indexBar.value.anchorState.activeIndex === props.index
|
|
34
34
|
})
|
|
35
35
|
|
|
36
36
|
function getInfo() {
|
|
37
37
|
getRect(`#${indexAnchorId.value}`, false, proxy).then((res) => {
|
|
38
|
-
if (isDef(indexBar)) {
|
|
38
|
+
if (isDef(indexBar.value)) {
|
|
39
39
|
top.value = Math.floor(res.top!)
|
|
40
40
|
}
|
|
41
41
|
})
|
|
@@ -75,6 +75,10 @@ let sidebarInfo = {
|
|
|
75
75
|
indexHeight: 24
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
+
/**
|
|
79
|
+
* 初始化组件位置信息。
|
|
80
|
+
* 并行查询 indexBar 容器、侧边栏、索引项的 rect,用于后续滚动定位计算。
|
|
81
|
+
*/
|
|
78
82
|
function init() {
|
|
79
83
|
setTimeout(() => {
|
|
80
84
|
Promise.all([
|
|
@@ -93,6 +97,10 @@ onMounted(() => {
|
|
|
93
97
|
init()
|
|
94
98
|
})
|
|
95
99
|
|
|
100
|
+
/**
|
|
101
|
+
* 处理滚动事件,根据当前 scrollTop 找到对应的锚点索引。
|
|
102
|
+
* 遍历子项 top 值,匹配 scrollTop 所在区间来确定 activeIndex。
|
|
103
|
+
*/
|
|
96
104
|
function hanleScroll(scrollEvent: any) {
|
|
97
105
|
if (scrollState.touching) {
|
|
98
106
|
return
|
|
@@ -110,6 +118,11 @@ function hanleScroll(scrollEvent: any) {
|
|
|
110
118
|
scrollState.prevScrollTop = scrolltop
|
|
111
119
|
}
|
|
112
120
|
|
|
121
|
+
/**
|
|
122
|
+
* 根据触摸点的 pageY 坐标计算对应的侧边栏索引项。
|
|
123
|
+
* @param pageY - 触摸点的垂直坐标
|
|
124
|
+
* @returns 对应的子组件
|
|
125
|
+
*/
|
|
113
126
|
function getAnchorByPageY(pageY: number) {
|
|
114
127
|
const y = pageY - sidebarInfo.offsetTop
|
|
115
128
|
let idx = Math.floor(y / sidebarInfo.indexHeight)
|
|
@@ -139,6 +152,11 @@ async function handleTouchEnd(e: TouchEvent) {
|
|
|
139
152
|
scrollState.touching = false
|
|
140
153
|
}
|
|
141
154
|
|
|
155
|
+
/**
|
|
156
|
+
* 设置滚动位置。
|
|
157
|
+
* 当目标位置与当前相同时,先重置到上一次位置再跳转,解决 scroll-view 同值不触发滚动的问题。
|
|
158
|
+
* @param top - 目标滚动位置
|
|
159
|
+
*/
|
|
142
160
|
function setScrollTop(top: number) {
|
|
143
161
|
if (scrollState.scrollTop === top) {
|
|
144
162
|
scrollState.scrollTop = scrollState.prevScrollTop
|
|
@@ -158,6 +158,7 @@
|
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
@include when(disabled) {
|
|
161
|
+
opacity: $-opacity-disabled;
|
|
161
162
|
|
|
162
163
|
.oxy-input__inner {
|
|
163
164
|
color: $-input-disabled-color;
|
|
@@ -278,7 +279,7 @@
|
|
|
278
279
|
position: absolute;
|
|
279
280
|
top: 0;
|
|
280
281
|
left: 0;
|
|
281
|
-
z-index:
|
|
282
|
+
z-index: $-z-index-sticky;
|
|
282
283
|
width: 100%;
|
|
283
284
|
height: 100%;
|
|
284
285
|
}
|
|
@@ -80,7 +80,9 @@
|
|
|
80
80
|
export default {
|
|
81
81
|
name: 'oxy-input',
|
|
82
82
|
options: {
|
|
83
|
+
// #ifndef MP-TOUTIAO
|
|
83
84
|
virtualHost: true,
|
|
85
|
+
// #endif
|
|
84
86
|
addGlobalClass: true,
|
|
85
87
|
styleIsolation: 'shared'
|
|
86
88
|
}
|
|
@@ -171,18 +173,22 @@ const showWordCount = computed(() => {
|
|
|
171
173
|
* 表单错误提示信息
|
|
172
174
|
*/
|
|
173
175
|
const errorMessage = computed(() => {
|
|
174
|
-
if (form && props.prop && form.errorMessages && form.errorMessages[props.prop]) {
|
|
175
|
-
return form.errorMessages[props.prop]
|
|
176
|
+
if (form.value && props.prop && form.value.errorMessages && form.value.errorMessages[props.prop]) {
|
|
177
|
+
return form.value.errorMessages[props.prop]
|
|
176
178
|
} else {
|
|
177
179
|
return ''
|
|
178
180
|
}
|
|
179
181
|
})
|
|
180
182
|
|
|
181
183
|
// 是否展示必填
|
|
184
|
+
/**
|
|
185
|
+
* 判断是否显示必填标记
|
|
186
|
+
* 综合检查:props.required、props.rules 中的 required、以及 form.value 父组件的 rules
|
|
187
|
+
*/
|
|
182
188
|
const isRequired = computed(() => {
|
|
183
189
|
let formRequired = false
|
|
184
|
-
if (form && form.props.rules) {
|
|
185
|
-
const rules = form.props.rules
|
|
190
|
+
if (form.value && form.value.props.rules) {
|
|
191
|
+
const rules = form.value.props.rules
|
|
186
192
|
for (const key in rules) {
|
|
187
193
|
if (Object.prototype.hasOwnProperty.call(rules, key) && key === props.prop && Array.isArray(rules[key])) {
|
|
188
194
|
formRequired = rules[key].some((rule: FormItemRule) => rule.required)
|
|
@@ -237,6 +243,10 @@ function formatValue(value: string | number) {
|
|
|
237
243
|
function togglePOxyVisible() {
|
|
238
244
|
isPOxyVisible.value = !isPOxyVisible.value
|
|
239
245
|
}
|
|
246
|
+
/**
|
|
247
|
+
* 清空输入框。若 focusWhenClear 为 true,先失焦清空值,再重新聚焦,
|
|
248
|
+
* 确保小程序端键盘保持打开状态。
|
|
249
|
+
*/
|
|
240
250
|
async function handleClear() {
|
|
241
251
|
focusing.value = false
|
|
242
252
|
inputValue.value = ''
|
|
@@ -252,6 +262,10 @@ async function handleClear() {
|
|
|
252
262
|
emit('update:modelValue', inputValue.value)
|
|
253
263
|
emit('clear')
|
|
254
264
|
}
|
|
265
|
+
/**
|
|
266
|
+
* 失焦处理:延迟 150ms 等待 clear 操作完成
|
|
267
|
+
* 避免清空时重复触发 blur + clear 的连锁反应
|
|
268
|
+
*/
|
|
255
269
|
async function handleBlur() {
|
|
256
270
|
// 等待150毫秒,clear执行完毕
|
|
257
271
|
await pause(150)
|
|
@@ -14,7 +14,13 @@ export type InputMode = 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'searc
|
|
|
14
14
|
|
|
15
15
|
export const inputProps = {
|
|
16
16
|
...baseProps,
|
|
17
|
+
/**
|
|
18
|
+
* 自定义输入框外部样式类
|
|
19
|
+
*/
|
|
17
20
|
customInputClass: makeStringProp(''),
|
|
21
|
+
/**
|
|
22
|
+
* 自定义标签外部样式类
|
|
23
|
+
*/
|
|
18
24
|
customLabelClass: makeStringProp(''),
|
|
19
25
|
// 原生属性
|
|
20
26
|
/**
|
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
@include b(input-number) {
|
|
30
30
|
display: inline-flex;
|
|
31
31
|
align-items: center;
|
|
32
|
+
vertical-align: middle;
|
|
33
|
+
line-height: 1;
|
|
32
34
|
user-select: none;
|
|
33
35
|
|
|
34
36
|
@include e(action) {
|
|
@@ -82,7 +84,7 @@
|
|
|
82
84
|
display: block;
|
|
83
85
|
width: $-input-number-input-width;
|
|
84
86
|
height: $-input-number-height;
|
|
85
|
-
padding: 0
|
|
87
|
+
padding: 0 $-spacing-4;
|
|
86
88
|
box-sizing: border-box;
|
|
87
89
|
z-index: 1;
|
|
88
90
|
background: transparent;
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
justify-content: center;
|
|
29
29
|
box-sizing: content-box;
|
|
30
30
|
height: $-keyboard-title-height;
|
|
31
|
-
padding-top:
|
|
31
|
+
padding-top: $-spacing-12;
|
|
32
32
|
color: $-keyboard-title-color;
|
|
33
33
|
font-size: $-keyboard-title-font-size;
|
|
34
34
|
}
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
|
|
46
46
|
@include e(body) {
|
|
47
47
|
display: flex;
|
|
48
|
-
padding:
|
|
48
|
+
padding: $-spacing-12 0 0 $-spacing-12;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
@include e(keys) {
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
&-car {
|
|
58
58
|
@include e(body) {
|
|
59
59
|
display: flex;
|
|
60
|
-
padding:
|
|
60
|
+
padding: $-spacing-12 0 0 $-spacing-12;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
@@ -45,7 +45,9 @@
|
|
|
45
45
|
export default {
|
|
46
46
|
name: 'oxy-keyboard',
|
|
47
47
|
options: {
|
|
48
|
+
// #ifndef MP-TOUTIAO
|
|
48
49
|
virtualHost: true,
|
|
50
|
+
// #endif
|
|
49
51
|
addGlobalClass: true,
|
|
50
52
|
styleIsolation: 'shared'
|
|
51
53
|
}
|
|
@@ -59,10 +61,12 @@ import OxyKey from './key/index.vue'
|
|
|
59
61
|
import { keyboardProps, type Key, type CarKeyboardLang } from './types'
|
|
60
62
|
import type { NumberKeyType } from './key/types'
|
|
61
63
|
import { CAR_KEYBOARD_AREAS, CAR_KEYBOARD_KEYS } from './constants'
|
|
64
|
+
import { useTranslate } from '../composables/useTranslate'
|
|
62
65
|
|
|
63
66
|
const props = defineProps(keyboardProps)
|
|
64
67
|
const emit = defineEmits(['update:visible', 'input', 'close', 'delete', 'update:modelValue', 'update:carLang'])
|
|
65
68
|
const slots = useSlots()
|
|
69
|
+
const { translate } = useTranslate('keyboard')
|
|
66
70
|
|
|
67
71
|
const show = ref(props.visible)
|
|
68
72
|
watch(
|
|
@@ -149,7 +153,7 @@ function genCarKeys(): Array<Key> {
|
|
|
149
153
|
const [keys, remainKeys] = splitCarKeys()
|
|
150
154
|
return [
|
|
151
155
|
...keys,
|
|
152
|
-
{ text: carKeyboardLang.value === 'zh' ? 'ABC' : '
|
|
156
|
+
{ text: carKeyboardLang.value === 'zh' ? 'ABC' : translate('carProvince'), type: 'extra', wider: true },
|
|
153
157
|
...remainKeys,
|
|
154
158
|
{ text: props.deleteText, type: 'delete', wider: true }
|
|
155
159
|
]
|
|
@@ -165,11 +169,16 @@ const handleClose = () => {
|
|
|
165
169
|
emit('update:visible', false)
|
|
166
170
|
}
|
|
167
171
|
|
|
172
|
+
/**
|
|
173
|
+
* 键盘按键处理:根据按键类型执行输入、删除、关闭、中英切换等操作
|
|
174
|
+
* @param text - 按键文本
|
|
175
|
+
* @param type - 按键类型:extra/delete/close
|
|
176
|
+
*/
|
|
168
177
|
const handlePress = (text: string, type: NumberKeyType) => {
|
|
169
178
|
if (type === 'extra') {
|
|
170
179
|
if (text === '') {
|
|
171
180
|
return handleClose()
|
|
172
|
-
} else if (text === 'ABC' || text === '
|
|
181
|
+
} else if (text === 'ABC' || text === translate('carProvince')) {
|
|
173
182
|
const newLang = carKeyboardLang.value === 'zh' ? 'en' : 'zh'
|
|
174
183
|
if (props.carLang) {
|
|
175
184
|
emit('update:carLang', newLang)
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
@include b(link) {
|
|
5
5
|
display: inline-block;
|
|
6
6
|
|
|
7
|
-
@include m(
|
|
8
|
-
font-size: $-link-font-size-
|
|
7
|
+
@include m(default) {
|
|
8
|
+
font-size: $-link-font-size-default;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
@include m(small) {
|
|
@@ -20,6 +20,10 @@
|
|
|
20
20
|
display: inline-block;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
@include e(content) {
|
|
24
|
+
display: inline-block;
|
|
25
|
+
}
|
|
26
|
+
|
|
23
27
|
@include when(underline) {
|
|
24
28
|
text-decoration: underline;
|
|
25
29
|
}
|
|
@@ -49,10 +53,10 @@
|
|
|
49
53
|
}
|
|
50
54
|
|
|
51
55
|
.#{$B}__prefix-icon:not(:empty) + .#{$B}__content:not(:empty) {
|
|
52
|
-
padding-left:
|
|
56
|
+
padding-left: $-spacing-8;
|
|
53
57
|
}
|
|
54
58
|
|
|
55
59
|
.#{$B}__content:not(:empty) + .#{$B}__suffix-icon:not(:empty) {
|
|
56
|
-
padding-left:
|
|
60
|
+
padding-left: $-spacing-8;
|
|
57
61
|
}
|
|
58
62
|
}
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
<oxy-icon :size="fontSize" :color="color" :name="prefixIcon"></oxy-icon>
|
|
23
23
|
</view>
|
|
24
24
|
</slot>
|
|
25
|
-
<
|
|
25
|
+
<view class="oxy-link__content">
|
|
26
26
|
<slot>{{ content }}</slot>
|
|
27
|
-
</
|
|
27
|
+
</view>
|
|
28
28
|
<slot name="suffix-icon">
|
|
29
29
|
<view class="oxy-link__icon oxy-link__suffix-icon" v-if="suffixIcon">
|
|
30
30
|
<oxy-icon :size="fontSize" :color="color" :name="suffixIcon"></oxy-icon>
|
|
@@ -37,7 +37,9 @@
|
|
|
37
37
|
export default {
|
|
38
38
|
name: 'oxy-link',
|
|
39
39
|
options: {
|
|
40
|
+
// #ifndef MP-TOUTIAO
|
|
40
41
|
virtualHost: true,
|
|
42
|
+
// #endif
|
|
41
43
|
addGlobalClass: true,
|
|
42
44
|
styleIsolation: 'shared'
|
|
43
45
|
}
|
|
@@ -56,7 +58,7 @@ const emit = defineEmits(['click', 'success', 'fail', 'complete'])
|
|
|
56
58
|
// 存储超链接类名的响应式变量
|
|
57
59
|
const linkClass = ref<string>('')
|
|
58
60
|
const fontSize = computed<string>(() => {
|
|
59
|
-
if (!['small', '
|
|
61
|
+
if (!['small', 'default', 'large'].includes(props.size)) {
|
|
60
62
|
return props.size
|
|
61
63
|
}
|
|
62
64
|
return ''
|
|
@@ -109,6 +111,10 @@ function computeLinkClass() {
|
|
|
109
111
|
linkClass.value = linkClassList.join(' ')
|
|
110
112
|
}
|
|
111
113
|
|
|
114
|
+
/**
|
|
115
|
+
* 点击处理。href 模式下根据平台差异处理外链跳转:
|
|
116
|
+
* APP-PLUS 使用 plus.runtime.openURL,H5 使用 window.open,小程序使用 uni.setClipboardData 复制链接。
|
|
117
|
+
*/
|
|
112
118
|
function handleClick(event: Event) {
|
|
113
119
|
if (!props.url && props.href) {
|
|
114
120
|
// #ifdef APP-PLUS
|
|
@@ -3,7 +3,7 @@ import { baseProps, makeBooleanProp, makeStringProp } from '../common/props'
|
|
|
3
3
|
|
|
4
4
|
export type OpenType = 'navigate' | 'redirect' | 'switchTab' | 'reLaunch' | 'navigateBack' | 'exit'
|
|
5
5
|
export type LinkType = 'default' | 'primary' | 'error' | 'warning' | 'success'
|
|
6
|
-
export type SizeEnum = 'small' | '
|
|
6
|
+
export type SizeEnum = 'small' | 'default' | 'large'
|
|
7
7
|
|
|
8
8
|
export const linkProps = {
|
|
9
9
|
...baseProps,
|
|
@@ -54,7 +54,7 @@ export const linkProps = {
|
|
|
54
54
|
* 类型:string
|
|
55
55
|
* 默认值:'空字符串'
|
|
56
56
|
*/
|
|
57
|
-
size: makeStringProp<SizeEnum>('
|
|
57
|
+
size: makeStringProp<SizeEnum>('default'),
|
|
58
58
|
/**
|
|
59
59
|
* 文本颜色
|
|
60
60
|
* 类型:string
|
|
@@ -7,6 +7,13 @@ import { virtualScrollProps } from '../oxy-virtual-scroll/types'
|
|
|
7
7
|
export const listProps = {
|
|
8
8
|
...virtualScrollProps,
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* 加载更多状态,对应 oxy-loadmore 的 loadmoreState
|
|
12
|
+
* - `'loading'`:加载中
|
|
13
|
+
* - `'finished'`:全部加载完成
|
|
14
|
+
* - `'error'`:加载失败
|
|
15
|
+
* - `''`:不显示加载更多
|
|
16
|
+
*/
|
|
10
17
|
loadmoreState: String as PropType<LoadMoreState | ''>,
|
|
11
18
|
|
|
12
19
|
/**
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
export default {
|
|
10
10
|
name: 'oxy-loading',
|
|
11
11
|
options: {
|
|
12
|
+
// #ifndef MP-TOUTIAO
|
|
12
13
|
virtualHost: true,
|
|
14
|
+
// #endif
|
|
13
15
|
addGlobalClass: true,
|
|
14
16
|
styleIsolation: 'shared'
|
|
15
17
|
}
|
|
@@ -81,6 +83,10 @@ onBeforeMount(() => {
|
|
|
81
83
|
buildSvg()
|
|
82
84
|
})
|
|
83
85
|
|
|
86
|
+
/**
|
|
87
|
+
* 根据 type(ring/outline)和 color 构建 loading SVG 的 base64 编码。
|
|
88
|
+
* outline 类型仅使用主色,ring 类型使用主色和中间色渐变。
|
|
89
|
+
*/
|
|
84
90
|
function buildSvg() {
|
|
85
91
|
const { type, color } = props
|
|
86
92
|
let ringType: 'outline' | 'ring' = isDef(type) ? type : 'ring'
|