stellar-ui-v2 1.36.2 → 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 +9 -9
- 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-badge/ste-badge.vue +238 -238
- package/{components → uni_modules/stellar-ui/components}/ste-button/ste-button.vue +16 -1
- package/{components → uni_modules/stellar-ui/components}/ste-calendar/README.md +1 -1
- package/{components → uni_modules/stellar-ui/components}/ste-calendar/ste-calendar.vue +578 -578
- package/{components → uni_modules/stellar-ui/components}/ste-checkbox/ste-checkbox.vue +303 -305
- package/{components → uni_modules/stellar-ui/components}/ste-checkbox-group/ste-checkbox-group.vue +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-icon/ste-icon.vue +143 -147
- package/{components → uni_modules/stellar-ui/components}/ste-index-item/ste-index-item.vue +99 -96
- package/{components → uni_modules/stellar-ui/components}/ste-index-list/ste-index-list.vue +128 -128
- package/{components → uni_modules/stellar-ui/components}/ste-input/README.md +1 -1
- package/{components → uni_modules/stellar-ui/components}/ste-loading/ste-loading.vue +166 -166
- package/{components → uni_modules/stellar-ui/components}/ste-media-preview/ste-media-preview.vue +267 -267
- package/{components → uni_modules/stellar-ui/components}/ste-notice-bar/ste-notice-bar.vue +341 -331
- package/{components → uni_modules/stellar-ui/components}/ste-number-keyboard/keyboard.vue +144 -140
- package/{components → uni_modules/stellar-ui/components}/ste-number-keyboard/ste-number-keyboard.vue +226 -240
- package/{components → uni_modules/stellar-ui/components}/ste-picker/ste-picker.vue +2 -2
- package/{components → uni_modules/stellar-ui/components}/ste-radio/ste-radio.vue +291 -293
- package/{components → uni_modules/stellar-ui/components}/ste-rate/ste-rate.vue +206 -202
- package/{components → uni_modules/stellar-ui/components}/ste-rich-text/ste-rich-text.vue +70 -70
- package/{components → uni_modules/stellar-ui/components}/ste-scroll-to/ste-scroll-to.vue +3 -9
- package/{components → uni_modules/stellar-ui/components}/ste-scroll-to-item/ste-scroll-to-item.vue +1 -1
- package/{components → uni_modules/stellar-ui/components}/ste-search/ste-search.vue +28 -48
- package/{components → uni_modules/stellar-ui/components}/ste-select/ste-select.vue +2 -2
- package/{components → uni_modules/stellar-ui/components}/ste-slider/ste-slider.vue +554 -544
- package/{components → uni_modules/stellar-ui/components}/ste-step/ste-step.vue +264 -264
- package/{components → uni_modules/stellar-ui/components}/ste-stepper/ste-stepper.vue +1 -0
- package/{components → uni_modules/stellar-ui/components}/ste-steps/ste-steps.vue +65 -65
- package/{components → uni_modules/stellar-ui/components}/ste-sticky/ste-sticky.vue +127 -127
- package/{components → uni_modules/stellar-ui/components}/ste-swipe-action/ste-swipe-action.vue +311 -303
- package/{components → uni_modules/stellar-ui/components}/ste-swiper-item/ste-swiper-item.vue +1 -1
- package/{components → uni_modules/stellar-ui/components}/ste-switch/ste-switch.vue +148 -144
- package/{components → uni_modules/stellar-ui/components}/ste-tab/ste-tab.vue +87 -87
- package/{components → uni_modules/stellar-ui/components}/ste-table/README.md +4 -4
- package/{components → uni_modules/stellar-ui/components}/ste-tabs/README.md +2 -2
- package/{components → uni_modules/stellar-ui/components}/ste-tabs/ste-tabs.vue +60 -72
- package/{components → uni_modules/stellar-ui/components}/ste-tour/ste-tour.vue +18 -23
- package/{components → uni_modules/stellar-ui/components}/ste-tree/ste-tree.vue +351 -350
- package/{components → uni_modules/stellar-ui/components}/ste-upload/ste-upload.vue +519 -526
- package/uni_modules/stellar-ui/package-lock.json +22 -0
- package/uni_modules/stellar-ui/package.json +18 -0
- package/{utils → uni_modules/stellar-ui/utils}/System.js +143 -110
- package/uni_modules/stellar-ui/utils/utils.js +634 -0
- package/vitest.config.js +14 -0
- package/vue.config.js +32 -0
- package/utils/utils.js +0 -604
- /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-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-calendar/self-date.js +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-checkbox/README.md +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-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-list/README.md +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-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-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-number-keyboard/README.md +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-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-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-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-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-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-stepper/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-steps/README.md +0 -0
- /package/{components → uni_modules/stellar-ui/components}/ste-sticky/README.md +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-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-switch/README.md +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/props.js +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-tree/README.md +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-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}/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/.babelrc
ADDED
package/App.vue
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import request from '@/common/request.js';
|
|
3
|
+
import { getToken, setToken } from './common/token';
|
|
4
|
+
import { getInfo, login } from '@/common/account.js';
|
|
5
|
+
export default {
|
|
6
|
+
onLaunch: async function () {
|
|
7
|
+
// #ifdef MP-WEIXIN
|
|
8
|
+
const { code } = await wx.login();
|
|
9
|
+
const openid = await request('/account/openid', { code });
|
|
10
|
+
console.log('open-id:', openid);
|
|
11
|
+
// #endif
|
|
12
|
+
},
|
|
13
|
+
onShow: function () {},
|
|
14
|
+
onHide: function () {},
|
|
15
|
+
methods: {},
|
|
16
|
+
};
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<style lang="scss">
|
|
20
|
+
/*每个页面公共css */
|
|
21
|
+
@import "./uni_modules/stellar-ui/common/css/common.scss";
|
|
22
|
+
</style>
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 武汉数智云
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
|
|
11
11
|
## ✨ 特性
|
|
12
12
|
|
|
13
|
-
- 🎯 多平台覆盖,支持 微信小程序、支付宝小程序、H5.
|
|
14
|
-
- 🚀 40+ 个高质量组件,覆盖移动端主流场景.
|
|
15
|
-
- 📖 提供丰富的文档和组件示例.
|
|
13
|
+
- 🎯 多平台覆盖,支持 微信小程序、支付宝小程序、H5.
|
|
14
|
+
- 🚀 40+ 个高质量组件,覆盖移动端主流场景.
|
|
15
|
+
- 📖 提供丰富的文档和组件示例.
|
|
16
16
|
- 🎨 支持修改 CSS 变量实现主题定制.
|
|
17
17
|
|
|
18
18
|
## 📱 预览
|
|
@@ -45,7 +45,7 @@ npm i stellar-ui-v2 -S
|
|
|
45
45
|
|
|
46
46
|
我们非常欢迎大家一起贡献优秀的 Demo 与案例,欢迎在此 [issue](https://github.com/wuhanshuzhiyun/StellarUI/issues/1) 提交案例。
|
|
47
47
|
|
|
48
|
-
<table
|
|
48
|
+
<table border="0">
|
|
49
49
|
<tr>
|
|
50
50
|
<td>
|
|
51
51
|
<img width="250" src="https://image.whzb.com/chain/StellarUI/头像/邻里购.png" />
|
|
@@ -75,11 +75,11 @@ npm i stellar-ui-v2 -S
|
|
|
75
75
|
|
|
76
76
|
## 周边生态
|
|
77
77
|
|
|
78
|
-
| 项目 | 描述 |
|
|
79
|
-
| --- | --- |
|
|
80
|
-
|[StellarUI-Plus](https://github.com/wuhanshuzhiyun/stellar-ui-plus) | 一个基于vue3构建,打造的uni-app组件库 |
|
|
81
|
-
|[ste-vue-inset-loader](https://github.com/wuhanshuzhiyun/ste-vue-inset-loader) |常用于小程序需要全局引入组件的场景的包 |
|
|
82
|
-
|[ste-helper](https://github.com/wuhanshuzhiyun/stellar-ui-plus/tree/main/plugins/ste-helper) |旨在帮助开发者更加有效率的使用 StellarUI-Plus来开发项目的vscode插件 |
|
|
78
|
+
| 项目 | 描述 |
|
|
79
|
+
| --- | --- |
|
|
80
|
+
|[StellarUI-Plus](https://github.com/wuhanshuzhiyun/stellar-ui-plus) | 一个基于vue3构建,打造的uni-app组件库 |
|
|
81
|
+
|[ste-vue-inset-loader](https://github.com/wuhanshuzhiyun/ste-vue-inset-loader) |常用于小程序需要全局引入组件的场景的包 |
|
|
82
|
+
|[ste-helper](https://github.com/wuhanshuzhiyun/stellar-ui-plus/tree/main/plugins/ste-helper) |旨在帮助开发者更加有效率的使用 StellarUI-Plus来开发项目的vscode插件 |
|
|
83
83
|
|[ste-cli](https://github.com/wuhanshuzhiyun/ste-cli) |stellar配套的脚手架 |
|
|
84
84
|
|
|
85
85
|
## 核心团队
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import request from "./request"
|
|
2
|
+
import {
|
|
3
|
+
getToken,
|
|
4
|
+
removeToken,
|
|
5
|
+
setToken
|
|
6
|
+
} from "./token"
|
|
7
|
+
|
|
8
|
+
export const isLogin = async () => {
|
|
9
|
+
try {
|
|
10
|
+
const token = getToken()
|
|
11
|
+
if (!token) return false
|
|
12
|
+
const info = await getInfo();
|
|
13
|
+
if (!info) return false
|
|
14
|
+
return token
|
|
15
|
+
} catch (e) {
|
|
16
|
+
//TODO handle the exception
|
|
17
|
+
return false
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const getInfo = async (pull = false) => {
|
|
22
|
+
try {
|
|
23
|
+
let info = pull ? null : uni.getStorageSync("user-info")
|
|
24
|
+
if (info) return JSON.parse(info)
|
|
25
|
+
const token = getToken()
|
|
26
|
+
if (!token) return null
|
|
27
|
+
info = await request('/account/info');
|
|
28
|
+
uni.setStorageSync("user-info", JSON.stringify(info))
|
|
29
|
+
return info
|
|
30
|
+
} catch (e) {
|
|
31
|
+
//TODO handle the exception
|
|
32
|
+
return null
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export const login = async () => {
|
|
38
|
+
try {
|
|
39
|
+
const {
|
|
40
|
+
code
|
|
41
|
+
} = await wx.login();
|
|
42
|
+
const token = await request('/account/login', {
|
|
43
|
+
code
|
|
44
|
+
}, 'POST');
|
|
45
|
+
setToken(token);
|
|
46
|
+
} catch (e) {
|
|
47
|
+
return false
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export const logout = async () => {
|
|
53
|
+
try {
|
|
54
|
+
await request("/account/logout")
|
|
55
|
+
removeToken()
|
|
56
|
+
} catch (e) {
|
|
57
|
+
//TODO handle the exception
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import useSteToast from '@/uni_modules/stellar-ui/components/ste-toast/ste-toast.js';
|
|
2
|
+
import useSteMsgBox from '@/uni_modules/stellar-ui/components/ste-message-box/ste-message-box.js';
|
|
3
|
+
let steToast = useSteToast();
|
|
4
|
+
let steMsgBox = useSteMsgBox();
|
|
5
|
+
export default {
|
|
6
|
+
data() {
|
|
7
|
+
return {
|
|
8
|
+
onShowStatus: 0, // onShow事件状态,0 第一次显示onShow状态,1 非第一次显示onShow状态,用来适配支付宝的onPageShow状态
|
|
9
|
+
};
|
|
10
|
+
},
|
|
11
|
+
methods: {
|
|
12
|
+
// 前面加个$,防止和uni全局方法冲突导致警告
|
|
13
|
+
$showToast(params) {
|
|
14
|
+
// 是否开启提示跨页面功能配置
|
|
15
|
+
params.enableCrossPagePrompt = false;
|
|
16
|
+
steToast.showToast(params);
|
|
17
|
+
},
|
|
18
|
+
hideToast: steToast.hideToast,
|
|
19
|
+
showMsgBox: steMsgBox.showMsgBox,
|
|
20
|
+
hideMsgBox: steMsgBox.hideMsgBox,
|
|
21
|
+
},
|
|
22
|
+
onShow() {
|
|
23
|
+
// #ifdef MP-ALIPAY || H5
|
|
24
|
+
// 兼容支付宝小程序的onPageShow
|
|
25
|
+
|
|
26
|
+
if (this.onShowStatus === 0) {
|
|
27
|
+
this.onShowStatus = 1;
|
|
28
|
+
} else {
|
|
29
|
+
emitOnPageShow(this.$children);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function emitOnPageShow(children) {
|
|
33
|
+
children.forEach((item) => {
|
|
34
|
+
if (item.$options.onPageShow != null) {
|
|
35
|
+
item.$options.onPageShow.forEach((func) => {
|
|
36
|
+
func.bind(item)();
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
emitOnPageShow(item.$children);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
// #endif
|
|
43
|
+
},
|
|
44
|
+
onHide() {
|
|
45
|
+
// #ifdef MP-ALIPAY || H5
|
|
46
|
+
// 兼容支付宝小程序的onPageHide
|
|
47
|
+
emitOnPageHide(this.$children);
|
|
48
|
+
|
|
49
|
+
function emitOnPageHide(children) {
|
|
50
|
+
children.forEach((item) => {
|
|
51
|
+
if (item.$options.onPageHide != null) {
|
|
52
|
+
item.$options.onPageHide.forEach((func) => {
|
|
53
|
+
func.bind(item)();
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
emitOnPageHide(item.$children);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
// #endif
|
|
60
|
+
},
|
|
61
|
+
};
|
package/common/config.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// 全局常量
|
|
2
|
+
|
|
3
|
+
const IMAGE_BASE_URL = 'https://image.whzb.com/chain/StellarUI/'; // 图片根地址
|
|
4
|
+
const IMAGE_COMMON = '';
|
|
5
|
+
const BASE_URL = 'https://stellar-ui.intecloud.com.cn/api';
|
|
6
|
+
const SSE_URL = 'https://stellar-ui.intecloud.com.cn/sse';
|
|
7
|
+
const BASE_WEB_URL = 'https://stellar-ui.intecloud.com.cn';
|
|
8
|
+
|
|
9
|
+
// const BASE_URL = "http://127.0.0.1:3000/api"
|
|
10
|
+
// const SSE_URL = "http://127.0.0.1:3000/api"
|
|
11
|
+
|
|
12
|
+
const AdminPwd = 'ste-admin';
|
|
13
|
+
|
|
14
|
+
// 顶部导航栏相关配置
|
|
15
|
+
const NAV_KEY_DEV = 'DEV'; // 开发指南
|
|
16
|
+
const NAV_KEY_DEV_GROUP = 'DEV_GROUP'; // 研发组
|
|
17
|
+
const NAV_KEY_COMP = 'COMP'; // 组件
|
|
18
|
+
const NAV_DATA = [{
|
|
19
|
+
key: NAV_KEY_DEV,
|
|
20
|
+
title: '开发指南',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
key: NAV_KEY_DEV_GROUP,
|
|
24
|
+
title: '研发组'
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
key: NAV_KEY_COMP,
|
|
28
|
+
title: '组件'
|
|
29
|
+
},
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
// 组件文档页导航相关配置
|
|
33
|
+
const NAV_COMP_KEY_DEMO = 'DEMO'
|
|
34
|
+
const NAV_COMP_KEY_API = 'API'
|
|
35
|
+
const NAV_COMP_KEY_GUIDE = 'GUIDE'
|
|
36
|
+
const NAV_COMP_DATA = [{
|
|
37
|
+
key: NAV_COMP_KEY_DEMO,
|
|
38
|
+
title: '示例',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
key: NAV_COMP_KEY_API,
|
|
42
|
+
title: 'API'
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
key: NAV_COMP_KEY_GUIDE,
|
|
46
|
+
title: '指南'
|
|
47
|
+
},
|
|
48
|
+
]
|
|
49
|
+
|
|
50
|
+
const SHOW_H5_PAGE = ['自定义主题']
|
|
51
|
+
|
|
52
|
+
export default {
|
|
53
|
+
/**图片根地址*/
|
|
54
|
+
IMAGE_BASE_URL,
|
|
55
|
+
IMAGE_COMMON,
|
|
56
|
+
BASE_URL,
|
|
57
|
+
SSE_URL,
|
|
58
|
+
AdminPwd,
|
|
59
|
+
NAV_DATA,
|
|
60
|
+
NAV_KEY_DEV,
|
|
61
|
+
NAV_KEY_DEV_GROUP,
|
|
62
|
+
NAV_KEY_COMP,
|
|
63
|
+
NAV_COMP_DATA,
|
|
64
|
+
NAV_COMP_KEY_DEMO,
|
|
65
|
+
NAV_COMP_KEY_API,
|
|
66
|
+
NAV_COMP_KEY_GUIDE,
|
|
67
|
+
BASE_WEB_URL,
|
|
68
|
+
SHOW_H5_PAGE
|
|
69
|
+
};
|
package/common/css/common.scss
CHANGED
|
@@ -1,61 +1,162 @@
|
|
|
1
|
-
|
|
2
|
-
width: 100%;
|
|
3
|
-
height: 100%;
|
|
4
|
-
line-height: 0;
|
|
1
|
+
* {
|
|
5
2
|
margin: 0;
|
|
6
3
|
padding: 0;
|
|
7
|
-
display: block;
|
|
8
|
-
vertical-align: middle;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
movable-area,
|
|
12
|
-
movable-view,
|
|
13
|
-
page-container,
|
|
14
|
-
scroll-view,
|
|
15
|
-
share-element,
|
|
16
|
-
swiper,
|
|
17
|
-
swiper-item,
|
|
18
|
-
view icon,
|
|
19
|
-
progress,
|
|
20
|
-
rich-text,
|
|
21
|
-
text,
|
|
22
|
-
button,
|
|
23
|
-
checkbox,
|
|
24
|
-
checkbox-group,
|
|
25
|
-
editor,
|
|
26
|
-
form,
|
|
27
|
-
input,
|
|
28
|
-
keyboard-accessory,
|
|
29
|
-
label,
|
|
30
|
-
picker,
|
|
31
|
-
picker-view,
|
|
32
|
-
picker-view-column,
|
|
33
|
-
radio,
|
|
34
|
-
radio-group,
|
|
35
|
-
slider,
|
|
36
|
-
switch,
|
|
37
|
-
textarea,
|
|
38
|
-
functional-page-navigator,
|
|
39
|
-
navigator,
|
|
40
|
-
audio,
|
|
41
|
-
camera,
|
|
42
|
-
image,
|
|
43
|
-
live-player,
|
|
44
|
-
live-pusher,
|
|
45
|
-
videovoip-room,
|
|
46
|
-
map,
|
|
47
|
-
canvas,
|
|
48
|
-
ad,
|
|
49
|
-
ad-custom,
|
|
50
|
-
official-account,
|
|
51
|
-
open-data,
|
|
52
|
-
view {
|
|
53
4
|
box-sizing: border-box;
|
|
54
|
-
background-repeat: no-repeat;
|
|
55
|
-
background-size: 100% 100%;
|
|
56
5
|
}
|
|
57
6
|
// #ifdef H5
|
|
58
|
-
|
|
59
|
-
|
|
7
|
+
html,
|
|
8
|
+
body {
|
|
9
|
+
user-select: auto;
|
|
10
|
+
}
|
|
11
|
+
body {
|
|
12
|
+
min-width: 1100px;
|
|
13
|
+
font-size: 16px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
::-webkit-scrollbar {
|
|
17
|
+
width: 6px;
|
|
18
|
+
height: 10px;
|
|
19
|
+
border-radius: 4px;
|
|
20
|
+
opacity: 0;
|
|
21
|
+
transition: opacity 0.3s ease;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
::-webkit-scrollbar-track {
|
|
25
|
+
background-color: #fff;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
::-webkit-scrollbar-thumb {
|
|
29
|
+
// background-color: #dddee0;
|
|
30
|
+
background-color: transparent;
|
|
31
|
+
border-radius: 4px;
|
|
32
|
+
height: 10px;
|
|
33
|
+
opacity: 0;
|
|
60
34
|
}
|
|
61
35
|
// #endif
|
|
36
|
+
/*
|
|
37
|
+
demo页通用样式
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
.page {
|
|
41
|
+
height: 100vh;
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
width: 100vw;
|
|
44
|
+
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-direction: column;
|
|
47
|
+
// #ifdef H5
|
|
48
|
+
::-webkit-scrollbar {
|
|
49
|
+
display: none;
|
|
50
|
+
width: 0 !important;
|
|
51
|
+
height: 0 !important;
|
|
52
|
+
-webkit-appearance: none;
|
|
53
|
+
background: transparent;
|
|
54
|
+
color: transparent;
|
|
55
|
+
}
|
|
56
|
+
// #endif
|
|
57
|
+
& > .content {
|
|
58
|
+
padding: 0 40rpx;
|
|
59
|
+
flex: 1;
|
|
60
|
+
overflow-y: auto;
|
|
61
|
+
|
|
62
|
+
.description {
|
|
63
|
+
.cmp-name {
|
|
64
|
+
font-size: 48rpx;
|
|
65
|
+
font-weight: bold;
|
|
66
|
+
padding-top: 48rpx;
|
|
67
|
+
color: #000000;
|
|
68
|
+
}
|
|
69
|
+
.cmp-desc {
|
|
70
|
+
color: #0009;
|
|
71
|
+
margin-top: 8rpx;
|
|
72
|
+
margin-bottom: 32rpx;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.type-block {
|
|
77
|
+
font-size: 36rpx;
|
|
78
|
+
font-weight: bold;
|
|
79
|
+
margin: 16rpx 0;
|
|
80
|
+
color: #000000;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
& > .demo-item {
|
|
84
|
+
margin-bottom: 16px;
|
|
85
|
+
|
|
86
|
+
& > .title {
|
|
87
|
+
font-size: 26rpx;
|
|
88
|
+
color: #0009;
|
|
89
|
+
margin-bottom: 16rpx;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
& > .item-block {
|
|
93
|
+
display: flex;
|
|
94
|
+
flex-direction: row;
|
|
95
|
+
flex-wrap: wrap;
|
|
96
|
+
align-items: center;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* 贡献者模块样式
|
|
104
|
+
*/
|
|
105
|
+
|
|
106
|
+
.con-box {
|
|
107
|
+
display: flex;
|
|
108
|
+
flex-wrap: wrap;
|
|
109
|
+
column-gap: 25px;
|
|
110
|
+
row-gap: 25px;
|
|
111
|
+
margin-bottom: 40px;
|
|
112
|
+
}
|
|
113
|
+
.con-item {
|
|
114
|
+
display: flex;
|
|
115
|
+
flex-direction: column;
|
|
116
|
+
row-gap: 10px;
|
|
117
|
+
}
|
|
118
|
+
.con-image {
|
|
119
|
+
width: 90px !important;
|
|
120
|
+
height: 90px !important;
|
|
121
|
+
border-radius: 50%;
|
|
122
|
+
}
|
|
123
|
+
.con-box .name {
|
|
124
|
+
color: #1989fa !important;
|
|
125
|
+
text-align: center;
|
|
126
|
+
}
|
|
127
|
+
// #ifdef H5
|
|
128
|
+
.con-box a:link,
|
|
129
|
+
.con-box a:visited,
|
|
130
|
+
.con-box a:hover,
|
|
131
|
+
.con-box a:active {
|
|
132
|
+
text-decoration: none !important;
|
|
133
|
+
color: #1989fa !important;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
h2,
|
|
137
|
+
h3,
|
|
138
|
+
h4 {
|
|
139
|
+
position: relative;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.header-anchor {
|
|
143
|
+
position: absolute;
|
|
144
|
+
left: 0;
|
|
145
|
+
top: 0;
|
|
146
|
+
opacity: 0;
|
|
147
|
+
text-decoration: none;
|
|
148
|
+
color: var(--pc-main-color);
|
|
149
|
+
padding-right: 8px;
|
|
150
|
+
transform: translateX(-100%);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
h2:hover .header-anchor,
|
|
154
|
+
h3:hover .header-anchor,
|
|
155
|
+
h4:hover .header-anchor {
|
|
156
|
+
opacity: 1;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
html {
|
|
160
|
+
scroll-behavior: smooth;
|
|
161
|
+
}
|
|
162
|
+
// #endif
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// #ifdef H5
|
|
2
|
+
:root,
|
|
3
|
+
:host {
|
|
4
|
+
// sizes
|
|
5
|
+
--pc-nav-width: 338px;
|
|
6
|
+
--pc-view-width: 375px;
|
|
7
|
+
--pc-view-height: 812px;
|
|
8
|
+
--pc-padding: 32px;
|
|
9
|
+
--pc-header-nav-height: 64px;
|
|
10
|
+
|
|
11
|
+
// color
|
|
12
|
+
--pc-main-color: #409eff;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// 100%
|
|
16
|
+
@media (max-width: 1920px) {
|
|
17
|
+
:root,
|
|
18
|
+
:host {
|
|
19
|
+
// sizes
|
|
20
|
+
--pc-nav-width: 338px;
|
|
21
|
+
--pc-view-width: 375px;
|
|
22
|
+
--pc-view-height: 812px;
|
|
23
|
+
--pc-padding: 32px;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// 80%
|
|
28
|
+
@media (max-width: 1600px) {
|
|
29
|
+
:root,
|
|
30
|
+
:host {
|
|
31
|
+
// sizes
|
|
32
|
+
--pc-nav-width: 338px;
|
|
33
|
+
--pc-view-width: 300px;
|
|
34
|
+
--pc-view-height: 600px;
|
|
35
|
+
--pc-padding: 32px;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// 70%
|
|
40
|
+
@media (max-width: 1280px) {
|
|
41
|
+
:root,
|
|
42
|
+
:host {
|
|
43
|
+
// sizes
|
|
44
|
+
--pc-nav-width: 240px;
|
|
45
|
+
--pc-view-width: 262px;
|
|
46
|
+
--pc-view-height: 568px;
|
|
47
|
+
--pc-padding: 32px;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// #endif
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import config from './config.js';
|
|
2
|
+
import { getToken, removeToken } from './token.js';
|
|
3
|
+
import useSteToast from '@/uni_modules/stellar-ui/components/ste-toast/ste-toast.js';
|
|
4
|
+
let steToast = useSteToast();
|
|
5
|
+
export default function (url, data, method = 'GET', header = {}) {
|
|
6
|
+
return new Promise((resolve, reject) => {
|
|
7
|
+
console.log('----request-start==>', url);
|
|
8
|
+
const token = getToken();
|
|
9
|
+
|
|
10
|
+
const _header = {};
|
|
11
|
+
if (token) _header.token = token;
|
|
12
|
+
uni.request({
|
|
13
|
+
url: `${config.BASE_URL}${url}`,
|
|
14
|
+
method,
|
|
15
|
+
header: Object.assign(_header, header),
|
|
16
|
+
data,
|
|
17
|
+
success({ data }) {
|
|
18
|
+
console.log('----request-success==>', url, data);
|
|
19
|
+
if (data.code === 200) {
|
|
20
|
+
resolve(data.data);
|
|
21
|
+
return;
|
|
22
|
+
} else if (data.code === 401) {
|
|
23
|
+
removeToken();
|
|
24
|
+
} else if (data.code === 402) {
|
|
25
|
+
steToast.showToast({
|
|
26
|
+
title: `内容涉及${data.message}信息,请修改后重新评论`,
|
|
27
|
+
icon: 'none',
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
reject(data.message);
|
|
31
|
+
},
|
|
32
|
+
fail(e) {
|
|
33
|
+
console.log('----request-error==>', url, e);
|
|
34
|
+
reject(e);
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
}
|
package/common/token.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const getToken = () => {
|
|
2
|
+
return uni.getStorageSync("token");
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export const setToken = (token) => {
|
|
6
|
+
uni.setStorageSync("token", token);
|
|
7
|
+
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const removeToken = () => {
|
|
11
|
+
uni.removeStorageSync("token");
|
|
12
|
+
uni.removeStorageSync("user-info");
|
|
13
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const CC_API_BASE_URL = "https://xssc.whzb.com/"
|
|
2
|
+
|
|
3
|
+
export default function uploadFile(path, tryNum = 1, dir = 'image') {
|
|
4
|
+
return new Promise((resolve, reject) => {
|
|
5
|
+
const options = {
|
|
6
|
+
url: CC_API_BASE_URL + 'inte-mall-platform/api/upload/endpoint/put-file?dir=' + dir,
|
|
7
|
+
filePath: path,
|
|
8
|
+
name: 'file',
|
|
9
|
+
header: {},
|
|
10
|
+
method: 'POST',
|
|
11
|
+
};
|
|
12
|
+
uni.uploadFile(options).then(async (res) => {
|
|
13
|
+
// 如果返回的数组第一个有值,则为异常
|
|
14
|
+
if (res.statusCode === 200) {
|
|
15
|
+
resolve(JSON.parse(res.data).data.url);
|
|
16
|
+
} else {
|
|
17
|
+
reject('上传接口statusCode状态码' + res.statusCode + '异常', options, res);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
}
|