@ruixinkeji/prism-ui 1.0.14 → 1.0.16
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/README.md +6 -2
- package/dist/build/h5/assets/PrismCode-D1lrgx1M.css +1 -0
- package/dist/build/h5/assets/PrismCode.CNOtat_X.js +1 -0
- package/dist/build/h5/assets/PrismGroupSticky-CBFeo0AB.css +1 -0
- package/dist/build/h5/assets/PrismGroupSticky.CmJXt6ws.js +1 -0
- package/dist/build/h5/assets/PrismMusicPlayer-CHVtYDn7.css +1 -0
- package/dist/build/h5/assets/PrismMusicPlayer.DAW3y5Km.js +1 -0
- package/dist/build/h5/assets/PrismNavBar-CYetauMR.css +1 -0
- package/dist/build/h5/assets/PrismNavBar.CFM58fal.js +1 -0
- package/dist/build/h5/assets/PrismSwiper-CDtZrfyq.css +1 -0
- package/dist/build/h5/assets/PrismSwiper.DTGFNn5Q.js +1 -0
- package/dist/build/h5/assets/PrismTabBar-BW0exu0j.css +1 -0
- package/dist/build/h5/assets/PrismTabBar.DPe-iC_F.js +1 -0
- package/dist/build/h5/assets/basic-tn0RQdqM.css +0 -0
- package/dist/build/h5/assets/card-layout-BZuodKCJ.css +1 -0
- package/dist/build/h5/assets/colors-RgTfwcKp.css +1 -0
- package/dist/build/h5/assets/data-DSHiB3Xs.css +1 -0
- package/dist/build/h5/assets/effects-CNFDtZjf.css +1 -0
- package/dist/build/h5/assets/examples-CSzKlb8B.css +1 -0
- package/dist/build/h5/assets/fa-brands-400-C99Yv4gD.woff2 +0 -0
- package/dist/build/h5/assets/fa-regular-400-OOsPf1xj.woff2 +0 -0
- package/dist/build/h5/assets/fa-solid-900-DAI24fNt.woff2 +0 -0
- package/dist/build/h5/assets/feedback-BaC8qSUp.css +1 -0
- package/dist/build/h5/assets/form-va-eFD7k.css +1 -0
- package/dist/build/h5/assets/group-CDa_hQkB.css +1 -0
- package/dist/build/h5/assets/iconfont-CW81RyG4.ttf +0 -0
- package/dist/build/h5/assets/icons-83wAdmdh.css +1 -0
- package/dist/build/h5/assets/index-BQ-qpvZH.css +1 -0
- package/dist/build/h5/assets/index-BQnv3xQ8.css +1 -0
- package/dist/build/h5/assets/index-C83xA4hX.css +1 -0
- package/dist/build/h5/assets/index-Cvc14mto.css +1 -0
- package/dist/build/h5/assets/index-D2djL_pA.js +32 -0
- package/dist/build/h5/assets/navigation-D0rlyjtK.css +1 -0
- package/dist/build/h5/assets/pages-demo-basic.BsC9sqol.js +1 -0
- package/dist/build/h5/assets/pages-demo-code-index.BXECig1w.js +1 -0
- package/dist/build/h5/assets/pages-demo-colors.Dl__3Mv9.js +1 -0
- package/dist/build/h5/assets/pages-demo-container.Cy-M9f41.js +1 -0
- package/dist/build/h5/assets/pages-demo-data.CK2JdeBK.js +1 -0
- package/dist/build/h5/assets/pages-demo-effects.CV0rqKht.js +1 -0
- package/dist/build/h5/assets/pages-demo-feedback.BO-G3E1J.js +1 -0
- package/dist/build/h5/assets/pages-demo-form.CsUNLqqe.js +1 -0
- package/dist/build/h5/assets/pages-demo-layout-card-layout.CQ6fF8IK.js +1 -0
- package/dist/build/h5/assets/pages-demo-layout.261GXW2o.js +1 -0
- package/dist/build/h5/assets/pages-demo-navigation.C5hFijVt.js +1 -0
- package/dist/build/h5/assets/pages-demo-other.CVdLVU3_.js +1 -0
- package/dist/build/h5/assets/pages-demo-sticky-group.MDzv6I5L.js +1 -0
- package/dist/build/h5/assets/pages-demo-sticky-index.D2UJUdon.js +1 -0
- package/dist/build/h5/assets/pages-examples-examples.hyUWuu8C.js +1 -0
- package/dist/build/h5/assets/pages-icons-icons.R2erKYQX.js +1 -0
- package/dist/build/h5/assets/pages-index-index.BlfkIjJo.js +1 -0
- package/dist/build/h5/assets/pages-tools-tools.tm3Y1cFN.js +1 -0
- package/dist/build/h5/assets/tools-C1YBcrWJ.css +1 -0
- package/dist/build/h5/assets/uni-app.es.DfNmMcUd.js +1 -0
- package/dist/build/h5/assets/uni.e2868147.css +1 -0
- package/dist/build/h5/assets/useNavbar.BdajVjjC.js +1 -0
- package/dist/build/h5/index.html +23 -0
- package/dist/build/h5/static/fonts/all-icons.txt +453 -0
- package/dist/build/h5/static/fonts/fa-brands-400.woff2 +0 -0
- package/dist/build/h5/static/fonts/fa-regular-400.woff2 +0 -0
- package/dist/build/h5/static/fonts/fa-solid-900.woff2 +0 -0
- package/dist/build/h5/static/fonts/fa-v4compatibility.woff2 +0 -0
- package/dist/build/h5/static/fonts/font-awesome.css +943 -0
- package/dist/build/h5/static/fonts/iconfont.css +62 -0
- package/dist/build/h5/static/fonts/iconfont.js +1 -0
- package/dist/build/h5/static/fonts/iconfont.json +79 -0
- package/dist/build/h5/static/fonts/iconfont.ttf +0 -0
- package/dist/build/h5/static/fonts/iconfont.woff +0 -0
- package/dist/build/h5/static/fonts/iconfont.woff2 +0 -0
- package/dist/build/h5/static/fonts/icons-list.txt +453 -0
- package/dist/build/h5/static/tabbar/examples-active.png +0 -0
- package/dist/build/h5/static/tabbar/examples.png +0 -0
- package/dist/build/h5/static/tabbar/home-active.png +0 -0
- package/dist/build/h5/static/tabbar/home.png +0 -0
- package/dist/build/h5/static/tabbar/icons-active.png +0 -0
- package/dist/build/h5/static/tabbar/icons.png +0 -0
- package/dist/build/h5/static/tabbar/tools-active.png +0 -0
- package/dist/build/h5/static/tabbar/tools.png +0 -0
- package/dist/dev/.nvue/app.css.js +11 -0
- package/dist/dev/.nvue/app.js +2 -0
- package/dist/dev/.sourcemap/mp-weixin/app.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/components/PrismAddressInput/PrismAddressInput.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/components/PrismCityCascadeSelect/PrismCityCascadeSelect.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/components/PrismCityPicker/PrismCityPicker.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/components/PrismCitySelect/PrismCitySelect.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/components/PrismCode/PrismCode.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/components/PrismCodeInput/PrismCodeInput.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/components/PrismDateTimePicker/PrismDateTimePicker.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/components/PrismDropdown/PrismDropdown.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/components/PrismGroupSticky/PrismGroupSticky.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/components/PrismIdCardInput/PrismIdCardInput.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/components/PrismIndexBar/PrismIndexBar.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/components/PrismLicensePlateInput/PrismLicensePlateInput.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/components/PrismMusicPlayer/PrismMusicPlayer.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/components/PrismNavBar/PrismNavBar.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/components/PrismSecureInput/PrismSecureInput.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/components/PrismSticky/PrismSticky.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/components/PrismSwiper/PrismSwiper.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/components/PrismSwitch/PrismSwitch.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/components/PrismTabBar/PrismTabBar.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/components/PrismTabs/PrismTabs.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/components/PrismVoiceInput/PrismVoiceInput.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/composables/useNavbar.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/config/theme-colors.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/pages/demo/basic.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/pages/demo/card.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/pages/demo/code/index.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/pages/demo/colors.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/pages/demo/container.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/pages/demo/data.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/pages/demo/effects.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/pages/demo/feedback.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/pages/demo/form.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/pages/demo/layout/card-layout.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/pages/demo/layout.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/pages/demo/navigation.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/pages/demo/other.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/pages/demo/sticky/group.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/pages/demo/sticky/index.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/pages/examples/examples.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/pages/icons/icons.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/pages/tools/tools.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/store/app.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/utils/lunar.js.map +1 -0
- package/dist/dev/.sourcemap/mp-weixin/utils/system.js.map +1 -0
- package/dist/dev/app-plus/__uniappautomator.js +16 -0
- package/dist/dev/app-plus/__uniappchooselocation.js +32 -0
- package/dist/dev/app-plus/__uniapperror.png +0 -0
- package/dist/dev/app-plus/__uniappopenlocation.js +32 -0
- package/dist/dev/app-plus/__uniapppicker.js +33 -0
- package/dist/dev/app-plus/__uniappquill.js +8 -0
- package/dist/dev/app-plus/__uniappquillimageresize.js +1 -0
- package/dist/dev/app-plus/__uniappscan.js +32 -0
- package/dist/dev/app-plus/__uniappsuccess.png +0 -0
- package/dist/dev/app-plus/__uniappview.html +24 -0
- package/dist/dev/app-plus/app-config-service.js +11 -0
- package/dist/dev/app-plus/app-config.js +1 -0
- package/dist/dev/app-plus/app-service.js +23663 -0
- package/dist/dev/app-plus/app.css +8955 -0
- package/dist/dev/app-plus/manifest.json +91 -0
- package/dist/dev/app-plus/pages/demo/basic.css +524 -0
- package/dist/dev/app-plus/pages/demo/code/index.css +541 -0
- package/dist/dev/app-plus/pages/demo/colors.css +4008 -0
- package/dist/dev/app-plus/pages/demo/container.css +524 -0
- package/dist/dev/app-plus/pages/demo/data.css +705 -0
- package/dist/dev/app-plus/pages/demo/effects.css +530 -0
- package/dist/dev/app-plus/pages/demo/feedback.css +590 -0
- package/dist/dev/app-plus/pages/demo/form.css +3422 -0
- package/dist/dev/app-plus/pages/demo/layout/card-layout.css +785 -0
- package/dist/dev/app-plus/pages/demo/layout.css +524 -0
- package/dist/dev/app-plus/pages/demo/navigation.css +769 -0
- package/dist/dev/app-plus/pages/demo/other.css +524 -0
- package/dist/dev/app-plus/pages/demo/sticky/group.css +788 -0
- package/dist/dev/app-plus/pages/demo/sticky/index.css +894 -0
- package/dist/dev/app-plus/pages/examples/examples.css +1031 -0
- package/dist/dev/app-plus/pages/icons/icons.css +3310 -0
- package/dist/dev/app-plus/pages/index/index.css +696 -0
- package/dist/dev/app-plus/pages/tools/tools.css +378 -0
- package/dist/dev/app-plus/static/fonts/all-icons.txt +453 -0
- package/dist/dev/app-plus/static/fonts/fa-brands-400.woff2 +0 -0
- package/dist/dev/app-plus/static/fonts/fa-regular-400.woff2 +0 -0
- package/dist/dev/app-plus/static/fonts/fa-solid-900.woff2 +0 -0
- package/dist/dev/app-plus/static/fonts/fa-v4compatibility.woff2 +0 -0
- package/dist/dev/app-plus/static/fonts/font-awesome.css +943 -0
- package/dist/dev/app-plus/static/fonts/iconfont.css +62 -0
- package/dist/dev/app-plus/static/fonts/iconfont.js +1 -0
- package/dist/dev/app-plus/static/fonts/iconfont.json +79 -0
- package/dist/dev/app-plus/static/fonts/iconfont.ttf +0 -0
- package/dist/dev/app-plus/static/fonts/iconfont.woff +0 -0
- package/dist/dev/app-plus/static/fonts/iconfont.woff2 +0 -0
- package/dist/dev/app-plus/static/fonts/icons-list.txt +453 -0
- package/dist/dev/app-plus/static/tabbar/examples-active.png +0 -0
- package/dist/dev/app-plus/static/tabbar/examples.png +0 -0
- package/dist/dev/app-plus/static/tabbar/home-active.png +0 -0
- package/dist/dev/app-plus/static/tabbar/home.png +0 -0
- package/dist/dev/app-plus/static/tabbar/icons-active.png +0 -0
- package/dist/dev/app-plus/static/tabbar/icons.png +0 -0
- package/dist/dev/app-plus/static/tabbar/tools-active.png +0 -0
- package/dist/dev/app-plus/static/tabbar/tools.png +0 -0
- package/dist/dev/app-plus/uni-app-view.umd.js +7 -0
- package/dist/dev/mp-weixin/app.js +49 -0
- package/dist/dev/mp-weixin/app.json +29 -0
- package/dist/dev/mp-weixin/app.wxss +9072 -0
- package/dist/dev/mp-weixin/common/vendor.js +15968 -0
- package/dist/dev/mp-weixin/components/PrismAddressInput/PrismAddressInput.js +200 -0
- package/dist/dev/mp-weixin/components/PrismAddressInput/PrismAddressInput.json +4 -0
- package/dist/dev/mp-weixin/components/PrismAddressInput/PrismAddressInput.wxml +1 -0
- package/dist/dev/mp-weixin/components/PrismAddressInput/PrismAddressInput.wxss +327 -0
- package/dist/dev/mp-weixin/components/PrismCityCascadeSelect/PrismCityCascadeSelect.js +449 -0
- package/dist/dev/mp-weixin/components/PrismCityCascadeSelect/PrismCityCascadeSelect.json +4 -0
- package/dist/dev/mp-weixin/components/PrismCityCascadeSelect/PrismCityCascadeSelect.wxml +1 -0
- package/dist/dev/mp-weixin/components/PrismCityCascadeSelect/PrismCityCascadeSelect.wxss +264 -0
- package/dist/dev/mp-weixin/components/PrismCityPicker/PrismCityPicker.js +531 -0
- package/dist/dev/mp-weixin/components/PrismCityPicker/PrismCityPicker.json +4 -0
- package/dist/dev/mp-weixin/components/PrismCityPicker/PrismCityPicker.wxml +1 -0
- package/dist/dev/mp-weixin/components/PrismCityPicker/PrismCityPicker.wxss +309 -0
- package/dist/dev/mp-weixin/components/PrismCitySelect/PrismCitySelect.js +200 -0
- package/dist/dev/mp-weixin/components/PrismCitySelect/PrismCitySelect.json +6 -0
- package/dist/dev/mp-weixin/components/PrismCitySelect/PrismCitySelect.wxml +1 -0
- package/dist/dev/mp-weixin/components/PrismCitySelect/PrismCitySelect.wxss +225 -0
- package/dist/dev/mp-weixin/components/PrismCode/PrismCode.js +337 -0
- package/dist/dev/mp-weixin/components/PrismCode/PrismCode.json +4 -0
- package/dist/dev/mp-weixin/components/PrismCode/PrismCode.wxml +1 -0
- package/dist/dev/mp-weixin/components/PrismCode/PrismCode.wxss +345 -0
- package/dist/dev/mp-weixin/components/PrismCodeInput/PrismCodeInput.js +70 -0
- package/dist/dev/mp-weixin/components/PrismCodeInput/PrismCodeInput.json +4 -0
- package/dist/dev/mp-weixin/components/PrismCodeInput/PrismCodeInput.wxml +1 -0
- package/dist/dev/mp-weixin/components/PrismCodeInput/PrismCodeInput.wxss +115 -0
- package/dist/dev/mp-weixin/components/PrismDateTimePicker/PrismDateTimePicker.js +468 -0
- package/dist/dev/mp-weixin/components/PrismDateTimePicker/PrismDateTimePicker.json +4 -0
- package/dist/dev/mp-weixin/components/PrismDateTimePicker/PrismDateTimePicker.wxml +1 -0
- package/dist/dev/mp-weixin/components/PrismDateTimePicker/PrismDateTimePicker.wxss +309 -0
- package/dist/dev/mp-weixin/components/PrismDropdown/PrismDropdown.js +63 -0
- package/dist/dev/mp-weixin/components/PrismDropdown/PrismDropdown.json +4 -0
- package/dist/dev/mp-weixin/components/PrismDropdown/PrismDropdown.wxml +1 -0
- package/dist/dev/mp-weixin/components/PrismDropdown/PrismDropdown.wxss +0 -0
- package/dist/dev/mp-weixin/components/PrismGroupSticky/PrismGroupSticky.js +128 -0
- package/dist/dev/mp-weixin/components/PrismGroupSticky/PrismGroupSticky.json +4 -0
- package/dist/dev/mp-weixin/components/PrismGroupSticky/PrismGroupSticky.wxml +1 -0
- package/dist/dev/mp-weixin/components/PrismGroupSticky/PrismGroupSticky.wxss +191 -0
- package/dist/dev/mp-weixin/components/PrismIdCardInput/PrismIdCardInput.js +123 -0
- package/dist/dev/mp-weixin/components/PrismIdCardInput/PrismIdCardInput.json +4 -0
- package/dist/dev/mp-weixin/components/PrismIdCardInput/PrismIdCardInput.wxml +1 -0
- package/dist/dev/mp-weixin/components/PrismIdCardInput/PrismIdCardInput.wxss +114 -0
- package/dist/dev/mp-weixin/components/PrismIndexBar/PrismIndexBar.js +108 -0
- package/dist/dev/mp-weixin/components/PrismIndexBar/PrismIndexBar.json +4 -0
- package/dist/dev/mp-weixin/components/PrismIndexBar/PrismIndexBar.wxml +1 -0
- package/dist/dev/mp-weixin/components/PrismIndexBar/PrismIndexBar.wxss +135 -0
- package/dist/dev/mp-weixin/components/PrismLicensePlateInput/PrismLicensePlateInput.js +449 -0
- package/dist/dev/mp-weixin/components/PrismLicensePlateInput/PrismLicensePlateInput.json +4 -0
- package/dist/dev/mp-weixin/components/PrismLicensePlateInput/PrismLicensePlateInput.wxml +1 -0
- package/dist/dev/mp-weixin/components/PrismLicensePlateInput/PrismLicensePlateInput.wxss +445 -0
- package/dist/dev/mp-weixin/components/PrismMusicPlayer/PrismMusicPlayer.js +200 -0
- package/dist/dev/mp-weixin/components/PrismMusicPlayer/PrismMusicPlayer.json +4 -0
- package/dist/dev/mp-weixin/components/PrismMusicPlayer/PrismMusicPlayer.wxml +1 -0
- package/dist/dev/mp-weixin/components/PrismMusicPlayer/PrismMusicPlayer.wxss +334 -0
- package/dist/dev/mp-weixin/components/PrismNavBar/PrismNavBar.js +71 -0
- package/dist/dev/mp-weixin/components/PrismNavBar/PrismNavBar.json +4 -0
- package/dist/dev/mp-weixin/components/PrismNavBar/PrismNavBar.wxml +1 -0
- package/dist/dev/mp-weixin/components/PrismNavBar/PrismNavBar.wxss +150 -0
- package/dist/dev/mp-weixin/components/PrismSecureInput/PrismSecureInput.js +140 -0
- package/dist/dev/mp-weixin/components/PrismSecureInput/PrismSecureInput.json +4 -0
- package/dist/dev/mp-weixin/components/PrismSecureInput/PrismSecureInput.wxml +1 -0
- package/dist/dev/mp-weixin/components/PrismSecureInput/PrismSecureInput.wxss +215 -0
- package/dist/dev/mp-weixin/components/PrismSticky/PrismSticky.js +120 -0
- package/dist/dev/mp-weixin/components/PrismSticky/PrismSticky.json +4 -0
- package/dist/dev/mp-weixin/components/PrismSticky/PrismSticky.wxml +1 -0
- package/dist/dev/mp-weixin/components/PrismSticky/PrismSticky.wxss +62 -0
- package/dist/dev/mp-weixin/components/PrismSwiper/PrismSwiper.js +163 -0
- package/dist/dev/mp-weixin/components/PrismSwiper/PrismSwiper.json +4 -0
- package/dist/dev/mp-weixin/components/PrismSwiper/PrismSwiper.wxml +1 -0
- package/dist/dev/mp-weixin/components/PrismSwiper/PrismSwiper.wxss +203 -0
- package/dist/dev/mp-weixin/components/PrismSwitch/PrismSwitch.js +69 -0
- package/dist/dev/mp-weixin/components/PrismSwitch/PrismSwitch.json +4 -0
- package/dist/dev/mp-weixin/components/PrismSwitch/PrismSwitch.wxml +1 -0
- package/dist/dev/mp-weixin/components/PrismSwitch/PrismSwitch.wxss +151 -0
- package/dist/dev/mp-weixin/components/PrismTabBar/PrismTabBar.js +58 -0
- package/dist/dev/mp-weixin/components/PrismTabBar/PrismTabBar.json +4 -0
- package/dist/dev/mp-weixin/components/PrismTabBar/PrismTabBar.wxml +1 -0
- package/dist/dev/mp-weixin/components/PrismTabBar/PrismTabBar.wxss +119 -0
- package/dist/dev/mp-weixin/components/PrismTabs/PrismTabs.js +51 -0
- package/dist/dev/mp-weixin/components/PrismTabs/PrismTabs.json +4 -0
- package/dist/dev/mp-weixin/components/PrismTabs/PrismTabs.wxml +1 -0
- package/dist/dev/mp-weixin/components/PrismTabs/PrismTabs.wxss +51 -0
- package/dist/dev/mp-weixin/components/PrismVoiceInput/PrismVoiceInput.js +182 -0
- package/dist/dev/mp-weixin/components/PrismVoiceInput/PrismVoiceInput.json +4 -0
- package/dist/dev/mp-weixin/components/PrismVoiceInput/PrismVoiceInput.wxml +1 -0
- package/dist/dev/mp-weixin/components/PrismVoiceInput/PrismVoiceInput.wxss +329 -0
- package/dist/dev/mp-weixin/composables/useNavbar.js +19 -0
- package/dist/dev/mp-weixin/config/theme-colors.js +73 -0
- package/dist/dev/mp-weixin/pages/demo/basic.js +77 -0
- package/dist/dev/mp-weixin/pages/demo/basic.json +7 -0
- package/dist/dev/mp-weixin/pages/demo/basic.wxml +1 -0
- package/dist/dev/mp-weixin/pages/demo/basic.wxss +54 -0
- package/dist/dev/mp-weixin/pages/demo/code/index.js +190 -0
- package/dist/dev/mp-weixin/pages/demo/code/index.json +7 -0
- package/dist/dev/mp-weixin/pages/demo/code/index.wxml +1 -0
- package/dist/dev/mp-weixin/pages/demo/code/index.wxss +71 -0
- package/dist/dev/mp-weixin/pages/demo/colors.js +130 -0
- package/dist/dev/mp-weixin/pages/demo/colors.json +7 -0
- package/dist/dev/mp-weixin/pages/demo/colors.wxml +1 -0
- package/dist/dev/mp-weixin/pages/demo/colors.wxss +3793 -0
- package/dist/dev/mp-weixin/pages/demo/container.js +65 -0
- package/dist/dev/mp-weixin/pages/demo/container.json +7 -0
- package/dist/dev/mp-weixin/pages/demo/container.wxml +1 -0
- package/dist/dev/mp-weixin/pages/demo/container.wxss +54 -0
- package/dist/dev/mp-weixin/pages/demo/data.js +398 -0
- package/dist/dev/mp-weixin/pages/demo/data.json +7 -0
- package/dist/dev/mp-weixin/pages/demo/data.wxml +1 -0
- package/dist/dev/mp-weixin/pages/demo/data.wxss +235 -0
- package/dist/dev/mp-weixin/pages/demo/effects.js +62 -0
- package/dist/dev/mp-weixin/pages/demo/effects.json +7 -0
- package/dist/dev/mp-weixin/pages/demo/effects.wxml +1 -0
- package/dist/dev/mp-weixin/pages/demo/effects.wxss +60 -0
- package/dist/dev/mp-weixin/pages/demo/feedback.js +256 -0
- package/dist/dev/mp-weixin/pages/demo/feedback.json +7 -0
- package/dist/dev/mp-weixin/pages/demo/feedback.wxml +1 -0
- package/dist/dev/mp-weixin/pages/demo/feedback.wxss +120 -0
- package/dist/dev/mp-weixin/pages/demo/form.js +689 -0
- package/dist/dev/mp-weixin/pages/demo/form.json +18 -0
- package/dist/dev/mp-weixin/pages/demo/form.wxml +1 -0
- package/dist/dev/mp-weixin/pages/demo/form.wxss +54 -0
- package/dist/dev/mp-weixin/pages/demo/layout/card-layout.js +61 -0
- package/dist/dev/mp-weixin/pages/demo/layout/card-layout.json +7 -0
- package/dist/dev/mp-weixin/pages/demo/layout/card-layout.wxml +1 -0
- package/dist/dev/mp-weixin/pages/demo/layout/card-layout.wxss +326 -0
- package/dist/dev/mp-weixin/pages/demo/layout.js +96 -0
- package/dist/dev/mp-weixin/pages/demo/layout.json +7 -0
- package/dist/dev/mp-weixin/pages/demo/layout.wxml +1 -0
- package/dist/dev/mp-weixin/pages/demo/layout.wxss +54 -0
- package/dist/dev/mp-weixin/pages/demo/navigation.js +142 -0
- package/dist/dev/mp-weixin/pages/demo/navigation.json +10 -0
- package/dist/dev/mp-weixin/pages/demo/navigation.wxml +1 -0
- package/dist/dev/mp-weixin/pages/demo/navigation.wxss +61 -0
- package/dist/dev/mp-weixin/pages/demo/other.js +50 -0
- package/dist/dev/mp-weixin/pages/demo/other.json +7 -0
- package/dist/dev/mp-weixin/pages/demo/other.wxml +1 -0
- package/dist/dev/mp-weixin/pages/demo/other.wxss +54 -0
- package/dist/dev/mp-weixin/pages/demo/sticky/group.js +212 -0
- package/dist/dev/mp-weixin/pages/demo/sticky/group.json +8 -0
- package/dist/dev/mp-weixin/pages/demo/sticky/group.wxml +1 -0
- package/dist/dev/mp-weixin/pages/demo/sticky/group.wxss +135 -0
- package/dist/dev/mp-weixin/pages/demo/sticky/index.js +90 -0
- package/dist/dev/mp-weixin/pages/demo/sticky/index.json +9 -0
- package/dist/dev/mp-weixin/pages/demo/sticky/index.wxml +1 -0
- package/dist/dev/mp-weixin/pages/demo/sticky/index.wxss +175 -0
- package/dist/dev/mp-weixin/pages/examples/examples.js +65 -0
- package/dist/dev/mp-weixin/pages/examples/examples.json +8 -0
- package/dist/dev/mp-weixin/pages/examples/examples.wxml +1 -0
- package/dist/dev/mp-weixin/pages/examples/examples.wxss +461 -0
- package/dist/dev/mp-weixin/pages/icons/icons.js +350 -0
- package/dist/dev/mp-weixin/pages/icons/icons.json +8 -0
- package/dist/dev/mp-weixin/pages/icons/icons.wxml +1 -0
- package/dist/dev/mp-weixin/pages/icons/icons.wxss +3079 -0
- package/dist/dev/mp-weixin/pages/index/index.js +118 -0
- package/dist/dev/mp-weixin/pages/index/index.json +8 -0
- package/dist/dev/mp-weixin/pages/index/index.wxml +1 -0
- package/dist/dev/mp-weixin/pages/index/index.wxss +123 -0
- package/dist/dev/mp-weixin/pages/tools/tools.js +37 -0
- package/dist/dev/mp-weixin/pages/tools/tools.json +7 -0
- package/dist/dev/mp-weixin/pages/tools/tools.wxml +1 -0
- package/dist/dev/mp-weixin/pages/tools/tools.wxss +134 -0
- package/dist/dev/mp-weixin/project.config.json +36 -0
- package/dist/dev/mp-weixin/project.private.config.json +23 -0
- package/dist/dev/mp-weixin/static/fonts/all-icons.txt +453 -0
- package/dist/dev/mp-weixin/static/fonts/fa-brands-400.woff2 +0 -0
- package/dist/dev/mp-weixin/static/fonts/fa-regular-400.woff2 +0 -0
- package/dist/dev/mp-weixin/static/fonts/fa-solid-900.woff2 +0 -0
- package/dist/dev/mp-weixin/static/fonts/fa-v4compatibility.woff2 +0 -0
- package/dist/dev/mp-weixin/static/fonts/font-awesome.css +943 -0
- package/dist/dev/mp-weixin/static/fonts/iconfont.css +62 -0
- package/dist/dev/mp-weixin/static/fonts/iconfont.js +1 -0
- package/dist/dev/mp-weixin/static/fonts/iconfont.json +79 -0
- package/dist/dev/mp-weixin/static/fonts/iconfont.ttf +0 -0
- package/dist/dev/mp-weixin/static/fonts/iconfont.woff +0 -0
- package/dist/dev/mp-weixin/static/fonts/iconfont.woff2 +0 -0
- package/dist/dev/mp-weixin/static/fonts/icons-list.txt +453 -0
- package/dist/dev/mp-weixin/static/tabbar/examples-active.png +0 -0
- package/dist/dev/mp-weixin/static/tabbar/examples.png +0 -0
- package/dist/dev/mp-weixin/static/tabbar/home-active.png +0 -0
- package/dist/dev/mp-weixin/static/tabbar/home.png +0 -0
- package/dist/dev/mp-weixin/static/tabbar/icons-active.png +0 -0
- package/dist/dev/mp-weixin/static/tabbar/icons.png +0 -0
- package/dist/dev/mp-weixin/static/tabbar/tools-active.png +0 -0
- package/dist/dev/mp-weixin/static/tabbar/tools.png +0 -0
- package/dist/dev/mp-weixin/store/app.js +64 -0
- package/dist/dev/mp-weixin/utils/lunar.js +330 -0
- package/dist/dev/mp-weixin/utils/system.js +18 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.esm.js +33 -0
- package/dist/index.js +33 -0
- package/dist/prism-ui.css +7776 -0
- package/dist/prism-ui.min.css +1 -0
- package/dist/styles/base.scss +213 -0
- package/dist/styles/button.scss +120 -0
- package/dist/styles/card.scss +306 -0
- package/dist/styles/data.scss +1229 -0
- package/dist/styles/effects.scss +407 -0
- package/dist/styles/feedback.scss +698 -0
- package/dist/styles/form.scss +1574 -0
- package/dist/styles/index.scss +43 -0
- package/dist/styles/list.scss +184 -0
- package/dist/styles/navigation.scss +501 -0
- package/dist/styles/overlay.scss +182 -0
- package/dist/styles/utilities.scss +134 -0
- package/dist/styles/variables.scss +154 -0
- package/package.json +2 -5
- package/styles/base.scss +0 -1
- package/styles/card.scss +0 -1
- package/styles/colors.scss +0 -1
- package/styles/effects.scss +0 -1
- package/styles/form.scss +0 -1
- package/styles/index.scss +13 -13
- package/styles/navigation.scss +0 -1
- package/styles/variables.scss +1 -1
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prism UI - SCSS 变量定义
|
|
3
|
+
* 此文件包含所有设计令牌和变量
|
|
4
|
+
* 所有变量使用 $prism- 前缀,避免与用户项目冲突
|
|
5
|
+
*
|
|
6
|
+
* 主题切换:修改下面的引入文件即可切换主题
|
|
7
|
+
* 可选主题:blue(默认) / green / purple / orange / red / cyan
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Prism UI - 蓝色主题(默认)
|
|
11
|
+
*
|
|
12
|
+
* 使用方式:在 variables.scss 中修改引入
|
|
13
|
+
* @import '../theme/blue.scss';
|
|
14
|
+
*
|
|
15
|
+
* 颜色值来自 colors.scss 中的 $prism-blue-* 变量
|
|
16
|
+
*/
|
|
17
|
+
/* ============================================================
|
|
18
|
+
一、浅色模式变量(使用 !default,允许主题文件覆盖)
|
|
19
|
+
============================================================ */
|
|
20
|
+
/* -------------------- 主题色 -------------------- */
|
|
21
|
+
/* -------------------- 状态色 -------------------- */
|
|
22
|
+
/* -------------------- 文字颜色 -------------------- */
|
|
23
|
+
/* -------------------- 边框颜色 -------------------- */
|
|
24
|
+
/* -------------------- 背景颜色 -------------------- */
|
|
25
|
+
/* ============================================================
|
|
26
|
+
二、深色模式变量
|
|
27
|
+
============================================================ */
|
|
28
|
+
/* -------------------- 主题色(深色) -------------------- */
|
|
29
|
+
/* -------------------- 状态色(深色) -------------------- */
|
|
30
|
+
/* -------------------- 文字颜色(深色) -------------------- */
|
|
31
|
+
/* -------------------- 边框颜色(深色) -------------------- */
|
|
32
|
+
/* -------------------- 背景颜色(深色) -------------------- */
|
|
33
|
+
/* ============================================================
|
|
34
|
+
三、主题色透明度(使用 !default,允许主题文件覆盖)
|
|
35
|
+
============================================================ */
|
|
36
|
+
/* ============================================================
|
|
37
|
+
主题色渐变(使用 !default,允许主题文件覆盖)
|
|
38
|
+
============================================================ */
|
|
39
|
+
/* ============================================================
|
|
40
|
+
四、白色透明度
|
|
41
|
+
============================================================ */
|
|
42
|
+
/* ============================================================
|
|
43
|
+
六、第三方品牌色
|
|
44
|
+
============================================================ */
|
|
45
|
+
/* ============================================================
|
|
46
|
+
八、常用阴影(使用 !default,允许主题文件覆盖)
|
|
47
|
+
============================================================ */
|
|
48
|
+
/* ============================================================
|
|
49
|
+
九、统一间距
|
|
50
|
+
============================================================ */
|
|
51
|
+
.prism-city-select .prism-select-box {
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
justify-content: space-between;
|
|
55
|
+
padding: 24rpx;
|
|
56
|
+
background: var(--prism-input-bg, #F7F8FA);
|
|
57
|
+
border-radius: 12rpx;
|
|
58
|
+
}
|
|
59
|
+
.prism-city-select .prism-select-box .placeholder {
|
|
60
|
+
color: var(--prism-text-placeholder, #C9CDD4);
|
|
61
|
+
font-size: 28rpx;
|
|
62
|
+
}
|
|
63
|
+
.prism-city-select .prism-select-box .select-text {
|
|
64
|
+
color: var(--prism-text-primary, #1D2129);
|
|
65
|
+
font-size: 28rpx;
|
|
66
|
+
}
|
|
67
|
+
.prism-city-select .prism-select-box .select-arrow {
|
|
68
|
+
color: var(--prism-text-secondary, #86909C);
|
|
69
|
+
font-size: 28rpx;
|
|
70
|
+
}
|
|
71
|
+
.prism-city-select .picker-page {
|
|
72
|
+
position: fixed;
|
|
73
|
+
top: 0;
|
|
74
|
+
left: 0;
|
|
75
|
+
right: 0;
|
|
76
|
+
bottom: -100rpx;
|
|
77
|
+
padding-bottom: 100rpx;
|
|
78
|
+
background: var(--prism-bg-color-page, #F5F6F7);
|
|
79
|
+
z-index: 9999;
|
|
80
|
+
display: flex;
|
|
81
|
+
flex-direction: column;
|
|
82
|
+
overflow: hidden;
|
|
83
|
+
box-sizing: border-box;
|
|
84
|
+
}
|
|
85
|
+
.prism-city-select .page-header {
|
|
86
|
+
display: flex;
|
|
87
|
+
align-items: center;
|
|
88
|
+
justify-content: space-between;
|
|
89
|
+
padding: 24rpx 32rpx;
|
|
90
|
+
padding-top: calc(24rpx + env(safe-area-inset-top));
|
|
91
|
+
background: var(--prism-bg-color-card, #FFFFFF);
|
|
92
|
+
}
|
|
93
|
+
.prism-city-select .header-back {
|
|
94
|
+
width: 60rpx;
|
|
95
|
+
}
|
|
96
|
+
.prism-city-select .header-back .fa {
|
|
97
|
+
font-size: 36rpx;
|
|
98
|
+
color: var(--prism-text-primary, #1D2129);
|
|
99
|
+
}
|
|
100
|
+
.prism-city-select .header-title {
|
|
101
|
+
font-size: 34rpx;
|
|
102
|
+
font-weight: 600;
|
|
103
|
+
color: var(--prism-text-primary, #1D2129);
|
|
104
|
+
}
|
|
105
|
+
.prism-city-select .header-right {
|
|
106
|
+
width: 60rpx;
|
|
107
|
+
}
|
|
108
|
+
.prism-city-select .search-box {
|
|
109
|
+
padding: 16rpx 32rpx;
|
|
110
|
+
background: var(--prism-bg-color-card, #FFFFFF);
|
|
111
|
+
}
|
|
112
|
+
.prism-city-select .search-input-wrap {
|
|
113
|
+
display: flex;
|
|
114
|
+
align-items: center;
|
|
115
|
+
padding: 16rpx 24rpx;
|
|
116
|
+
background: var(--prism-bg-color-container, #F7F8FA);
|
|
117
|
+
border-radius: 8rpx;
|
|
118
|
+
gap: 16rpx;
|
|
119
|
+
}
|
|
120
|
+
.prism-city-select .search-input-wrap .fa-search {
|
|
121
|
+
color: var(--prism-text-placeholder, #C9CDD4);
|
|
122
|
+
}
|
|
123
|
+
.prism-city-select .search-input-wrap .fa-times-circle {
|
|
124
|
+
color: var(--prism-text-secondary, #86909C);
|
|
125
|
+
}
|
|
126
|
+
.prism-city-select .search-input {
|
|
127
|
+
flex: 1;
|
|
128
|
+
font-size: 28rpx;
|
|
129
|
+
color: var(--prism-text-primary, #1D2129);
|
|
130
|
+
}
|
|
131
|
+
.prism-city-select .page-content {
|
|
132
|
+
flex: 1;
|
|
133
|
+
height: 0;
|
|
134
|
+
}
|
|
135
|
+
.prism-city-select .city-content {
|
|
136
|
+
height: 100%;
|
|
137
|
+
}
|
|
138
|
+
.prism-city-select .hot-section {
|
|
139
|
+
background: var(--prism-bg-color-card, #FFFFFF);
|
|
140
|
+
}
|
|
141
|
+
.prism-city-select .section-title {
|
|
142
|
+
display: flex;
|
|
143
|
+
align-items: center;
|
|
144
|
+
gap: 8rpx;
|
|
145
|
+
padding: 8rpx 24rpx 0;
|
|
146
|
+
margin-bottom: 8rpx;
|
|
147
|
+
font-size: 26rpx;
|
|
148
|
+
color: var(--prism-text-secondary, #86909C);
|
|
149
|
+
}
|
|
150
|
+
.prism-city-select .section-title .fa-fire {
|
|
151
|
+
color: #FF6B00;
|
|
152
|
+
}
|
|
153
|
+
.prism-city-select .hot-cities-grid {
|
|
154
|
+
display: flex;
|
|
155
|
+
flex-wrap: wrap;
|
|
156
|
+
padding: 0 24rpx 24rpx;
|
|
157
|
+
gap: 16rpx;
|
|
158
|
+
}
|
|
159
|
+
.prism-city-select .hot-city-item {
|
|
160
|
+
padding: 16rpx 32rpx;
|
|
161
|
+
background: var(--prism-bg-color-container, #F7F8FA);
|
|
162
|
+
border-radius: 8rpx;
|
|
163
|
+
font-size: 28rpx;
|
|
164
|
+
color: var(--prism-text-primary, #1D2129);
|
|
165
|
+
}
|
|
166
|
+
.prism-city-select .search-results {
|
|
167
|
+
height: 100%;
|
|
168
|
+
background: var(--prism-bg-color-card, #FFFFFF);
|
|
169
|
+
}
|
|
170
|
+
.prism-city-select .result-item {
|
|
171
|
+
display: flex;
|
|
172
|
+
justify-content: space-between;
|
|
173
|
+
padding: 28rpx 32rpx;
|
|
174
|
+
border-bottom: 1rpx solid var(--prism-border-color-light, #E5E6EB);
|
|
175
|
+
font-size: 30rpx;
|
|
176
|
+
color: var(--prism-text-primary, #1D2129);
|
|
177
|
+
}
|
|
178
|
+
.prism-city-select .result-item .result-province {
|
|
179
|
+
font-size: 26rpx;
|
|
180
|
+
color: var(--prism-text-secondary, #86909C);
|
|
181
|
+
}
|
|
182
|
+
.prism-city-select .search-empty {
|
|
183
|
+
display: flex;
|
|
184
|
+
flex-direction: column;
|
|
185
|
+
align-items: center;
|
|
186
|
+
padding: 120rpx 32rpx;
|
|
187
|
+
gap: 24rpx;
|
|
188
|
+
}
|
|
189
|
+
.prism-city-select .search-empty .fa {
|
|
190
|
+
font-size: 80rpx;
|
|
191
|
+
color: var(--prism-text-placeholder, #C9CDD4);
|
|
192
|
+
}
|
|
193
|
+
.prism-city-select .search-empty text {
|
|
194
|
+
font-size: 28rpx;
|
|
195
|
+
color: var(--prism-text-secondary, #86909C);
|
|
196
|
+
}
|
|
197
|
+
.prism-city-select .city-arrow {
|
|
198
|
+
font-size: 24rpx;
|
|
199
|
+
color: var(--prism-text-placeholder, #C9CDD4);
|
|
200
|
+
margin-left: 16rpx;
|
|
201
|
+
}
|
|
202
|
+
.prism-city-select .group-index,
|
|
203
|
+
.prism-city-select .group-item {
|
|
204
|
+
margin: 0 30rpx;
|
|
205
|
+
}
|
|
206
|
+
.prism-city-select .prism-index-bar {
|
|
207
|
+
right: 0;
|
|
208
|
+
}
|
|
209
|
+
.dark-mode.prism-city-select .picker-page {
|
|
210
|
+
background: var(--prism-bg-color-page, #121212);
|
|
211
|
+
}
|
|
212
|
+
.dark-mode.prism-city-select .page-header, .dark-mode.prism-city-select .search-box, .dark-mode.prism-city-select .hot-section, .dark-mode.prism-city-select .search-results {
|
|
213
|
+
background: var(--prism-bg-color-card, #1A1A1A);
|
|
214
|
+
}
|
|
215
|
+
.dark-mode.prism-city-select .search-input-wrap, .dark-mode.prism-city-select .hot-city-item {
|
|
216
|
+
background: var(--prism-bg-color-container, #2A2A2A);
|
|
217
|
+
}
|
|
218
|
+
.dark-mode.prism-city-select .group-index {
|
|
219
|
+
background: var(--prism-bg-color-page, #121212);
|
|
220
|
+
}
|
|
221
|
+
.dark-mode.prism-city-select .group-item {
|
|
222
|
+
background: var(--prism-bg-color-card, #1A1A1A);
|
|
223
|
+
color: var(--prism-text-primary, #E5E6EB);
|
|
224
|
+
border-bottom-color: var(--prism-border-color-light, #2D2D2D);
|
|
225
|
+
}
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const common_vendor = require("../../common/vendor.js");
|
|
3
|
+
const store_app = require("../../store/app.js");
|
|
4
|
+
const _sfc_main = {
|
|
5
|
+
__name: "PrismCode",
|
|
6
|
+
props: {
|
|
7
|
+
// 要展示的代码内容
|
|
8
|
+
code: { type: String, default: "" },
|
|
9
|
+
// 编程语言,用于语法高亮和头部显示
|
|
10
|
+
// 支持: js/ts/python/java/go/rust/cpp/sql/html/css/json/shell/vue
|
|
11
|
+
language: { type: String, default: "" },
|
|
12
|
+
// 主题模式: 'auto' | 'light' | 'dark'
|
|
13
|
+
// auto: 跟随系统深色模式自动切换
|
|
14
|
+
theme: { type: String, default: "auto" },
|
|
15
|
+
// 是否显示行号
|
|
16
|
+
showLineNumbers: { type: Boolean, default: false },
|
|
17
|
+
// 是否显示复制按钮(双击代码区域也可复制)
|
|
18
|
+
copyable: { type: Boolean, default: false },
|
|
19
|
+
// 是否可展开/收起整个代码块
|
|
20
|
+
expandable: { type: Boolean, default: false },
|
|
21
|
+
// 默认是否展开(仅 expandable 为 true 时有效)
|
|
22
|
+
defaultExpanded: { type: Boolean, default: true },
|
|
23
|
+
// 是否启用括号折叠功能(折叠 {}、[]、() 内的代码)
|
|
24
|
+
foldable: { type: Boolean, default: false },
|
|
25
|
+
// 是否启用语法高亮
|
|
26
|
+
highlight: { type: Boolean, default: true }
|
|
27
|
+
},
|
|
28
|
+
setup(__props) {
|
|
29
|
+
const props = __props;
|
|
30
|
+
const appStore = store_app.useAppStore();
|
|
31
|
+
const copied = common_vendor.ref(false);
|
|
32
|
+
const isExpanded = common_vendor.ref(props.defaultExpanded);
|
|
33
|
+
const foldedRanges = common_vendor.ref(/* @__PURE__ */ new Set());
|
|
34
|
+
const actualTheme = common_vendor.computed(() => {
|
|
35
|
+
if (props.theme === "auto") {
|
|
36
|
+
return appStore.isDarkMode ? "dark" : "light";
|
|
37
|
+
}
|
|
38
|
+
return props.theme;
|
|
39
|
+
});
|
|
40
|
+
const codeLines = common_vendor.computed(() => {
|
|
41
|
+
return props.code ? props.code.split("\n") : [""];
|
|
42
|
+
});
|
|
43
|
+
const langKeywords = {
|
|
44
|
+
js: ["const", "let", "var", "function", "return", "if", "else", "for", "while", "do", "switch", "case", "break", "continue", "class", "extends", "import", "export", "from", "default", "new", "this", "super", "async", "await", "try", "catch", "finally", "throw", "typeof", "instanceof", "in", "of", "delete", "void", "yield", "static", "get", "set"],
|
|
45
|
+
ts: ["const", "let", "var", "function", "return", "if", "else", "for", "while", "do", "switch", "case", "break", "continue", "class", "extends", "implements", "import", "export", "from", "default", "new", "this", "super", "async", "await", "try", "catch", "finally", "throw", "typeof", "instanceof", "in", "of", "delete", "void", "yield", "static", "get", "set", "interface", "type", "enum", "namespace", "module", "declare", "abstract", "readonly", "private", "protected", "public", "as", "is", "keyof", "infer"],
|
|
46
|
+
python: ["def", "class", "return", "if", "elif", "else", "for", "while", "break", "continue", "pass", "import", "from", "as", "try", "except", "finally", "raise", "with", "lambda", "yield", "global", "nonlocal", "assert", "del", "in", "not", "and", "or", "is", "async", "await"],
|
|
47
|
+
java: ["public", "private", "protected", "static", "final", "abstract", "class", "interface", "extends", "implements", "new", "return", "if", "else", "for", "while", "do", "switch", "case", "break", "continue", "try", "catch", "finally", "throw", "throws", "import", "package", "this", "super", "void", "instanceof", "synchronized", "volatile", "transient", "native", "enum"],
|
|
48
|
+
go: ["func", "return", "if", "else", "for", "range", "switch", "case", "break", "continue", "default", "package", "import", "type", "struct", "interface", "map", "chan", "go", "defer", "select", "var", "const", "make", "new", "nil", "len", "cap", "append", "copy", "delete", "panic", "recover"],
|
|
49
|
+
rust: ["fn", "let", "mut", "const", "static", "return", "if", "else", "match", "for", "while", "loop", "break", "continue", "struct", "enum", "impl", "trait", "type", "where", "use", "mod", "pub", "crate", "self", "super", "as", "in", "ref", "move", "async", "await", "dyn", "unsafe", "extern"],
|
|
50
|
+
cpp: ["int", "float", "double", "char", "bool", "void", "long", "short", "unsigned", "signed", "const", "static", "extern", "auto", "register", "volatile", "return", "if", "else", "for", "while", "do", "switch", "case", "break", "continue", "default", "class", "struct", "union", "enum", "public", "private", "protected", "virtual", "override", "final", "new", "delete", "this", "template", "typename", "namespace", "using", "try", "catch", "throw", "include", "define", "ifdef", "ifndef", "endif"],
|
|
51
|
+
sql: ["SELECT", "FROM", "WHERE", "AND", "OR", "NOT", "IN", "LIKE", "BETWEEN", "IS", "NULL", "ORDER", "BY", "ASC", "DESC", "LIMIT", "OFFSET", "JOIN", "LEFT", "RIGHT", "INNER", "OUTER", "ON", "GROUP", "HAVING", "INSERT", "INTO", "VALUES", "UPDATE", "SET", "DELETE", "CREATE", "TABLE", "DROP", "ALTER", "INDEX", "PRIMARY", "KEY", "FOREIGN", "REFERENCES", "UNIQUE", "DEFAULT", "AS", "DISTINCT", "COUNT", "SUM", "AVG", "MAX", "MIN", "CASE", "WHEN", "THEN", "ELSE", "END", "UNION", "ALL", "EXISTS"],
|
|
52
|
+
html: ["html", "head", "body", "div", "span", "p", "a", "img", "ul", "ol", "li", "table", "tr", "td", "th", "form", "input", "button", "select", "option", "textarea", "label", "script", "style", "link", "meta", "title", "header", "footer", "nav", "main", "section", "article", "aside", "h1", "h2", "h3", "h4", "h5", "h6", "br", "hr", "strong", "em", "code", "pre", "blockquote", "iframe", "video", "audio", "canvas", "svg"],
|
|
53
|
+
css: ["color", "background", "background-color", "font-size", "font-weight", "font-family", "margin", "padding", "border", "width", "height", "display", "position", "top", "right", "bottom", "left", "flex", "grid", "align-items", "justify-content", "text-align", "line-height", "overflow", "z-index", "opacity", "transform", "transition", "animation", "box-shadow", "border-radius", "cursor", "visibility", "content", "important"],
|
|
54
|
+
json: [],
|
|
55
|
+
shell: ["echo", "cd", "ls", "mkdir", "rm", "cp", "mv", "cat", "grep", "find", "chmod", "chown", "sudo", "apt", "yum", "npm", "yarn", "git", "docker", "curl", "wget", "ssh", "scp", "tar", "zip", "unzip", "export", "source", "alias", "if", "then", "else", "fi", "for", "do", "done", "while", "case", "esac", "function", "return", "exit"],
|
|
56
|
+
vue: ["template", "script", "style", "setup", "ref", "reactive", "computed", "watch", "watchEffect", "onMounted", "onUnmounted", "defineProps", "defineEmits", "defineExpose", "v-if", "v-else", "v-for", "v-model", "v-bind", "v-on", "v-show", "v-slot"]
|
|
57
|
+
};
|
|
58
|
+
const typeKeywords = {
|
|
59
|
+
ts: ["string", "number", "boolean", "object", "any", "void", "never", "unknown", "Array", "Promise", "Record", "Partial", "Required", "Readonly", "Pick", "Omit", "Exclude", "Extract", "NonNullable", "ReturnType", "Parameters", "InstanceType"],
|
|
60
|
+
java: ["int", "long", "short", "byte", "float", "double", "char", "boolean", "String", "Integer", "Long", "Double", "Float", "Boolean", "Object", "List", "Map", "Set", "ArrayList", "HashMap", "HashSet"],
|
|
61
|
+
go: ["int", "int8", "int16", "int32", "int64", "uint", "uint8", "uint16", "uint32", "uint64", "float32", "float64", "complex64", "complex128", "byte", "rune", "string", "bool", "error"],
|
|
62
|
+
rust: ["i8", "i16", "i32", "i64", "i128", "isize", "u8", "u16", "u32", "u64", "u128", "usize", "f32", "f64", "bool", "char", "str", "String", "Vec", "Option", "Result", "Box", "Rc", "Arc", "Cell", "RefCell"]
|
|
63
|
+
};
|
|
64
|
+
function getLangType(lang) {
|
|
65
|
+
const l = (lang || "").toLowerCase();
|
|
66
|
+
if (["js", "javascript", "jsx"].includes(l)) return "js";
|
|
67
|
+
if (["ts", "typescript", "tsx"].includes(l)) return "ts";
|
|
68
|
+
if (["py", "python"].includes(l)) return "python";
|
|
69
|
+
if (["java", "kt", "kotlin"].includes(l)) return "java";
|
|
70
|
+
if (["go", "golang"].includes(l)) return "go";
|
|
71
|
+
if (["rs", "rust"].includes(l)) return "rust";
|
|
72
|
+
if (["c", "cpp", "c++", "h", "hpp"].includes(l)) return "cpp";
|
|
73
|
+
if (["sql", "mysql", "postgresql", "sqlite"].includes(l)) return "sql";
|
|
74
|
+
if (["html", "htm", "xml"].includes(l)) return "html";
|
|
75
|
+
if (["css", "scss", "sass", "less"].includes(l)) return "css";
|
|
76
|
+
if (["json", "jsonc"].includes(l)) return "json";
|
|
77
|
+
if (["sh", "bash", "shell", "zsh"].includes(l)) return "shell";
|
|
78
|
+
if (["vue"].includes(l)) return "vue";
|
|
79
|
+
return "js";
|
|
80
|
+
}
|
|
81
|
+
function escapeHtml(str) {
|
|
82
|
+
return str.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
83
|
+
}
|
|
84
|
+
const darkColors = {
|
|
85
|
+
keyword: "#c586c0",
|
|
86
|
+
string: "#ce9178",
|
|
87
|
+
number: "#b5cea8",
|
|
88
|
+
comment: "#6a9955",
|
|
89
|
+
boolean: "#569cd6",
|
|
90
|
+
function: "#dcdcaa",
|
|
91
|
+
type: "#4ec9b0",
|
|
92
|
+
property: "#4fc1ff",
|
|
93
|
+
tag: "#569cd6",
|
|
94
|
+
attr: "#9cdcfe",
|
|
95
|
+
selector: "#d7ba7d",
|
|
96
|
+
decorator: "#dcdcaa",
|
|
97
|
+
operator: "#d4d4d4",
|
|
98
|
+
bracket: "#ffd700"
|
|
99
|
+
};
|
|
100
|
+
const lightColors = {
|
|
101
|
+
keyword: "#af00db",
|
|
102
|
+
string: "#a31515",
|
|
103
|
+
number: "#098658",
|
|
104
|
+
comment: "#008000",
|
|
105
|
+
boolean: "#0000ff",
|
|
106
|
+
function: "#795e26",
|
|
107
|
+
type: "#267f99",
|
|
108
|
+
property: "#001080",
|
|
109
|
+
tag: "#800000",
|
|
110
|
+
attr: "#e50000",
|
|
111
|
+
selector: "#800000",
|
|
112
|
+
decorator: "#795e26",
|
|
113
|
+
operator: "#000000",
|
|
114
|
+
bracket: "#0431fa"
|
|
115
|
+
};
|
|
116
|
+
const hlColors = common_vendor.computed(() => {
|
|
117
|
+
return actualTheme.value === "dark" ? darkColors : lightColors;
|
|
118
|
+
});
|
|
119
|
+
function wrap(color, text) {
|
|
120
|
+
return `<span style="color:${color}">${escapeHtml(text)}</span>`;
|
|
121
|
+
}
|
|
122
|
+
function highlightLine(line) {
|
|
123
|
+
if (!props.highlight) return escapeHtml(line);
|
|
124
|
+
const langType = getLangType(props.language);
|
|
125
|
+
return tokenize(line, langType);
|
|
126
|
+
}
|
|
127
|
+
function tokenize(line, langType) {
|
|
128
|
+
const tokens = [];
|
|
129
|
+
let i = 0;
|
|
130
|
+
const colors = hlColors.value;
|
|
131
|
+
while (i < line.length) {
|
|
132
|
+
let matched = false;
|
|
133
|
+
if (line[i] === '"') {
|
|
134
|
+
const end = findStringEnd(line, i, '"');
|
|
135
|
+
tokens.push(wrap(colors.string, line.slice(i, end)));
|
|
136
|
+
i = end;
|
|
137
|
+
matched = true;
|
|
138
|
+
} else if (line[i] === "'") {
|
|
139
|
+
const end = findStringEnd(line, i, "'");
|
|
140
|
+
tokens.push(wrap(colors.string, line.slice(i, end)));
|
|
141
|
+
i = end;
|
|
142
|
+
matched = true;
|
|
143
|
+
} else if (line[i] === "`") {
|
|
144
|
+
const end = findStringEnd(line, i, "`");
|
|
145
|
+
tokens.push(wrap(colors.string, line.slice(i, end)));
|
|
146
|
+
i = end;
|
|
147
|
+
matched = true;
|
|
148
|
+
} else if (line.slice(i, i + 2) === "//") {
|
|
149
|
+
tokens.push(wrap(colors.comment, line.slice(i)));
|
|
150
|
+
break;
|
|
151
|
+
} else if (["python", "shell"].includes(langType) && line[i] === "#") {
|
|
152
|
+
tokens.push(wrap(colors.comment, line.slice(i)));
|
|
153
|
+
break;
|
|
154
|
+
} else if (/\d/.test(line[i]) && (i === 0 || !/\w/.test(line[i - 1]))) {
|
|
155
|
+
const match = line.slice(i).match(/^(0x[0-9a-fA-F]+|0b[01]+|0o[0-7]+|\d+\.?\d*(?:e[+-]?\d+)?)/);
|
|
156
|
+
if (match) {
|
|
157
|
+
tokens.push(wrap(colors.number, match[0]));
|
|
158
|
+
i += match[0].length;
|
|
159
|
+
matched = true;
|
|
160
|
+
}
|
|
161
|
+
} else if (/[a-zA-Z_]/.test(line[i])) {
|
|
162
|
+
const match = line.slice(i).match(/^[a-zA-Z_]\w*/);
|
|
163
|
+
if (match) {
|
|
164
|
+
const word = match[0];
|
|
165
|
+
const nextChar = line[i + word.length] || "";
|
|
166
|
+
const keywords = langKeywords[langType] || langKeywords.js;
|
|
167
|
+
const types = typeKeywords[langType] || [];
|
|
168
|
+
if (keywords.includes(word)) {
|
|
169
|
+
tokens.push(wrap(colors.keyword, word));
|
|
170
|
+
} else if (types.includes(word)) {
|
|
171
|
+
tokens.push(wrap(colors.type, word));
|
|
172
|
+
} else if (["true", "false", "null", "undefined", "NaN", "Infinity", "True", "False", "None", "nil"].includes(word)) {
|
|
173
|
+
tokens.push(wrap(colors.boolean, word));
|
|
174
|
+
} else if (nextChar === "(") {
|
|
175
|
+
tokens.push(wrap(colors.function, word));
|
|
176
|
+
} else if (nextChar === ":") {
|
|
177
|
+
tokens.push(wrap(colors.property, word));
|
|
178
|
+
} else {
|
|
179
|
+
tokens.push(escapeHtml(word));
|
|
180
|
+
}
|
|
181
|
+
i += word.length;
|
|
182
|
+
matched = true;
|
|
183
|
+
}
|
|
184
|
+
} else if (/[(){}[\]]/.test(line[i])) {
|
|
185
|
+
tokens.push(wrap(colors.bracket, line[i]));
|
|
186
|
+
i++;
|
|
187
|
+
matched = true;
|
|
188
|
+
} else if (line[i] === "@" && ["python", "java", "ts"].includes(langType)) {
|
|
189
|
+
const match = line.slice(i).match(/^@\w+/);
|
|
190
|
+
if (match) {
|
|
191
|
+
tokens.push(wrap(colors.decorator, match[0]));
|
|
192
|
+
i += match[0].length;
|
|
193
|
+
matched = true;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
if (!matched) {
|
|
197
|
+
tokens.push(escapeHtml(line[i]));
|
|
198
|
+
i++;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return tokens.join("");
|
|
202
|
+
}
|
|
203
|
+
function findStringEnd(line, start, quote) {
|
|
204
|
+
let i = start + 1;
|
|
205
|
+
while (i < line.length) {
|
|
206
|
+
if (line[i] === "\\") {
|
|
207
|
+
i += 2;
|
|
208
|
+
} else if (line[i] === quote) {
|
|
209
|
+
return i + 1;
|
|
210
|
+
} else {
|
|
211
|
+
i++;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
return line.length;
|
|
215
|
+
}
|
|
216
|
+
const foldRanges = common_vendor.computed(() => {
|
|
217
|
+
if (!props.foldable) return [];
|
|
218
|
+
const ranges = [];
|
|
219
|
+
const stack = [];
|
|
220
|
+
const lines = codeLines.value;
|
|
221
|
+
lines.forEach((line, index) => {
|
|
222
|
+
const openCount = (line.match(/[\{\[\(]/g) || []).length;
|
|
223
|
+
const closeCount = (line.match(/[\}\]\)]/g) || []).length;
|
|
224
|
+
for (let i = 0; i < openCount; i++) {
|
|
225
|
+
stack.push(index);
|
|
226
|
+
}
|
|
227
|
+
for (let i = 0; i < closeCount; i++) {
|
|
228
|
+
if (stack.length > 0) {
|
|
229
|
+
const start = stack.pop();
|
|
230
|
+
if (index > start) {
|
|
231
|
+
ranges.push({ start, end: index });
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
return ranges;
|
|
237
|
+
});
|
|
238
|
+
const displayLines = common_vendor.computed(() => {
|
|
239
|
+
const lines = codeLines.value;
|
|
240
|
+
const result = [];
|
|
241
|
+
lines.forEach((content, index) => {
|
|
242
|
+
const foldRange = foldRanges.value.find((r) => r.start === index);
|
|
243
|
+
const isFolded = foldedRanges.value.has(index);
|
|
244
|
+
const isHidden = Array.from(foldedRanges.value).some((start) => {
|
|
245
|
+
const range = foldRanges.value.find((r) => r.start === start);
|
|
246
|
+
return range && index > range.start && index <= range.end;
|
|
247
|
+
});
|
|
248
|
+
result.push({
|
|
249
|
+
lineNum: index + 1,
|
|
250
|
+
content,
|
|
251
|
+
htmlContent: highlightLine(content),
|
|
252
|
+
visible: !isHidden,
|
|
253
|
+
foldable: !!foldRange,
|
|
254
|
+
foldStart: index,
|
|
255
|
+
folded: isFolded
|
|
256
|
+
});
|
|
257
|
+
});
|
|
258
|
+
return result;
|
|
259
|
+
});
|
|
260
|
+
function toggleFold(lineIndex) {
|
|
261
|
+
if (foldedRanges.value.has(lineIndex)) {
|
|
262
|
+
foldedRanges.value.delete(lineIndex);
|
|
263
|
+
} else {
|
|
264
|
+
foldedRanges.value.add(lineIndex);
|
|
265
|
+
}
|
|
266
|
+
foldedRanges.value = new Set(foldedRanges.value);
|
|
267
|
+
}
|
|
268
|
+
function handleCopy() {
|
|
269
|
+
common_vendor.index.setClipboardData({
|
|
270
|
+
data: props.code,
|
|
271
|
+
success: () => {
|
|
272
|
+
copied.value = true;
|
|
273
|
+
setTimeout(() => {
|
|
274
|
+
copied.value = false;
|
|
275
|
+
}, 2e3);
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
function toggleExpand() {
|
|
280
|
+
isExpanded.value = !isExpanded.value;
|
|
281
|
+
}
|
|
282
|
+
return (_ctx, _cache) => {
|
|
283
|
+
return common_vendor.e({
|
|
284
|
+
a: __props.language || __props.copyable || __props.expandable
|
|
285
|
+
}, __props.language || __props.copyable || __props.expandable ? common_vendor.e({
|
|
286
|
+
b: __props.expandable
|
|
287
|
+
}, __props.expandable ? {
|
|
288
|
+
c: common_vendor.n(isExpanded.value ? "fa-chevron-down" : "fa-chevron-right"),
|
|
289
|
+
d: common_vendor.o(toggleExpand)
|
|
290
|
+
} : {}, {
|
|
291
|
+
e: __props.language
|
|
292
|
+
}, __props.language ? {
|
|
293
|
+
f: common_vendor.t(__props.language)
|
|
294
|
+
} : {}, {
|
|
295
|
+
g: __props.copyable
|
|
296
|
+
}, __props.copyable ? {
|
|
297
|
+
h: common_vendor.n(copied.value ? "fa-check" : "fa-copy"),
|
|
298
|
+
i: common_vendor.t(copied.value ? "已复制" : "复制"),
|
|
299
|
+
j: common_vendor.o(handleCopy)
|
|
300
|
+
} : {}) : {}, {
|
|
301
|
+
k: common_vendor.f(displayLines.value, (line, index, i0) => {
|
|
302
|
+
return common_vendor.e({
|
|
303
|
+
a: line.visible
|
|
304
|
+
}, line.visible ? common_vendor.e({
|
|
305
|
+
b: __props.foldable && line.foldable
|
|
306
|
+
}, __props.foldable && line.foldable ? {
|
|
307
|
+
c: common_vendor.n(line.folded ? "fa-plus" : "fa-minus"),
|
|
308
|
+
d: common_vendor.o(($event) => toggleFold(line.foldStart), index)
|
|
309
|
+
} : __props.foldable ? {} : {}, {
|
|
310
|
+
e: __props.foldable,
|
|
311
|
+
f: __props.showLineNumbers
|
|
312
|
+
}, __props.showLineNumbers ? {
|
|
313
|
+
g: common_vendor.t(line.lineNum)
|
|
314
|
+
} : {}, {
|
|
315
|
+
h: !__props.highlight
|
|
316
|
+
}, !__props.highlight ? {
|
|
317
|
+
i: common_vendor.t(line.content),
|
|
318
|
+
j: common_vendor.t(line.folded ? " ..." : "")
|
|
319
|
+
} : {
|
|
320
|
+
k: line.htmlContent
|
|
321
|
+
}) : {}, {
|
|
322
|
+
l: index
|
|
323
|
+
});
|
|
324
|
+
}),
|
|
325
|
+
l: isExpanded.value,
|
|
326
|
+
m: common_vendor.o(handleCopy),
|
|
327
|
+
n: common_vendor.n(actualTheme.value),
|
|
328
|
+
o: common_vendor.n({
|
|
329
|
+
"show-line-numbers": __props.showLineNumbers,
|
|
330
|
+
"collapsed": !isExpanded.value
|
|
331
|
+
})
|
|
332
|
+
});
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
wx.createComponent(_sfc_main);
|
|
337
|
+
//# sourceMappingURL=../../../.sourcemap/mp-weixin/components/PrismCode/PrismCode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<view class="{{['prism-code', n, o]}}"><view wx:if="{{a}}" class="code-header"><view class="header-left"><view wx:if="{{b}}" class="code-expand" bindtap="{{d}}"><text class="{{['fa', c]}}"></text></view><text wx:if="{{e}}" class="code-lang">{{f}}</text></view><view class="header-right"><view wx:if="{{g}}" class="code-copy" bindtap="{{j}}"><text class="{{['fa', h]}}"></text><text class="copy-text">{{i}}</text></view></view></view><view class="code-body" hidden="{{!l}}" binddblclick="{{m}}"><view class="code-lines"><block wx:for="{{k}}" wx:for-item="line" wx:key="l"><view wx:if="{{line.a}}" class="code-line"><view wx:if="{{line.b}}" class="fold-btn" bindtap="{{line.d}}"><text class="{{['fa', line.c]}}"></text></view><view wx:elif="{{line.e}}" class="fold-placeholder"></view><text wx:if="{{line.f}}" class="line-number">{{line.g}}</text><text wx:if="{{line.h}}" class="line-content">{{line.i}}{{line.j}}</text><rich-text wx:else class="line-content hl-content" nodes="{{line.k}}"></rich-text></view></block></view></view></view>
|