stellar-ui-v2 1.37.0 → 1.38.0
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/.babelrc +8 -0
- package/App.vue +22 -0
- package/LICENSE +21 -0
- package/README.md +8 -8
- package/common/account.js +59 -0
- package/common/app-mixin.js +61 -0
- package/common/config.js +69 -0
- package/common/css/common.scss +155 -54
- package/common/css/vars.scss +51 -0
- package/common/request.js +38 -0
- package/common/token.js +13 -0
- package/common/uploadFile.js +21 -0
- package/common/usePosition.js +159 -0
- package/common/utils.js +303 -0
- package/components/item-view/item-view.vue +84 -0
- package/components/page-nav/page-nav.vue +245 -0
- package/components/t-color-picker/t-color-picker.vue +820 -0
- package/index.html +20 -0
- package/main.js +22 -0
- package/manifest.json +84 -0
- package/mp/animate-demo/animate-demo.vue +132 -0
- package/mp/badge-demo/badge-demo.vue +211 -0
- package/mp/barcode-demo/barcode-demo.vue +59 -0
- package/mp/button-demo/button-demo.vue +211 -0
- package/mp/calendar-demo/calendar-demo.vue +266 -0
- package/mp/checkbox-demo/checkbox-demo.vue +274 -0
- package/mp/code-input-demo/code-input-demo.vue +113 -0
- package/mp/color-demo/color-demo.vue +363 -0
- package/mp/date-picker-demo/date-picker-demo.vue +158 -0
- package/mp/drag-demo/drag-demo.vue +112 -0
- package/mp/dropdown-menu-demo/dropdown-menu-demo.vue +380 -0
- package/mp/icon-demo/icon-demo.vue +223 -0
- package/mp/icon-demo/icon-vertical-align.vue +236 -0
- package/mp/image-demo/image-demo.vue +140 -0
- package/mp/index/index.vue +588 -0
- package/mp/index-list-demo/index-list-demo.vue +111 -0
- package/mp/input-demo/input-demo.vue +230 -0
- package/mp/loading-demo/loading-demo.vue +71 -0
- package/mp/media-preview-demo/media-preview-demo.vue +139 -0
- package/mp/message-box-demo/message-box-demo.vue +200 -0
- package/mp/notice-bar-demo/notice-bar-demo.vue +107 -0
- package/mp/number-keyboard-demo/number-keyboard-demo.vue +138 -0
- package/mp/popup-demo/popup-demo.vue +351 -0
- package/mp/price-demo/price-demo.vue +163 -0
- package/mp/progress-demo/progress-demo.vue +219 -0
- package/mp/qrcode-demo/qrcode-demo.vue +74 -0
- package/mp/radio-demo/radio-demo.vue +276 -0
- package/mp/rate-demo/rate-demo.vue +112 -0
- package/mp/read-more-demo/read-more-demo.vue +118 -0
- package/mp/rich-text-demo/rich-text-demo.vue +58 -0
- package/mp/scroll-to-demo/scroll-to-demo.vue +65 -0
- package/mp/search-demo/search-demo.vue +225 -0
- package/mp/select-demo/select-demo.vue +245 -0
- package/mp/signature-demo/signature-demo.vue +74 -0
- package/mp/slider-demo/slider-demo.vue +197 -0
- package/mp/stepper-demo/stepper-demo.vue +201 -0
- package/mp/steps-demo/steps-demo.vue +119 -0
- package/mp/sticky-demo/sticky-demo.vue +64 -0
- package/mp/swipe-action-demo/swipe-action-demo.vue +223 -0
- package/mp/swiper-demo/swiper-demo.vue +120 -0
- package/mp/switch-demo/switch-demo.vue +108 -0
- package/mp/table-demo/table-demo.vue +647 -0
- package/mp/tabs-demo/tabs-demo.vue +518 -0
- package/mp/test-demo/test-demo.vue +248 -0
- package/mp/text-demo/text-demo.vue +109 -0
- package/mp/toast-demo/toast-demo.vue +189 -0
- package/mp/touch-swipe-demo/touch-swipe-demo.vue +97 -0
- package/mp/tour-demo/tour-demo.vue +103 -0
- package/mp/tree-demo/tree-demo.vue +156 -0
- package/mp/upload-demo/upload-demo.vue +176 -0
- package/mp/video-demo/video-demo.vue +61 -0
- package/package.json +27 -6
- package/pages/404/404.vue +194 -0
- package/pages/gitlab/gitlab.vue +50 -0
- package/pages/index/index.vue +36 -0
- package/pages/login/login.vue +149 -0
- package/pages/user/user.vue +277 -0
- package/pages.json +809 -0
- package/pc/index/components/append-link.vue +61 -0
- package/pc/index/components/comment.vue +347 -0
- package/pc/index/components/comp-nav.vue +135 -0
- package/pc/index/components/header-nav.vue +74 -0
- package/pc/index/components/version-select.vue +217 -0
- package/pc/index/iPhone13.png +0 -0
- package/pc/index/index.vue +554 -0
- package/pc/index/login.vue +146 -0
- package/pc/index/md2html.js +163 -0
- package/pc/index/mdStyle.scss +270 -0
- package/pc/index/sse.js +22 -0
- package/pc/markdown/devGuide/93-/347/273/204/344/273/266/346/233/277/346/215/242/350/247/204/350/214/203.md +18 -0
- package/pc/markdown/devGuide/94-/345/274/200/345/217/221/350/256/241/345/210/222.md +1083 -0
- package/pc/markdown/devGuide/95-/347/273/204/344/273/266/345/221/275/345/220/215/350/247/204/350/214/203.md +78 -0
- package/pc/markdown/devGuide/96-/347/273/204/344/273/266/347/244/272/344/276/213/346/250/241/346/235/277.md +49 -0
- package/pc/markdown/devGuide/99-/347/273/204/344/273/266/345/272/223/345/274/200/345/217/221/346/214/207/345/215/227.md +93 -0
- package/pc/markdown/devGuide/config.json +5 -0
- package/pc/markdown/handbook/1-/344/273/213/347/273/215.md +34 -0
- package/pc/markdown/handbook/2-/345/277/253/351/200/237/344/270/212/346/211/213.md +59 -0
- package/pc/markdown/handbook/3-/350/207/252/345/256/232/344/271/211/344/270/273/351/242/230.md +35 -0
- package/pc/markdown/handbook/4-/347/273/204/344/273/266/346/265/213/350/257/225.md +24 -0
- package/pc/markdown/handbook/97-/346/233/264/346/226/260/346/227/245/345/277/227.md +1773 -0
- package/pc/markdown/handbook/98-/345/205/266/344/273/226/346/217/222/344/273/266.md +28 -0
- package/pc/markdown/handbook/99-/345/217/213/346/203/205/351/223/276/346/216/245.md +71 -0
- package/pc/markdown/handbook/config.json +4 -0
- package/pc/markdown/index.js +75 -0
- package/pc/markdown/requireFiles.js +103 -0
- package/pc/service/app.js +33 -0
- package/pc/service/config.json +16 -0
- package/pc/service/datas/ste-rich-text.txt +2 -0
- package/pc/service/package-lock.json +1328 -0
- package/pc/service/package.json +27 -0
- package/pc/service/src/routers.js +100 -0
- package/pc/service/src/utils/Applet.js +7 -0
- package/pc/service/src/utils/Code.js +70 -0
- package/pc/service/src/utils/Data.js +84 -0
- package/pc/service/src/utils/Redis.js +35 -0
- package/pc/service/src/utils/User.js +65 -0
- package/pc/service/src/utils/Utils.js +31 -0
- package/pc/service/src/utils/getConfig.js +7 -0
- package/pc/service/webs/index.js +11 -0
- package/prettier.config.js +20 -0
- package/router.js +22 -0
- package/static/astronaut.svg +1 -0
- package/static/favicon.png +0 -0
- package/static/planet.svg +1 -0
- package/static/reset.png +0 -0
- package/static/tabbars/home.png +0 -0
- package/static/tabbars/home_fill.png +0 -0
- package/static/tabbars/people.png +0 -0
- package/static/tabbars/people_fill.png +0 -0
- package/template.h5.html +31 -0
- package/test/components/badge.test.js +75 -0
- package/test/components/barcode.test.js +22 -0
- package/test/components/button.test.js +52 -0
- package/test/components/calendar.test.js +105 -0
- package/test/components/checkbox.test.js +103 -0
- package/test/components/code-input.test.js +61 -0
- package/test/components/date-picker.test.js +18 -0
- package/test/components/drag.test.js +6 -0
- package/test/components/drop-down-menu.test.js +47 -0
- package/test/components/icon.test.js +65 -0
- package/test/components/image.test.js +64 -0
- package/test/components/index-list.test.js +77 -0
- package/test/components/input.test.js +82 -0
- package/test/components/loading.test.js +63 -0
- package/test/components/media-preview.test.js +46 -0
- package/test/components/message-box.test.js +118 -0
- package/test/components/notice-bar.test.js +59 -0
- package/test/components/number-keyboard.test.js +77 -0
- package/test/components/popup.test.js +20 -0
- package/test/components/price.test.js +116 -0
- package/test/components/progress.test.js +94 -0
- package/test/components/radio.test.js +98 -0
- package/test/components/rate.test.js +94 -0
- package/test/components/read-more.test.js +33 -0
- package/test/components/rich-text.test.js +20 -0
- package/test/components/scroll-to.test.js +54 -0
- package/test/components/search.test.js +107 -0
- package/test/components/select.test.js +111 -0
- package/test/components/signature.test.js +50 -0
- package/test/components/slider.test.js +69 -0
- package/test/components/stepper.test.js +113 -0
- package/test/components/steps.test.js +54 -0
- package/test/components/sticky.test.js +40 -0
- package/test/components/swipe-action.test.js +76 -0
- package/test/components/swiper.test.js +130 -0
- package/test/components/switch.test.js +53 -0
- package/test/components/tabs.test.js +273 -0
- package/test/components/text.test.js +17 -0
- package/test/components/touch-swipe.test.js +113 -0
- package/test/components/tour.test.js +146 -0
- package/test/components/tree.test.js +111 -0
- package/test/components/upload.test.js +116 -0
- package/test/components/video.test.js +48 -0
- package/test/methods.js +74 -0
- package/test/setup.js +32 -0
- package/test/utils/Color.test.js +26 -0
- package/test/utils/utils.test.js +42 -0
- package/uni.promisify.adaptor.js +10 -0
- package/uni.scss +4 -0
- package/uni_modules/stellar-ui/README.md +177 -0
- package/uni_modules/stellar-ui/common/css/common.scss +61 -0
- package/{components → uni_modules/stellar-ui/components}/ste-calendar/README.md +1 -1
- package/{components → uni_modules/stellar-ui/components}/ste-date-picker/ste-date-picker.vue +407 -407
- package/{components → uni_modules/stellar-ui/components}/ste-input/README.md +1 -1
- package/{components → uni_modules/stellar-ui/components}/ste-picker/ste-picker.vue +2 -2
- package/{components → uni_modules/stellar-ui/components}/ste-search/ste-search.vue +1 -1
- package/{components → uni_modules/stellar-ui/components}/ste-table/README.md +4 -4
- package/uni_modules/stellar-ui/package-lock.json +22 -0
- package/uni_modules/stellar-ui/package.json +18 -0
- package/vitest.config.js +14 -0
- package/vue.config.js +32 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-animate/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-animate/animate.scss +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-animate/ste-animate.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-badge/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-badge/ste-badge.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-barcode/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-barcode/encode2.js +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-barcode/ste-barcode.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-button/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-button/ste-button.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-calendar/self-date.js +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-calendar/ste-calendar.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-checkbox/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-checkbox/ste-checkbox.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-checkbox-group/ste-checkbox-group.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-code-input/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-code-input/ste-code-input.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-date-picker/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-drag/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-drag/ste-drag.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-dropdown-menu/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-dropdown-menu/ste-dropdown-menu.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-dropdown-menu-item/ste-dropdown-menu-item.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-icon/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-icon/iconfont.css +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-icon/ste-icon.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-image/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-image/ste-image.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-index-item/ste-index-item.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-index-list/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-index-list/ste-index-list.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-input/ste-input.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-loading/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-loading/ste-loading.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-media-preview/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-media-preview/TouchScaleing.js +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-media-preview/ste-media-preview.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-message-box/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-message-box/ste-message-box.js +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-message-box/ste-message-box.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-notice-bar/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-notice-bar/ste-notice-bar.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-number-keyboard/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-number-keyboard/keyboard.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-number-keyboard/ste-number-keyboard.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-popup/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-popup/ste-popup.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-price/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-price/ste-price.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-progress/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-progress/ste-progress.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-qrcode/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-qrcode/ste-qrcode.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-qrcode/uqrcode.js +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-radio/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-radio/ste-radio.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-radio-group/ste-radio-group.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-rate/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-rate/ste-rate.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-read-more/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-read-more/ste-read-more.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-rich-text/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-rich-text/ste-rich-text.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-scroll-to/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-scroll-to/mixin.js +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-scroll-to/ste-scroll-to.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-scroll-to-item/ste-scroll-to-item.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-search/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-select/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-select/datapager.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-select/datetime.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-select/defaultDate.js +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-select/ste-select.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-signature/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-signature/ste-signature.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-slider/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-slider/ste-slider.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-step/ste-step.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-stepper/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-stepper/ste-stepper.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-steps/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-steps/ste-steps.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-sticky/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-sticky/ste-sticky.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-swipe-action/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-swipe-action/ste-swipe-action.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-swipe-action-group/ste-swipe-action-group.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-swiper/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-swiper/ste-swiper.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-swiper-item/ste-swiper-item.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-switch/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-switch/ste-switch.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-tab/ste-tab.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-table/common.js +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-table/ste-table.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-table/utils.js +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-table-column/checkbox-icon.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-table-column/common.scss +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-table-column/radio-icon.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-table-column/ste-table-column.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-table-column/sub-table.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-table-column/table-popover.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-table-column/var.scss +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-tabs/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-tabs/props.js +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-tabs/ste-tabs.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-text/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-text/ste-text.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-toast/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-toast/ste-toast.js +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-toast/ste-toast.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-touch-swipe/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-touch-swipe/TouchEvent.js +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-touch-swipe/ste-touch-swipe.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-touch-swipe-item/ste-touch-swipe-item.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-tour/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-tour/ste-tour.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-tree/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-tree/ste-tree.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-upload/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-upload/ReadFile.js +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-upload/ste-upload.vue +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-video/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-video/props.js +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-video/ste-video.vue +0 -0
- /package/{config → uni_modules/stellar-ui/config}/color.js +0 -0
- /package/{index.js → uni_modules/stellar-ui/index.js} +0 -0
- /package/{utils → uni_modules/stellar-ui/utils}/Color.js +0 -0
- /package/{utils → uni_modules/stellar-ui/utils}/System.js +0 -0
- /package/{utils → uni_modules/stellar-ui/utils}/dayjs.min.js +0 -0
- /package/{utils → uni_modules/stellar-ui/utils}/mixin.js +0 -0
- /package/{utils → uni_modules/stellar-ui/utils}/store.js +0 -0
- /package/{utils → uni_modules/stellar-ui/utils}/utils.js +0 -0
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="nav-box" :style="[pageStyle, { paddingTop: navbarTop + 'rpx' }]">
|
|
3
|
+
<div class="nav" :style="{ width: navbarWidth + 'rpx', height: navbarHeight + 'rpx' }">
|
|
4
|
+
<!-- #ifdef MP-WEIXIN || H5 -->
|
|
5
|
+
<div v-if="autoBack" class="back-box">
|
|
6
|
+
<div
|
|
7
|
+
class="back"
|
|
8
|
+
:style="{ backgroundColor: backBackgroundColor, borderColor: backBorderColor, opacity: opacity }"
|
|
9
|
+
>
|
|
10
|
+
<ste-icon v-if="isFirstPage" code="" weight="bold" :size="28" :color="backColor"></ste-icon>
|
|
11
|
+
<ste-icon v-else code="" weight="bold" :size="28" :color="backColor"></ste-icon>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="back-click-hot" @click="navBack"></div>
|
|
14
|
+
</div>
|
|
15
|
+
<div v-else style="width: 20rpx"></div>
|
|
16
|
+
<!-- #endif -->
|
|
17
|
+
<!-- #ifdef MP-ALIPAY -->
|
|
18
|
+
<div class="ali-back-box"></div>
|
|
19
|
+
<!-- #endif -->
|
|
20
|
+
<div v-if="title && titleAlignment === '1'" class="title" :style="{ color: titleColor }">{{ title }}</div>
|
|
21
|
+
<div class="slot-default"><slot name="default"></slot></div>
|
|
22
|
+
</div>
|
|
23
|
+
<div
|
|
24
|
+
v-if="title && titleAlignment === '2'"
|
|
25
|
+
class="title-center"
|
|
26
|
+
:style="{
|
|
27
|
+
color: titleColor,
|
|
28
|
+
height: navbarHeight + 'rpx',
|
|
29
|
+
lineHeight: navbarHeight + 'rpx',
|
|
30
|
+
paddingTop: navbarTop + 'rpx',
|
|
31
|
+
}"
|
|
32
|
+
>
|
|
33
|
+
{{ title }}
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
|
+
<script>
|
|
38
|
+
import usePosition from '@/common/usePosition.js';
|
|
39
|
+
import utils from '@/common/utils.js';
|
|
40
|
+
let pos = usePosition();
|
|
41
|
+
export default {
|
|
42
|
+
name: 'page-nav',
|
|
43
|
+
props: {
|
|
44
|
+
// 是否显示返回按钮
|
|
45
|
+
autoBack: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: true,
|
|
48
|
+
},
|
|
49
|
+
// 返回按钮颜色
|
|
50
|
+
backColor: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: '#fff',
|
|
53
|
+
},
|
|
54
|
+
// 返回按钮的背景颜色
|
|
55
|
+
backBackgroundColor: {
|
|
56
|
+
type: String,
|
|
57
|
+
default: 'transparent',
|
|
58
|
+
// default: 'orange',
|
|
59
|
+
},
|
|
60
|
+
opacity: {
|
|
61
|
+
type: Number,
|
|
62
|
+
default: 1,
|
|
63
|
+
},
|
|
64
|
+
// 返回按钮的边框颜色
|
|
65
|
+
backBorderColor: {
|
|
66
|
+
type: String,
|
|
67
|
+
default: 'transparent',
|
|
68
|
+
},
|
|
69
|
+
// 阻止点击返回按钮后,返回到上一页,但仍会抛出 navBack 事件
|
|
70
|
+
stopNavigateBack: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: false,
|
|
73
|
+
},
|
|
74
|
+
// 标题文本
|
|
75
|
+
title: {
|
|
76
|
+
type: String,
|
|
77
|
+
default: '',
|
|
78
|
+
},
|
|
79
|
+
// 标题颜色
|
|
80
|
+
titleColor: {
|
|
81
|
+
type: String,
|
|
82
|
+
default: '#181818',
|
|
83
|
+
},
|
|
84
|
+
// 文本对齐方式
|
|
85
|
+
titleAlignment: {
|
|
86
|
+
type: [Number, String],
|
|
87
|
+
default: '1',
|
|
88
|
+
},
|
|
89
|
+
// 是否仅显示返回按钮并fixed定位
|
|
90
|
+
fixedBack: {
|
|
91
|
+
type: Boolean,
|
|
92
|
+
default: false,
|
|
93
|
+
},
|
|
94
|
+
zIndex: {
|
|
95
|
+
type: Number,
|
|
96
|
+
default: 10,
|
|
97
|
+
},
|
|
98
|
+
// 1 黑色 2 白色
|
|
99
|
+
colorType: {
|
|
100
|
+
type: [Number, String],
|
|
101
|
+
default: 1,
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
data() {
|
|
105
|
+
return {
|
|
106
|
+
// #ifdef H5
|
|
107
|
+
navbarTop: 16, // 自定义导航栏 top
|
|
108
|
+
// #endif
|
|
109
|
+
|
|
110
|
+
// #ifdef MP
|
|
111
|
+
navbarTop: pos.navbarTop, // 自定义导航栏 top
|
|
112
|
+
// #endif
|
|
113
|
+
navbarBottom: pos.navbarBottom, // 自定义导航栏 bottom
|
|
114
|
+
navbarWidth: pos.navbarWidth, // 自定义导航栏 width
|
|
115
|
+
navbarHeight: pos.navbarHeight, // 自定义导航栏 height
|
|
116
|
+
isFirstPage: false, // 是否为页面栈第一页
|
|
117
|
+
startX: 0,
|
|
118
|
+
touchRule: '左右左右左右', // 秘笈规则
|
|
119
|
+
curTouchRule: '', // 当前点击的秘笈
|
|
120
|
+
ruleI: -1, // 清除秘笈settimeout的i
|
|
121
|
+
};
|
|
122
|
+
},
|
|
123
|
+
created() {},
|
|
124
|
+
mounted() {
|
|
125
|
+
// #ifdef MP-ALIPAY
|
|
126
|
+
pos.refreshData(this);
|
|
127
|
+
// #endif
|
|
128
|
+
const pages = getCurrentPages();
|
|
129
|
+
this.isFirstPage = pages.length === 1;
|
|
130
|
+
// #ifdef MP-ALIPAY
|
|
131
|
+
if (this.colorType == 1) {
|
|
132
|
+
my.setNavigationBar({
|
|
133
|
+
backgroundColor: '#ffffff',
|
|
134
|
+
});
|
|
135
|
+
} else {
|
|
136
|
+
my.setNavigationBar({
|
|
137
|
+
frontColor: '#ffffff',
|
|
138
|
+
backgroundColor: '#000000',
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
// #endif
|
|
142
|
+
},
|
|
143
|
+
methods: {
|
|
144
|
+
// 返回上一页
|
|
145
|
+
async navBack() {
|
|
146
|
+
if (!this.stopNavigateBack) {
|
|
147
|
+
let pages = getCurrentPages();
|
|
148
|
+
if (pages.length > 2) {
|
|
149
|
+
uni.navigateBack();
|
|
150
|
+
} else {
|
|
151
|
+
// #ifdef MP-WEIXIN
|
|
152
|
+
uni.switchTab({
|
|
153
|
+
url: '/mp/index/index',
|
|
154
|
+
});
|
|
155
|
+
// #endif
|
|
156
|
+
// #ifndef MP-WEIXIN
|
|
157
|
+
uni.redirectTo({
|
|
158
|
+
url: '/mp/index/index',
|
|
159
|
+
});
|
|
160
|
+
// #endif
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
this.$emit('navBack');
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
computed: {
|
|
167
|
+
pageStyle() {
|
|
168
|
+
let style = {
|
|
169
|
+
zIndex: this.zIndex,
|
|
170
|
+
};
|
|
171
|
+
if (this.fixedBack) {
|
|
172
|
+
style.position = 'fixed';
|
|
173
|
+
style.top = 0;
|
|
174
|
+
style.width = '80rpx';
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
return style;
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
};
|
|
181
|
+
</script>
|
|
182
|
+
|
|
183
|
+
<style lang="scss" scoped>
|
|
184
|
+
.nav-box {
|
|
185
|
+
position: relative;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.nav {
|
|
189
|
+
display: flex;
|
|
190
|
+
align-items: center;
|
|
191
|
+
padding-left: 8rpx;
|
|
192
|
+
overflow: hidden;
|
|
193
|
+
.back-box {
|
|
194
|
+
padding-right: 10rpx;
|
|
195
|
+
display: flex;
|
|
196
|
+
align-items: center;
|
|
197
|
+
position: relative;
|
|
198
|
+
.back {
|
|
199
|
+
display: inline-flex;
|
|
200
|
+
align-items: center;
|
|
201
|
+
justify-content: center;
|
|
202
|
+
width: 50rpx;
|
|
203
|
+
height: 50rpx;
|
|
204
|
+
border-radius: 25rpx;
|
|
205
|
+
border-width: 1px;
|
|
206
|
+
border-style: solid;
|
|
207
|
+
}
|
|
208
|
+
.back-click-hot {
|
|
209
|
+
position: absolute;
|
|
210
|
+
z-index: 2;
|
|
211
|
+
width: 90rpx;
|
|
212
|
+
height: 90rpx;
|
|
213
|
+
transform: translateX(-30rpx);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.ali-back-box {
|
|
218
|
+
width: 50rpx;
|
|
219
|
+
height: 50rpx;
|
|
220
|
+
padding-right: 10rpx;
|
|
221
|
+
}
|
|
222
|
+
.slot-default {
|
|
223
|
+
display: flex;
|
|
224
|
+
align-items: center;
|
|
225
|
+
flex: 1;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
.title-center {
|
|
229
|
+
position: absolute;
|
|
230
|
+
left: 0;
|
|
231
|
+
top: 0;
|
|
232
|
+
z-index: 1;
|
|
233
|
+
width: 100%;
|
|
234
|
+
font-size: 32rpx;
|
|
235
|
+
text-align: center;
|
|
236
|
+
font-weight: bold;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.title {
|
|
240
|
+
font-size: 32rpx;
|
|
241
|
+
font-weight: bold;
|
|
242
|
+
margin-right: 10rpx;
|
|
243
|
+
line-height: 1;
|
|
244
|
+
}
|
|
245
|
+
</style>
|