@cloudbase/weda-ui-mp 0.2.20
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 +1 -0
- package/actions/showMessage/index.js +3 -0
- package/actions/showModal/index.js +3 -0
- package/actions/showToast/index.js +3 -0
- package/app.js +0 -0
- package/components/button/index.js +89 -0
- package/components/button/index.json +4 -0
- package/components/button/index.wxml +22 -0
- package/components/button/index.wxss +13 -0
- package/components/calendar/arrowright--line.svg +3 -0
- package/components/calendar/index.js +439 -0
- package/components/calendar/index.json +5 -0
- package/components/calendar/index.wxml +35 -0
- package/components/calendar/index.wxss +203 -0
- package/components/carousel/index.js +91 -0
- package/components/carousel/index.json +7 -0
- package/components/carousel/index.wxml +6 -0
- package/components/chart/bar/index.js +331 -0
- package/components/chart/bar/index.json +6 -0
- package/components/chart/bar/index.wxml +1 -0
- package/components/chart/bar/index.wxss +9 -0
- package/components/chart/common/config/bar.js +50 -0
- package/components/chart/common/config/global.js +16 -0
- package/components/chart/common/config/line.js +48 -0
- package/components/chart/common/config/pie.js +36 -0
- package/components/chart/common/core/eChartBar.js +267 -0
- package/components/chart/common/core/eChartBase.js +450 -0
- package/components/chart/common/core/eChartLine.js +251 -0
- package/components/chart/common/core/eChartPie.js +169 -0
- package/components/chart/common/data-transform.js +284 -0
- package/components/chart/common/lib/echarts.min.js +18 -0
- package/components/chart/ec-canvas/ec-canvas.js +277 -0
- package/components/chart/ec-canvas/ec-canvas.json +4 -0
- package/components/chart/ec-canvas/ec-canvas.wxml +4 -0
- package/components/chart/ec-canvas/ec-canvas.wxss +4 -0
- package/components/chart/ec-canvas/wx-canvas.js +111 -0
- package/components/chart/line/index.js +326 -0
- package/components/chart/line/index.json +6 -0
- package/components/chart/line/index.wxml +1 -0
- package/components/chart/line/index.wxss +9 -0
- package/components/chart/pie/index.js +257 -0
- package/components/chart/pie/index.json +6 -0
- package/components/chart/pie/index.wxml +1 -0
- package/components/chart/pie/index.wxss +9 -0
- package/components/chart/statisticsCard/index.js +255 -0
- package/components/chart/statisticsCard/index.json +4 -0
- package/components/chart/statisticsCard/index.wxml +9 -0
- package/components/chart/statisticsCard/index.wxss +42 -0
- package/components/common/form-item-wrapper/index.js +20 -0
- package/components/common/form-item-wrapper/index.json +5 -0
- package/components/common/form-item-wrapper/index.wxml +3 -0
- package/components/container/index.js +32 -0
- package/components/container/index.json +4 -0
- package/components/container/index.wxml +3 -0
- package/components/customer-service/index.js +37 -0
- package/components/customer-service/index.json +5 -0
- package/components/customer-service/index.wxml +3 -0
- package/components/customer-service/index.wxss +11 -0
- package/components/dataView/index.js +125 -0
- package/components/dataView/index.json +7 -0
- package/components/dataView/index.wxml +28 -0
- package/components/form/checkbox/index.js +145 -0
- package/components/form/checkbox/index.json +7 -0
- package/components/form/checkbox/index.wxml +13 -0
- package/components/form/checkbox/index.wxss +1 -0
- package/components/form/form/index.js +189 -0
- package/components/form/form/index.json +4 -0
- package/components/form/form/index.wxml +5 -0
- package/components/form/form/index.wxss +3 -0
- package/components/form/form/wd-form.wxss +1113 -0
- package/components/form/formcell/index.js +57 -0
- package/components/form/formcell/index.json +4 -0
- package/components/form/formcell/index.wxml +11 -0
- package/components/form/formcell/index.wxss +31 -0
- package/components/form/input/index.js +116 -0
- package/components/form/input/index.json +7 -0
- package/components/form/input/index.wxml +25 -0
- package/components/form/input/index.wxss +22 -0
- package/components/form/location/components/mapChoose/index.js +516 -0
- package/components/form/location/components/mapChoose/index.json +4 -0
- package/components/form/location/components/mapChoose/index.wxml +54 -0
- package/components/form/location/components/mapChoose/index.wxss +301 -0
- package/components/form/location/index.js +520 -0
- package/components/form/location/index.json +10 -0
- package/components/form/location/index.wxml +29 -0
- package/components/form/location/index.wxss +151 -0
- package/components/form/location/location-btn.svg +4 -0
- package/components/form/location/location.svg +4 -0
- package/components/form/radio/index.js +124 -0
- package/components/form/radio/index.json +7 -0
- package/components/form/radio/index.wxml +13 -0
- package/components/form/radio/index.wxss +1 -0
- package/components/form/select/allTimePicker/dataUtils.js +377 -0
- package/components/form/select/allTimePicker/index.js +487 -0
- package/components/form/select/allTimePicker/index.json +7 -0
- package/components/form/select/allTimePicker/index.wxml +35 -0
- package/components/form/select/allTimePicker/index.wxss +118 -0
- package/components/form/select/dropdown-select/index.js +287 -0
- package/components/form/select/dropdown-select/index.json +4 -0
- package/components/form/select/dropdown-select/index.wxml +35 -0
- package/components/form/select/dropdown-select/index.wxss +293 -0
- package/components/form/select/formats-util.js +15 -0
- package/components/form/select/index.js +1032 -0
- package/components/form/select/index.json +10 -0
- package/components/form/select/index.wxml +57 -0
- package/components/form/select/index.wxss +61 -0
- package/components/form/select/region/index.js +120 -0
- package/components/form/selectMultiple/dropdown-select/index.js +231 -0
- package/components/form/selectMultiple/dropdown-select/index.json +4 -0
- package/components/form/selectMultiple/dropdown-select/index.wxml +37 -0
- package/components/form/selectMultiple/dropdown-select/index.wxss +305 -0
- package/components/form/selectMultiple/index.js +366 -0
- package/components/form/selectMultiple/index.json +9 -0
- package/components/form/selectMultiple/index.wxml +34 -0
- package/components/form/selectMultiple/index.wxss +127 -0
- package/components/form/switch/index.js +90 -0
- package/components/form/switch/index.json +7 -0
- package/components/form/switch/index.wxml +11 -0
- package/components/form/switch/index.wxss +1 -0
- package/components/form/textarea/index.js +90 -0
- package/components/form/textarea/index.json +7 -0
- package/components/form/textarea/index.wxml +8 -0
- package/components/form/textarea/index.wxss +10 -0
- package/components/form/tips/index.js +41 -0
- package/components/form/tips/index.json +4 -0
- package/components/form/tips/index.wxml +1 -0
- package/components/form/tips/index.wxss +5 -0
- package/components/form/uploader/compress.js +31 -0
- package/components/form/uploader/index.js +289 -0
- package/components/form/uploader/index.json +10 -0
- package/components/form/uploader/index.wxml +38 -0
- package/components/form/uploader/index.wxss +47 -0
- package/components/form/uploader/weui-uploader.js +305 -0
- package/components/form/uploader/weui-uploader.json +7 -0
- package/components/form/uploader/weui-uploader.wxml +49 -0
- package/components/form/uploader/weui-uploader.wxss +26 -0
- package/components/form/uploaderFile/index.js +489 -0
- package/components/form/uploaderFile/index.json +9 -0
- package/components/form/uploaderFile/index.wxml +52 -0
- package/components/form/uploaderFile/index.wxss +171 -0
- package/components/form-checkbox/index.js +78 -0
- package/components/form-checkbox/index.json +9 -0
- package/components/form-checkbox/index.wxml +6 -0
- package/components/form-date/index.js +72 -0
- package/components/form-date/index.json +9 -0
- package/components/form-date/index.wxml +25 -0
- package/components/form-email/index.js +99 -0
- package/components/form-email/index.json +9 -0
- package/components/form-email/index.wxml +28 -0
- package/components/form-field-behavior/form-field-behavior.js +472 -0
- package/components/form-field-behavior/item-behavior.js +455 -0
- package/components/form-field-behavior/validator.js +137 -0
- package/components/form-image-uploader/index.js +83 -0
- package/components/form-image-uploader/index.json +9 -0
- package/components/form-image-uploader/index.wxml +27 -0
- package/components/form-input/index.js +103 -0
- package/components/form-input/index.json +9 -0
- package/components/form-input/index.wxml +29 -0
- package/components/form-location/index.js +98 -0
- package/components/form-location/index.json +9 -0
- package/components/form-location/index.wxml +28 -0
- package/components/form-multi-region/index.js +62 -0
- package/components/form-multi-region/index.json +9 -0
- package/components/form-multi-region/index.wxml +6 -0
- package/components/form-phone/index.js +95 -0
- package/components/form-phone/index.json +9 -0
- package/components/form-phone/index.wxml +28 -0
- package/components/form-radio/index.js +70 -0
- package/components/form-radio/index.json +9 -0
- package/components/form-radio/index.wxml +6 -0
- package/components/form-region/index.js +59 -0
- package/components/form-region/index.json +9 -0
- package/components/form-region/index.wxml +6 -0
- package/components/form-select/index.js +114 -0
- package/components/form-select/index.json +9 -0
- package/components/form-select/index.wxml +31 -0
- package/components/form-select-multiple/index.js +97 -0
- package/components/form-select-multiple/index.json +9 -0
- package/components/form-select-multiple/index.wxml +29 -0
- package/components/form-switch/index.js +43 -0
- package/components/form-switch/index.json +9 -0
- package/components/form-switch/index.wxml +6 -0
- package/components/form-text-area/index.js +95 -0
- package/components/form-text-area/index.json +9 -0
- package/components/form-text-area/index.wxml +26 -0
- package/components/form-time/index.js +72 -0
- package/components/form-time/index.json +9 -0
- package/components/form-time/index.wxml +6 -0
- package/components/form-upload-file/index.js +73 -0
- package/components/form-upload-file/index.json +9 -0
- package/components/form-upload-file/index.wxml +26 -0
- package/components/form-url/index.js +104 -0
- package/components/form-url/index.json +9 -0
- package/components/form-url/index.wxml +28 -0
- package/components/formdetail/index.js +328 -0
- package/components/formdetail/index.json +7 -0
- package/components/formdetail/index.wxml +7 -0
- package/components/formdetail/index.wxss +277 -0
- package/components/formdetail/wd-form-detail.wxss +250 -0
- package/components/graphicCard/chevron-right.svg +3 -0
- package/components/graphicCard/index.js +205 -0
- package/components/graphicCard/index.json +7 -0
- package/components/graphicCard/index.wxml +27 -0
- package/components/graphicCard/index.wxss +165 -0
- package/components/grid/_util.wxss +67 -0
- package/components/grid/col/index.js +110 -0
- package/components/grid/col/index.json +4 -0
- package/components/grid/col/index.wxml +3 -0
- package/components/grid/index.js +94 -0
- package/components/grid/index.json +4 -0
- package/components/grid/index.wxml +3 -0
- package/components/grid/index.wxss +1206 -0
- package/components/grid/row/index.js +78 -0
- package/components/grid/row/index.json +4 -0
- package/components/grid/row/index.wxml +3 -0
- package/components/image/index.js +203 -0
- package/components/image/index.json +7 -0
- package/components/image/index.wxml +9 -0
- package/components/image/index.wxss +49 -0
- package/components/listView/arrow-right-line.svg +3 -0
- package/components/listView/emptyText.svg +7 -0
- package/components/listView/index.js +710 -0
- package/components/listView/index.json +7 -0
- package/components/listView/index.wxml +82 -0
- package/components/listView/index.wxss +290 -0
- package/components/listView/more-line.svg +3 -0
- package/components/lottery/index.js +303 -0
- package/components/lottery/index.json +4 -0
- package/components/lottery/index.wxml +41 -0
- package/components/lottery/index.wxss +340 -0
- package/components/modal/index.js +66 -0
- package/components/modal/index.json +9 -0
- package/components/modal/index.wxml +18 -0
- package/components/modal/index.wxss +56 -0
- package/components/navLayout/index.js +123 -0
- package/components/navLayout/index.json +8 -0
- package/components/navLayout/index.wxml +22 -0
- package/components/navLayout/index.wxss +135 -0
- package/components/navigationBar/index.js +205 -0
- package/components/navigationBar/index.json +5 -0
- package/components/navigationBar/index.wxml +83 -0
- package/components/navigationBar/index.wxss +205 -0
- package/components/qrcode/index.js +155 -0
- package/components/qrcode/index.json +5 -0
- package/components/qrcode/index.wxml +2 -0
- package/components/qrcode/index.wxss +10 -0
- package/components/richText/index.js +90 -0
- package/components/richText/index.json +7 -0
- package/components/richText/index.wxml +3 -0
- package/components/richText/index.wxss +70 -0
- package/components/richText/mp-html/index.js +2 -0
- package/components/richText/mp-html/index.json +6 -0
- package/components/richText/mp-html/index.wxml +1 -0
- package/components/richText/mp-html/index.wxss +10 -0
- package/components/richText/mp-html/node/node.js +178 -0
- package/components/richText/mp-html/node/node.json +7 -0
- package/components/richText/mp-html/node/node.wxml +60 -0
- package/components/richText/mp-html/node/node.wxss +156 -0
- package/components/richText/mp-html/parser.js +2 -0
- package/components/scrollView/index.js +144 -0
- package/components/scrollView/index.json +4 -0
- package/components/scrollView/index.wxml +38 -0
- package/components/slot/index.js +25 -0
- package/components/slot/index.json +4 -0
- package/components/slot/index.wxml +3 -0
- package/components/status-content/arrow-right.svg +1 -0
- package/components/status-content/close.svg +1 -0
- package/components/status-content/error.svg +6 -0
- package/components/status-content/index.js +51 -0
- package/components/status-content/index.json +4 -0
- package/components/status-content/index.wxml +28 -0
- package/components/status-content/index.wxss +145 -0
- package/components/swiper/index.js +65 -0
- package/components/swiper/index.json +4 -0
- package/components/swiper/index.wxml +3 -0
- package/components/tabs/index.js +67 -0
- package/components/tabs/index.json +4 -0
- package/components/tabs/index.wxml +10 -0
- package/components/tabs/index.wxss +61 -0
- package/components/text/index.js +40 -0
- package/components/text/index.json +4 -0
- package/components/text/index.wxml +7 -0
- package/components/text/index.wxss +27 -0
- package/components/tooltip/index.js +290 -0
- package/components/tooltip/index.json +4 -0
- package/components/tooltip/index.wxml +18 -0
- package/components/tooltip/index.wxss +72 -0
- package/components/tooltip/wd-tooltip.wxss +31 -0
- package/components/wd-ad/index.js +66 -0
- package/components/wd-ad/index.json +5 -0
- package/components/wd-ad/index.wxml +3 -0
- package/components/wd-ad/index.wxss +3 -0
- package/components/wd-audio/index.js +273 -0
- package/components/wd-audio/index.json +5 -0
- package/components/wd-audio/index.wxml +3 -0
- package/components/wd-button/index.js +284 -0
- package/components/wd-button/index.json +7 -0
- package/components/wd-button/index.wxml +32 -0
- package/components/wd-button/index.wxss +2 -0
- package/components/wd-button/wd-button.wxss +513 -0
- package/components/wd-calendar/arrowright--line.svg +3 -0
- package/components/wd-calendar/index.js +157 -0
- package/components/wd-calendar/index.json +5 -0
- package/components/wd-calendar/index.wxml +36 -0
- package/components/wd-calendar/index.wxss +203 -0
- package/components/wd-calendar/weeks.js +41 -0
- package/components/wd-canvas/index.js +250 -0
- package/components/wd-canvas/index.json +5 -0
- package/components/wd-canvas/index.wxml +2 -0
- package/components/wd-canvas/index.wxss +0 -0
- package/components/wd-card/index.js +76 -0
- package/components/wd-card/index.json +5 -0
- package/components/wd-card/index.wxml +11 -0
- package/components/wd-card/index.wxss +6 -0
- package/components/wd-card/wd-card.wxss +120 -0
- package/components/wd-cascader/index.js +201 -0
- package/components/wd-cascader/index.json +12 -0
- package/components/wd-cascader/index.wxml +59 -0
- package/components/wd-cascader/index.wxss +2 -0
- package/components/wd-cascader/utils.js +73 -0
- package/components/wd-cascader/wd-cascader.wxss +284 -0
- package/components/wd-checkbox-list/index.js +170 -0
- package/components/wd-checkbox-list/index.json +7 -0
- package/components/wd-checkbox-list/index.wxml +37 -0
- package/components/wd-checkbox-list/index.wxss +2 -0
- package/components/wd-checkbox-list/wd-checkbox-list.wxss +259 -0
- package/components/wd-date/calendar/index.js +111 -0
- package/components/wd-date/calendar/index.json +7 -0
- package/components/wd-date/calendar/index.wxml +38 -0
- package/components/wd-date/date-picker/index.js +101 -0
- package/components/wd-date/date-picker/index.json +9 -0
- package/components/wd-date/date-picker/index.wxml +41 -0
- package/components/wd-date/date-picker/index.wxss +7 -0
- package/components/wd-date/index.js +129 -0
- package/components/wd-date/index.json +10 -0
- package/components/wd-date/index.wxml +36 -0
- package/components/wd-date/index.wxss +9 -0
- package/components/wd-date/modal/index.js +31 -0
- package/components/wd-date/modal/index.json +5 -0
- package/components/wd-date/modal/index.wxml +14 -0
- package/components/wd-date/modal/index.wxss +3 -0
- package/components/wd-date/time-picker/index.js +202 -0
- package/components/wd-date/time-picker/index.json +5 -0
- package/components/wd-date/time-picker/index.wxml +13 -0
- package/components/wd-date/time-picker/index.wxss +9 -0
- package/components/wd-date/wd-date.wxss +5 -0
- package/components/wd-date/year-month-picker/index.js +128 -0
- package/components/wd-date/year-month-picker/index.json +5 -0
- package/components/wd-date/year-month-picker/index.wxml +8 -0
- package/components/wd-date/year-month-picker/index.wxss +9 -0
- package/components/wd-date-range/index.js +172 -0
- package/components/wd-date-range/index.json +10 -0
- package/components/wd-date-range/index.wxml +41 -0
- package/components/wd-date-range/index.wxss +9 -0
- package/components/wd-date-range/wd-date-range.wxss +5 -0
- package/components/wd-divider/index.js +46 -0
- package/components/wd-divider/index.json +5 -0
- package/components/wd-divider/index.wxml +1 -0
- package/components/wd-divider/index.wxss +2 -0
- package/components/wd-divider/wd-divider.wxss +32 -0
- package/components/wd-form/form-utils.js +59 -0
- package/components/wd-form/index.js +769 -0
- package/components/wd-form/index.json +5 -0
- package/components/wd-form/index.wxml +15 -0
- package/components/wd-form/index.wxss +38 -0
- package/components/wd-form/remote-value.js +76 -0
- package/components/wd-form/wd-form.wxss +1113 -0
- package/components/wd-form-arr/index.js +348 -0
- package/components/wd-form-arr/index.json +7 -0
- package/components/wd-form-arr/index.wxml +5 -0
- package/components/wd-form-arr/index.wxss +2 -0
- package/components/wd-form-arr/wd-form-obj.wxss +104 -0
- package/components/wd-form-item/index.js +106 -0
- package/components/wd-form-item/index.json +7 -0
- package/components/wd-form-item/index.wxml +47 -0
- package/components/wd-form-item/index.wxss +2 -0
- package/components/wd-form-item/wd-form-item.wxss +1113 -0
- package/components/wd-form-item-obj/index.js +113 -0
- package/components/wd-form-item-obj/index.json +8 -0
- package/components/wd-form-item-obj/index.wxml +51 -0
- package/components/wd-form-item-obj/index.wxss +2 -0
- package/components/wd-form-item-obj/wd-form-item.wxss +1113 -0
- package/components/wd-form-item-read-only/index.js +59 -0
- package/components/wd-form-item-read-only/index.json +5 -0
- package/components/wd-form-item-read-only/index.wxml +10 -0
- package/components/wd-form-obj/index.js +305 -0
- package/components/wd-form-obj/index.json +7 -0
- package/components/wd-form-obj/index.wxml +5 -0
- package/components/wd-form-obj/index.wxss +2 -0
- package/components/wd-form-obj/wd-form-obj.wxss +104 -0
- package/components/wd-icon/index.js +148 -0
- package/components/wd-icon/index.json +7 -0
- package/components/wd-icon/index.wxml +4 -0
- package/components/wd-icon/index.wxss +4 -0
- package/components/wd-icon/wd-icon.wxss +154 -0
- package/components/wd-image/index.js +244 -0
- package/components/wd-image/index.json +7 -0
- package/components/wd-image/index.wxml +11 -0
- package/components/wd-image/index.wxss +11 -0
- package/components/wd-image/wd-image.wxss +86 -0
- package/components/wd-input/index.js +62 -0
- package/components/wd-input/index.json +7 -0
- package/components/wd-input/index.wxml +58 -0
- package/components/wd-input/inner-input/index.js +210 -0
- package/components/wd-input/inner-input/index.json +9 -0
- package/components/wd-input/inner-input/index.wxml +79 -0
- package/components/wd-input/inner-input/index.wxss +2 -0
- package/components/wd-input/inner-input/wd-input.wxss +1599 -0
- package/components/wd-input-email/index.js +63 -0
- package/components/wd-input-email/index.json +7 -0
- package/components/wd-input-email/index.wxml +56 -0
- package/components/wd-input-group/index.js +65 -0
- package/components/wd-input-group/index.json +5 -0
- package/components/wd-input-group/index.wxml +16 -0
- package/components/wd-input-group/index.wxss +2 -0
- package/components/wd-input-group/wd-input-group.wxss +105 -0
- package/components/wd-input-number/index.js +595 -0
- package/components/wd-input-number/index.json +10 -0
- package/components/wd-input-number/index.wxml +66 -0
- package/components/wd-input-number/index.wxss +8 -0
- package/components/wd-input-number/number.js +309 -0
- package/components/wd-input-number/wd-input-number.wxss +249 -0
- package/components/wd-input-phone/index.js +83 -0
- package/components/wd-input-phone/index.json +7 -0
- package/components/wd-input-phone/index.wxml +56 -0
- package/components/wd-input-url/index.js +63 -0
- package/components/wd-input-url/index.json +7 -0
- package/components/wd-input-url/index.wxml +56 -0
- package/components/wd-input-wrap/index.js +112 -0
- package/components/wd-input-wrap/index.json +7 -0
- package/components/wd-input-wrap/index.wxml +32 -0
- package/components/wd-input-wrap/index.wxss +2 -0
- package/components/wd-input-wrap/wd-input-wrap.wxss +229 -0
- package/components/wd-layout/index.js +41 -0
- package/components/wd-layout/index.json +5 -0
- package/components/wd-layout/index.wxml +13 -0
- package/components/wd-layout/index.wxss +2 -0
- package/components/wd-layout/wd-layout.wxss +84 -0
- package/components/wd-location/index.js +57 -0
- package/components/wd-location/index.json +10 -0
- package/components/wd-location/index.wxml +49 -0
- package/components/wd-markdown/index.js +99 -0
- package/components/wd-markdown/index.json +7 -0
- package/components/wd-markdown/index.wxml +3 -0
- package/components/wd-markdown/index.wxss +128 -0
- package/components/wd-markdown/utils/highlight.min.js +1 -0
- package/components/wd-markdown/utils/hljs_css.min.js +1 -0
- package/components/wd-markdown/utils/hljs_javascript.min.js +1 -0
- package/components/wd-markdown/utils/markdown-it.min.js +3 -0
- package/components/wd-menu-base-layout/index.js +20 -0
- package/components/wd-menu-base-layout/index.json +5 -0
- package/components/wd-menu-base-layout/index.wxml +3 -0
- package/components/wd-menu-horizontal-layout/index.js +20 -0
- package/components/wd-menu-horizontal-layout/index.json +5 -0
- package/components/wd-menu-horizontal-layout/index.wxml +3 -0
- package/components/wd-menu-layout/index.js +73 -0
- package/components/wd-menu-layout/index.json +8 -0
- package/components/wd-menu-layout/index.wxml +69 -0
- package/components/wd-menu-layout/index.wxss +13 -0
- package/components/wd-menu-layout/utils/index.js +40 -0
- package/components/wd-menu-layout/wd-menu-layout.wxss +647 -0
- package/components/wd-menu-list/index.js +256 -0
- package/components/wd-menu-list/index.json +7 -0
- package/components/wd-menu-list/index.wxml +50 -0
- package/components/wd-menu-list/index.wxss +146 -0
- package/components/wd-menu-list/wd-menu-list.wxss +636 -0
- package/components/wd-menu-nav-layout/index.js +20 -0
- package/components/wd-menu-nav-layout/index.json +5 -0
- package/components/wd-menu-nav-layout/index.wxml +3 -0
- package/components/wd-menu-nav-tab-layout/index.js +20 -0
- package/components/wd-menu-nav-tab-layout/index.json +5 -0
- package/components/wd-menu-nav-tab-layout/index.wxml +3 -0
- package/components/wd-menu-plant-layout/index.js +20 -0
- package/components/wd-menu-plant-layout/index.json +5 -0
- package/components/wd-menu-plant-layout/index.wxml +3 -0
- package/components/wd-menu-tab-layout/index.js +20 -0
- package/components/wd-menu-tab-layout/index.json +5 -0
- package/components/wd-menu-tab-layout/index.wxml +3 -0
- package/components/wd-menu-vertical-layout/index.js +20 -0
- package/components/wd-menu-vertical-layout/index.json +5 -0
- package/components/wd-menu-vertical-layout/index.wxml +3 -0
- package/components/wd-modal/index.js +184 -0
- package/components/wd-modal/index.json +5 -0
- package/components/wd-modal/index.wxml +16 -0
- package/components/wd-modal/index.wxss +2 -0
- package/components/wd-modal/wd-modal.wxss +213 -0
- package/components/wd-official-account/index.js +28 -0
- package/components/wd-official-account/index.json +5 -0
- package/components/wd-official-account/index.wxml +1 -0
- package/components/wd-official-account/index.wxss +4 -0
- package/components/wd-progress/index.js +134 -0
- package/components/wd-progress/index.json +7 -0
- package/components/wd-progress/index.wxml +32 -0
- package/components/wd-progress/index.wxss +2 -0
- package/components/wd-progress/wd-progress.wxss +1148 -0
- package/components/wd-radio-list/index.js +157 -0
- package/components/wd-radio-list/index.json +7 -0
- package/components/wd-radio-list/index.wxml +37 -0
- package/components/wd-radio-list/index.wxss +2 -0
- package/components/wd-radio-list/wd-radio-list.wxss +187 -0
- package/components/wd-rating/index.js +359 -0
- package/components/wd-rating/index.json +9 -0
- package/components/wd-rating/index.wxml +38 -0
- package/components/wd-rating/index.wxss +2 -0
- package/components/wd-rating/wd-rating.wxss +1138 -0
- package/components/wd-region/index.js +38 -0
- package/components/wd-region/index.json +10 -0
- package/components/wd-region/index.wxml +28 -0
- package/components/wd-region/index.wxss +4 -0
- package/components/wd-select/index.js +78 -0
- package/components/wd-select/index.json +10 -0
- package/components/wd-select/index.wxml +52 -0
- package/components/wd-select/select.wxss +749 -0
- package/components/wd-select-multiple/index.js +74 -0
- package/components/wd-select-multiple/index.json +10 -0
- package/components/wd-select-multiple/index.wxml +52 -0
- package/components/wd-side-tab/index.js +121 -0
- package/components/wd-side-tab/index.json +7 -0
- package/components/wd-side-tab/index.wxml +7 -0
- package/components/wd-side-tab/index.wxss +1 -0
- package/components/wd-switch/index.js +67 -0
- package/components/wd-switch/index.json +7 -0
- package/components/wd-switch/index.wxml +28 -0
- package/components/wd-switch/index.wxss +2 -0
- package/components/wd-switch/wd-switch.wxss +1234 -0
- package/components/wd-tabbar/index.js +196 -0
- package/components/wd-tabbar/index.json +7 -0
- package/components/wd-tabbar/index.wxml +10 -0
- package/components/wd-tabbar/index.wxss +2 -0
- package/components/wd-tabbar/wd-tabbar.wxss +96 -0
- package/components/wd-tabs/index.js +62 -0
- package/components/wd-tabs/index.json +5 -0
- package/components/wd-tabs/index.wxml +34 -0
- package/components/wd-tabs/index.wxss +8 -0
- package/components/wd-tabs/wd-tabs.wxss +278 -0
- package/components/wd-tag/index.js +171 -0
- package/components/wd-tag/index.json +7 -0
- package/components/wd-tag/index.wxml +22 -0
- package/components/wd-tag/index.wxss +3 -0
- package/components/wd-tag/tag-behavior.js +57 -0
- package/components/wd-tag/tag-item/index.js +198 -0
- package/components/wd-tag/tag-item/index.json +7 -0
- package/components/wd-tag/tag-item/index.wxml +15 -0
- package/components/wd-tag/wd-tag.wxss +325 -0
- package/components/wd-tag-select/index.js +107 -0
- package/components/wd-tag-select/index.json +8 -0
- package/components/wd-tag-select/index.wxml +42 -0
- package/components/wd-tag-select/index.wxss +4 -0
- package/components/wd-tag-select/wd-tag-select.wxss +1275 -0
- package/components/wd-text/index.js +162 -0
- package/components/wd-text/index.json +5 -0
- package/components/wd-text/index.wxml +8 -0
- package/components/wd-text/index.wxss +2 -0
- package/components/wd-text/wd-text.wxss +261 -0
- package/components/wd-textarea/index.js +97 -0
- package/components/wd-textarea/index.json +7 -0
- package/components/wd-textarea/index.wxml +31 -0
- package/components/wd-textarea/index.wxss +7 -0
- package/components/wd-textarea/wd-textarea.wxss +98 -0
- package/components/wd-time/index.js +124 -0
- package/components/wd-time/index.json +11 -0
- package/components/wd-time/index.wxml +36 -0
- package/components/wd-time/index.wxss +9 -0
- package/components/wd-time/wd-time.wxss +5 -0
- package/components/wd-top-tab/index.js +121 -0
- package/components/wd-top-tab/index.json +7 -0
- package/components/wd-top-tab/index.wxml +6 -0
- package/components/wd-top-tab/index.wxss +5 -0
- package/components/wd-unified-link/index.js +115 -0
- package/components/wd-unified-link/index.json +5 -0
- package/components/wd-unified-link/index.wxml +3 -0
- package/components/wd-unified-link/index.wxss +2 -0
- package/components/wd-unified-link/wd-link.wxss +51 -0
- package/components/wd-upload-file/index.js +54 -0
- package/components/wd-upload-file/index.json +8 -0
- package/components/wd-upload-file/index.wxml +41 -0
- package/components/wd-upload-image/index.js +64 -0
- package/components/wd-upload-image/index.json +8 -0
- package/components/wd-upload-image/index.wxml +45 -0
- package/components/web-view/index.js +69 -0
- package/components/web-view/index.json +5 -0
- package/components/web-view/index.wxml +1 -0
- package/components/web-view/index.wxss +1 -0
- package/components/wedaVideo/index.js +183 -0
- package/components/wedaVideo/index.json +4 -0
- package/components/wedaVideo/index.wxml +29 -0
- package/components/wedaVideo/index.wxss +20 -0
- package/components/wxOpenApi/phone/index.js +122 -0
- package/components/wxOpenApi/phone/index.json +4 -0
- package/components/wxOpenApi/phone/index.wxml +4 -0
- package/components/wxOpenApi/phone/index.wxss +26 -0
- package/components/wxOpenApi/phoneCode/index.js +102 -0
- package/components/wxOpenApi/phoneCode/index.json +4 -0
- package/components/wxOpenApi/phoneCode/index.wxml +4 -0
- package/components/wxOpenApi/phoneCode/index.wxss +26 -0
- package/components/wxOpenApi/share/index.js +134 -0
- package/components/wxOpenApi/share/index.json +4 -0
- package/components/wxOpenApi/share/index.wxml +4 -0
- package/components/wxOpenApi/share/index.wxss +26 -0
- package/components/wxOpenApi/userInfo/index.js +97 -0
- package/components/wxOpenApi/userInfo/index.json +4 -0
- package/components/wxOpenApi/userInfo/index.wxml +4 -0
- package/components/wxOpenApi/userInfo/index.wxss +26 -0
- package/index.json +133 -0
- package/package.json +19 -0
- package/style/utils.wxss +167 -0
- package/style/wd-design.wxss +628 -0
- package/style/wd-font-icon.wxss +4656 -0
- package/style/weda-ui.wxss +475 -0
- package/style/wedatea2td.wxss +56 -0
- package/utils/classnames.js +39 -0
- package/utils/color.js +81 -0
- package/utils/common-behavior.js +1 -0
- package/utils/constant.js +132 -0
- package/utils/date.js +51 -0
- package/utils/dayjs.min.js +1 -0
- package/utils/debounce.js +134 -0
- package/utils/deepEqual.js +42 -0
- package/utils/destr.js +49 -0
- package/utils/dr_square_point.js +29 -0
- package/utils/enum.js +1268 -0
- package/utils/error.js +26 -0
- package/utils/getCustomInfo.js +34 -0
- package/utils/getFormLegacy.js +401 -0
- package/utils/getModelParams.js +149 -0
- package/utils/getWedaApi.js +1 -0
- package/utils/handleEvents.js +34 -0
- package/utils/lodash.js +65 -0
- package/utils/platform.js +162 -0
- package/utils/qqmap-wx-jssdk1.2/qqmap-wx-jssdk.js +1323 -0
- package/utils/qrcode/weapp.qrcode.min.js +911 -0
- package/utils/range.js +82 -0
- package/utils/tcb.js +177 -0
- package/utils/tool.js +74 -0
- package/utils/widget-api.js +28 -0
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
._a {
|
|
2
|
+
padding: 1.5px 0 1.5px 0;
|
|
3
|
+
color: #0052d9;
|
|
4
|
+
word-break: break-all;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
._hover {
|
|
8
|
+
text-decoration: underline;
|
|
9
|
+
opacity: 0.7;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
._img {
|
|
13
|
+
max-width: 100%;
|
|
14
|
+
-webkit-touch-callout: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
._b,
|
|
18
|
+
._strong {
|
|
19
|
+
font-weight: 700;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
._code {
|
|
23
|
+
font-family: monospace;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
._del {
|
|
27
|
+
text-decoration: line-through;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
._em,
|
|
31
|
+
._i {
|
|
32
|
+
font-style: italic;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
._h1 {
|
|
36
|
+
font-size: 2em;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
._h2 {
|
|
40
|
+
font-size: 1.5em;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
._h3 {
|
|
44
|
+
font-size: 1.17em;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
._h5 {
|
|
48
|
+
font-size: 0.83em;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
._h6 {
|
|
52
|
+
font-size: 0.67em;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
._h1,
|
|
56
|
+
._h2,
|
|
57
|
+
._h3,
|
|
58
|
+
._h4,
|
|
59
|
+
._h5,
|
|
60
|
+
._h6 {
|
|
61
|
+
display: block;
|
|
62
|
+
font-weight: 700;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
._ins {
|
|
66
|
+
text-decoration: underline;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
._li {
|
|
70
|
+
display: list-item;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
._ol {
|
|
74
|
+
list-style-type: decimal;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
._ol,
|
|
78
|
+
._ul {
|
|
79
|
+
display: block;
|
|
80
|
+
padding-left: 40px;
|
|
81
|
+
margin: 1em 0;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
._q::before {
|
|
85
|
+
content: '"';
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
._q::after {
|
|
89
|
+
content: '"';
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
._sub {
|
|
93
|
+
font-size: smaller;
|
|
94
|
+
vertical-align: sub;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
._sup {
|
|
98
|
+
font-size: smaller;
|
|
99
|
+
vertical-align: super;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
._tbody,
|
|
103
|
+
._tfoot,
|
|
104
|
+
._thead {
|
|
105
|
+
display: table-row-group;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
._tr {
|
|
109
|
+
display: table-row;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
._td,
|
|
113
|
+
._th {
|
|
114
|
+
display: table-cell;
|
|
115
|
+
vertical-align: middle;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
._th {
|
|
119
|
+
font-weight: 700;
|
|
120
|
+
text-align: center;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
._ul {
|
|
124
|
+
list-style-type: disc;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
._ul ._ul {
|
|
128
|
+
margin: 0;
|
|
129
|
+
list-style-type: circle;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
._ul ._ul ._ul {
|
|
133
|
+
list-style-type: square;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
._abbr,
|
|
137
|
+
._b,
|
|
138
|
+
._code,
|
|
139
|
+
._del,
|
|
140
|
+
._em,
|
|
141
|
+
._i,
|
|
142
|
+
._ins,
|
|
143
|
+
._label,
|
|
144
|
+
._q,
|
|
145
|
+
._span,
|
|
146
|
+
._strong,
|
|
147
|
+
._sub,
|
|
148
|
+
._sup {
|
|
149
|
+
display: inline;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
._blockquote,
|
|
153
|
+
._div,
|
|
154
|
+
._p {
|
|
155
|
+
display: block;
|
|
156
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
"use strict"; function t(t, e) { var s = "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"]; if (!s) { if (Array.isArray(t) || (s = i(t)) || e && t && "number" == typeof t.length) { s && (t = s); var n = 0, a = function () { }; return { s: a, n: function () { return n >= t.length ? { done: !0 } : { done: !1, value: t[n++] } }, e: function (t) { throw t }, f: a } } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.") } var r, o = !0, l = !1; return { s: function () { s = s.call(t) }, n: function () { var t = s.next(); return o = t.done, t }, e: function (t) { l = !0, r = t }, f: function () { try { o || null == s.return || s.return() } finally { if (l) throw r } } } } function i(t, i) { if (t) { if ("string" == typeof t) return e(t, i); var s = {}.toString.call(t).slice(8, -1); return "Object" === s && t.constructor && (s = t.constructor.name), "Map" === s || "Set" === s ? Array.from(t) : "Arguments" === s || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s) ? e(t, i) : void 0 } } function e(t, i) { (null == i || i > t.length) && (i = t.length); for (var e = 0, s = Array(i); e < i; e++)s[e] = t[e]; return s } function s(t) { for (var i = Object.create(null), e = t.split(","), s = e.length; s--;)i[e[s]] = !0; return i } function n(t, i) { for (var e = t.indexOf("&"); -1 !== e;) { var s = t.indexOf(";", e + 3), n = void 0; if (-1 === s) break; "#" === t[e + 1] ? (n = parseInt(("x" === t[e + 2] ? "0" : "") + t.substring(e + 2, s)), isNaN(n) || (t = t.substr(0, e) + String.fromCharCode(n) + t.substr(s + 1))) : (n = t.substring(e + 1, s), (l.entities[n] || "amp" === n && i) && (t = t.substr(0, e) + (l.entities[n] || "&") + t.substr(s + 1))), e = t.indexOf("&", e + 1) } return t } function a(t) { for (var i = t.length - 1, e = i; e >= -1; e--)(-1 === e || t[e].c || !t[e].name || "div" !== t[e].name && "p" !== t[e].name && "h" !== t[e].name[0] || (t[e].attrs.style || "").includes("inline")) && (i - e >= 5 && t.splice(e + 1, i - e, { name: "div", attrs: {}, children: t.slice(e + 1, i + 1) }), i = e - 1) } function r(t) { this.options = t.data || {}, this.tagStyle = Object.assign({}, l.tagStyle, this.options.tagStyle), this.imgList = t.imgList || [], this.imgList._unloadimgs = 0, this.plugins = t.plugins || [], this.attrs = Object.create(null), this.stack = [], this.nodes = [], this.pre = (this.options.containerStyle || "").includes("white-space") && this.options.containerStyle.includes("pre") ? 2 : 0 } function o(t) { this.handler = t } var l = { trustTags: s("a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,ruby,rt,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video"), blockTags: s("address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section"), ignoreTags: s("area,base,canvas,embed,frame,head,iframe,input,link,map,meta,param,rp,script,source,style,textarea,title,track,wbr"), voidTags: s("area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr"), entities: { lt: "<", gt: ">", quot: '"', apos: "'", ensp: " ", emsp: " ", nbsp: " ", semi: ";", ndash: "–", mdash: "—", middot: "·", lsquo: "‘", rsquo: "’", ldquo: "“", rdquo: "”", bull: "•", hellip: "…", larr: "←", uarr: "↑", rarr: "→", darr: "↓" }, tagStyle: { address: "font-style:italic", big: "display:inline;font-size:1.2em", caption: "display:table-caption;text-align:center", center: "text-align:center", cite: "font-style:italic", dd: "margin-left:40px", mark: "background-color:yellow", pre: "font-family:monospace;white-space:pre", s: "text-decoration:line-through", small: "display:inline;font-size:0.8em", strike: "text-decoration:line-through", u: "text-decoration:underline" }, svgDict: { animatetransform: "animateTransform", lineargradient: "linearGradient", viewbox: "viewBox", attributename: "attributeName", repeatcount: "repeatCount", repeatdur: "repeatDur", foreignobject: "foreignObject" } }, h = {}, c = wx.getSystemInfoSync(), d = c.windowWidth, p = c.system, u = s(" ,\r,\n,\t,\f"), f = 0; r.prototype.parse = function (t) { for (var i = this.plugins.length; i--;)this.plugins[i].onUpdate && (t = this.plugins[i].onUpdate(t, l) || t); for (new o(this).parse(t); this.stack.length;)this.popNode(); return this.nodes.length > 50 && a(this.nodes), this.nodes }, r.prototype.expose = function () { for (var t = this.stack.length; t--;) { var i = this.stack[t]; if (i.c || "a" === i.name || "video" === i.name || "audio" === i.name) return; i.c = 1 } }, r.prototype.hook = function (t) { for (var i = this.plugins.length; i--;)if (this.plugins[i].onParse && !1 === this.plugins[i].onParse(t, this)) return !1; return !0 }, r.prototype.getUrl = function (t) { var i = this.options.domain; return "/" === t[0] ? "/" === t[1] ? t = (i ? i.split("://")[0] : "http") + ":" + t : i && (t = i + t) : !i || t.includes("data:") || t.includes("://") || (t = i + "/" + t), t }, r.prototype.parseStyle = function (t) { var i = t.attrs, e = (this.tagStyle[t.name] || "").split(";").concat((i.style || "").split(";")), s = {}, n = ""; i.id && !this.xml && (this.options.useAnchor ? this.expose() : "img" !== t.name && "a" !== t.name && "video" !== t.name && "audio" !== t.name && (i.id = void 0)), i.width && (s.width = parseFloat(i.width) + (i.width.includes("%") ? "%" : "px"), i.width = void 0), i.height && (s.height = parseFloat(i.height) + (i.height.includes("%") ? "%" : "px"), i.height = void 0); for (var a = 0, r = e.length; a < r; a++) { var o = e[a].split(":"); if (!(o.length < 2)) { var l = o.shift().trim().toLowerCase(), h = o.join(":").trim(); if ("-" === h[0] && h.lastIndexOf("-") > 0 || h.includes("safe")) n += ";".concat(l, ":").concat(h); else if (!s[l] || h.includes("import") || !s[l].includes("import")) { if (h.includes("url")) { var c = h.indexOf("(") + 1; if (c) { for (; '"' === h[c] || "'" === h[c] || u[h[c]];)c++; h = h.substr(0, c) + this.getUrl(h.substr(c)) } } else h.includes("rpx") && (h = h.replace(/[0-9.]+\s*rpx/g, function (t) { return parseFloat(t) * d / 750 + "px" })); s[l] = h } } } return t.attrs.style = n, s }, r.prototype.onTagName = function (t) { this.tagName = this.xml ? t : t.toLowerCase(), "svg" === this.tagName && (this.xml = (this.xml || 0) + 1, l.ignoreTags.style = void 0) }, r.prototype.onAttrName = function (t) { t = this.xml ? t : t.toLowerCase(), "data-" === t.substr(0, 5) ? "data-src" !== t || this.attrs.src ? "img" === this.tagName || "a" === this.tagName ? this.attrName = t : this.attrName = void 0 : this.attrName = "src" : (this.attrName = t, this.attrs[t] = "T") }, r.prototype.onAttrVal = function (t) { var i = this.attrName || ""; "style" === i || "href" === i ? this.attrs[i] = n(t, !0) : i.includes("src") ? this.attrs[i] = this.getUrl(n(t, !0)) : i && (this.attrs[i] = t) }, r.prototype.onOpenTag = function (t) { var i = Object.create(null); i.name = this.tagName, i.attrs = this.attrs, this.attrs = Object.create(null); var e = i.attrs, s = this.stack[this.stack.length - 1], n = s ? s.children : this.nodes, a = this.xml ? t : l.voidTags[i.name]; if (h[i.name] && (e.class = h[i.name] + (e.class ? " " + e.class : "")), "embed" === i.name) { var r = e.src || ""; r.includes(".mp4") || r.includes(".3gp") || r.includes(".m3u8") || (e.type || "").includes("video") ? i.name = "video" : (r.includes(".mp3") || r.includes(".wav") || r.includes(".aac") || r.includes(".m4a") || (e.type || "").includes("audio")) && (i.name = "audio"), e.autostart && (e.autoplay = "T"), e.controls = "T" } if ("video" !== i.name && "audio" !== i.name || ("video" !== i.name || e.id || (e.id = "v" + f++), e.controls || e.autoplay || (e.controls = "T"), i.src = [], e.src && (i.src.push(e.src), e.src = void 0), this.expose()), a) { if (!this.hook(i) || l.ignoreTags[i.name]) return void ("base" !== i.name || this.options.domain ? "source" === i.name && s && ("video" === s.name || "audio" === s.name) && e.src && s.src.push(e.src) : this.options.domain = e.href); var o = this.parseStyle(i); if ("img" === i.name) { if (e.src && (e.src.includes("webp") && (i.webp = "T"), e.src.includes("data:") && "all" !== this.options.previewImg && !e["original-src"] && (e.ignore = "T"), !e.ignore || i.webp || e.src.includes("cloud://"))) { for (var c = this.stack.length; c--;) { var p = this.stack[c]; "table" !== p.name || i.webp || e.src.includes("cloud://") || (!o.display || o.display.includes("inline") ? i.t = "inline-block" : i.t = o.display, o.display = void 0); var u = p.attrs.style || ""; if (!u.includes("flex:") || u.includes("flex:0") || u.includes("flex: 0") || o.width && !(parseInt(o.width) > 100)) if (u.includes("flex") && "100%" === o.width) for (var g = c + 1; g < this.stack.length; g++) { var m = this.stack[g].attrs.style || ""; if (!m.includes(";width") && !m.includes(" width") && 0 !== m.indexOf("width")) { o.width = ""; break } } else u.includes("inline-block") && (o.width && "%" === o.width[o.width.length - 1] ? (p.attrs.style += ";max-width:" + o.width, o.width = "") : p.attrs.style += ";max-width:100%"); else { o.width = "100% !important", o.height = ""; for (var v = c + 1; v < this.stack.length; v++)this.stack[v].attrs.style = (this.stack[v].attrs.style || "").replace("inline-", "") } "a" === p.name ? i.a = p.attrs : p.c = 1 } i.i = this.imgList.length; var y = e["original-src"] || e.src; if (this.imgList.includes(y)) { var b = y.indexOf("://"); if (-1 !== b) { b += 3; for (var x = y.substr(0, b); b < y.length && "/" !== y[b]; b++)x += Math.random() > .5 ? y[b].toUpperCase() : y[b]; x += y.substr(b), y = x } } this.imgList.push(y), i.t || (this.imgList._unloadimgs += 1) } "inline" === o.display && (o.display = ""), e.ignore && (o["max-width"] = o["max-width"] || "100%", e.style += ";-webkit-touch-callout:none"), parseInt(o.width) > d && (o.height = void 0), isNaN(parseInt(o.width)) || (i.w = "T"), !isNaN(parseInt(o.height)) && (!o.height.includes("%") || s && (s.attrs.style || "").includes("height")) && (i.h = "T"), i.w && i.h && o["object-fit"] && ("contain" === o["object-fit"] ? i.m = "aspectFit" : "cover" === o["object-fit"] && (i.m = "aspectFill")) } else if ("svg" === i.name) return n.push(i), this.stack.push(i), void this.popNode(); for (var w in o) o[w] && (e.style += ";".concat(w, ":").concat(o[w].replace(" !important", ""))); e.style = e.style.substr(1) || void 0 } else ("pre" === i.name || (e.style || "").includes("white-space") && e.style.includes("pre")) && 2 !== this.pre && (this.pre = i.pre = 1), i.children = [], this.stack.push(i); n.push(i) }, r.prototype.onCloseTag = function (t) { t = this.xml ? t : t.toLowerCase(); var i; for (i = this.stack.length; i-- && this.stack[i].name !== t;); if (-1 !== i) for (; this.stack.length > i;)this.popNode(); else if ("p" === t || "br" === t) { var e = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes; e.push({ name: t, attrs: { class: h[t], style: this.tagStyle[t] } }) } }, r.prototype.popNode = function () { var i = this.stack.pop(), e = i.attrs, s = i.children, n = this.stack[this.stack.length - 1], r = n ? n.children : this.nodes; if (!this.hook(i) || l.ignoreTags[i.name]) return "title" === i.name && s.length && "text" === s[0].type && this.options.setTitle && wx.setNavigationBarTitle({ title: s[0].text }), void r.pop(); if (i.pre && 2 !== this.pre) { this.pre = i.pre = void 0; for (var o = this.stack.length; o--;)this.stack[o].pre && (this.pre = 1) } if ("svg" === i.name) { if (this.xml > 1) return void this.xml--; var h = "", c = e.style; return e.style = "", e.xmlns = "http://www.w3.org/2000/svg", function i(e) { if ("text" === e.type) return void (h += e.text); var s = l.svgDict[e.name] || e.name; if ("foreignObject" === s) { var n, a = t(e.children || []); try { for (a.s(); !(n = a.n()).done;) { var r = n.value; if (r.attrs && !r.attrs.xmlns) { r.attrs.xmlns = "http://www.w3.org/1999/xhtml"; break } } } catch (t) { a.e(t) } finally { a.f() } } h += "<" + s; for (var o in e.attrs) { var c = e.attrs[o]; c && (h += " ".concat(l.svgDict[o] || o, '="').concat(c.replace(/"/g, ""), '"')) } if (e.children) { h += ">"; for (var d = 0; d < e.children.length; d++)i(e.children[d]); h += "</" + s + ">" } else h += "/>" }(i), i.name = "img", i.attrs = { src: "data:image/svg+xml;utf8," + h.replace(/#/g, "%23"), style: c, ignore: "T" }, i.children = void 0, this.xml = !1, void (l.ignoreTags.style = !0) } var p = {}; if (e.align && ("table" === i.name ? "center" === e.align ? p["margin-inline-start"] = p["margin-inline-end"] = "auto" : p.float = e.align : p["text-align"] = e.align, e.align = void 0), e.dir && (p.direction = e.dir, e.dir = void 0), "font" === i.name && (e.color && (p.color = e.color, e.color = void 0), e.face && (p["font-family"] = e.face, e.face = void 0), e.size)) { var u = parseInt(e.size); isNaN(u) || (u < 1 ? u = 1 : u > 7 && (u = 7), p["font-size"] = ["x-small", "small", "medium", "large", "x-large", "xx-large", "xxx-large"][u - 1]), e.size = void 0 } if ((e.class || "").includes("align-center") && (p["text-align"] = "center"), Object.assign(p, this.parseStyle(i)), "table" !== i.name && parseInt(p.width) > d && (p["max-width"] = "100%", p["box-sizing"] = "border-box"), l.blockTags[i.name]) i.name = "div"; else if (l.trustTags[i.name] || this.xml) if ("a" === i.name || "ad" === i.name) this.expose(); else if ("video" === i.name || "audio" === i.name) (p.height || "").includes("auto") && (p.height = void 0), i.children = void 0; else if ("ul" !== i.name && "ol" !== i.name || !i.c) if ("table" === i.name) { var f = parseFloat(e.cellpadding), g = parseFloat(e.cellspacing), m = parseFloat(e.border), v = p["border-color"], y = p["border-style"]; if (i.c && (isNaN(f) && (f = 2), isNaN(g) && (g = 2)), m && (e.style += ";border:".concat(m, "px ").concat(y || "solid", " ").concat(v || "gray")), i.flag && i.c) { i.flag = void 0, p.display = "grid", "collapse" === p["border-collapse"] && (p["border-collapse"] = void 0, g = 0), g ? (p["grid-gap"] = g + "px", p.padding = g + "px") : m && (e.style += ";border-left:0;border-top:0"); var b = [], x = [], w = [], k = {}; !function i(e) { for (var s = 0; s < e.length; s++)if ("tr" === e[s].name) x.push(e[s]); else if ("colgroup" === e[s].name) { var n, a = 1, r = t(e[s].children || []); try { for (r.s(); !(n = r.n()).done;) { var o = n.value; if ("col" === o.name) { var l = o.attrs.style || "", h = l.indexOf("width") ? l.indexOf(";width") : 0; if (-1 !== h) { var c = l.indexOf(";", h + 6); -1 === c && (c = l.length), b[a] = l.substring(h ? h + 7 : 6, c) } a += 1 } } } catch (t) { r.e(t) } finally { r.f() } } else i(e[s].children || []) }(s); for (var N = 1; N <= x.length; N++) { for (var T = 1, O = 0; O < x[N - 1].children.length; O++) { var j = x[N - 1].children[O]; if ("td" === j.name || "th" === j.name) { for (; k[N + "." + T];)T++; j.c = 1; var S = j.attrs.style || "", C = S.indexOf("width") ? S.indexOf(";width") : 0; if (-1 !== C) { var I = S.indexOf(";", C + 6); -1 === I && (I = S.length), j.attrs.colspan || (b[T] = S.substring(C ? C + 7 : 6, I)), S = S.substr(0, C) + S.substr(I) } if (S += ";display:flex;flex-direction:column", -1 !== (C = S.indexOf("vertical-align"))) { var A = S.substr(C + 15, 10); A.includes("middle") ? S += ";justify-content:center" : A.includes("bottom") && (S += ";justify-content:flex-end") } else S += ";justify-content:center"; if (-1 !== (C = S.indexOf("text-align"))) { var L = S.substr(C + 11, 10); L.includes("center") ? S += ";justify-content: center" : L.includes("right") && (S += ";justify-content: right") } if (S = (m ? ";border:".concat(m, "px ").concat(y || "solid", " ").concat(v || "gray") + (g ? "" : ";border-right:0;border-bottom:0") : "") + (f ? ";padding:".concat(f, "px") : "") + ";" + S, j.attrs.colspan && (S += ";grid-column-start:".concat(T, ";grid-column-end:").concat(T + parseInt(j.attrs.colspan)), j.attrs.rowspan || (S += ";grid-row-start:".concat(N, ";grid-row-end:").concat(N + 1)), T += parseInt(j.attrs.colspan) - 1), j.attrs.rowspan) { S += ";grid-row-start:".concat(N, ";grid-row-end:").concat(N + parseInt(j.attrs.rowspan)), j.attrs.colspan || (S += ";grid-column-start:".concat(T, ";grid-column-end:").concat(T + 1)); for (var z = 1; z < j.attrs.rowspan; z++)for (var F = 0; F < (j.attrs.colspan || 1); F++)k[N + z + "." + (T - F)] = 1 } S && (j.attrs.style = S), w.push(j), T++ } } if (1 === N) { for (var U = "", q = 1; q < T; q++)U += (b[q] ? b[q] : "auto") + " "; p["grid-template-columns"] = U } } i.children = w } else i.c && (p.display = "table"), isNaN(g) || (p["border-spacing"] = g + "px"), (m || f || i.c) && function t(e) { for (var s = 0; s < e.length; s++) { var n = e[s]; i.c && (n.c = 1), "th" === n.name || "td" === n.name ? (m && (n.attrs.style = "border:".concat(m, "px ").concat(y || "solid", " ").concat(v || "gray", ";").concat(n.attrs.style || "")), f && (n.attrs.style = "padding:".concat(f, "px;").concat(n.attrs.style || ""))) : n.children && t(n.children) } }(s); if (this.options.scrollTable && !(e.style || "").includes("inline")) { var V = Object.assign({}, i); i.name = "div", i.attrs = { style: "overflow-x:auto;padding:1px" }, i.children = [V], e = V.attrs } } else if (("tbody" === i.name || "tr" === i.name) && i.flag && i.c) i.flag = void 0, function t(i) { for (var e = 0; e < i.length; e++)if ("td" === i[e].name) for (var s = 0, n = ["color", "background", "background-color"]; s < n.length; s++) { var a = n[s]; p[a] && (i[e].attrs.style = a + ":" + p[a] + ";" + (i[e].attrs.style || "")) } else t(i[e].children || []) }(s); else if ("td" !== i.name && "th" !== i.name || !e.colspan && !e.rowspan) { if ("ruby" === i.name) { i.name = "span"; for (var D = 0; D < s.length - 1; D++)"text" === s[D].type && "rt" === s[D + 1].name && (s[D] = { name: "span", attrs: { style: "display:inline-block;text-align:center" }, children: [{ name: "div", attrs: { style: "font-size:50%;" + (s[D + 1].attrs.style || "") }, children: s[D + 1].children }, s[D]] }, s.splice(D + 1, 1)) } } else for (var B = this.stack.length; B--;)"table" !== this.stack[B].name && "tbody" !== this.stack[B].name && "tr" !== this.stack[B].name || (this.stack[B].flag = 1); else { var M = { a: "lower-alpha", A: "upper-alpha", i: "lower-roman", I: "upper-roman" }; M[e.type] && (e.style += ";list-style-type:" + M[e.type], e.type = void 0), i.c = 1; for (var P = s.length; P--;)"li" === s[P].name && (s[P].c = 1) } else i.name = "span"; if ((p.display || "").includes("flex") && !i.c) for (var Z = s.length; Z--;) { var _ = s[Z]; _.f && (_.attrs.style = (_.attrs.style || "") + _.f, _.f = void 0) } var E = n && ((n.attrs.style || "").includes("flex") || (n.attrs.style || "").includes("grid")) && !i.c && !(p.display || "").includes("inline"); E && (i.f = ";max-width:100%"), s.length >= 50 && i.c && !(p.display || "").includes("flex") && a(s); for (var G in p) if (p[G]) { var W = ";".concat(G, ":").concat(p[G].replace(" !important", "")); E && (G.includes("flex") && "flex-direction" !== G || "align-self" === G || G.includes("grid") || "-" === p[G][0] || G.includes("width") && W.includes("%")) ? (i.f += W, "width" === G && (e.style += ";width:100%")) : e.style += W } e.style = e.style.substr(1) || void 0 }, r.prototype.onText = function (t) { if (!this.pre) { for (var i, e = "", s = 0, a = t.length; s < a; s++)u[t[s]] ? (" " !== e[e.length - 1] && (e += " "), "\n" !== t[s] || i || (i = !0)) : e += t[s]; if (" " === e && i) return; t = e } var r = Object.create(null); if (r.type = "text", r.text = n(t), this.hook(r)) { "force" === this.options.selectable && p.includes("iOS") && !wx.canIUse("rich-text.user-select") && this.expose(); (this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes).push(r) } }, o.prototype.parse = function (t) { this.content = t || "", this.i = 0, this.start = 0, this.state = this.text; for (var i = this.content.length; -1 !== this.i && this.i < i;)this.state() }, o.prototype.checkClose = function (t) { var i = "/" === this.content[this.i]; return !!(">" === this.content[this.i] || i && ">" === this.content[this.i + 1]) && (t && this.handler[t](this.content.substring(this.start, this.i)), this.i += i ? 2 : 1, this.start = this.i, this.handler.onOpenTag(i), "script" === this.handler.tagName ? (this.i = this.content.indexOf("</", this.i), -1 !== this.i && (this.i += 2, this.start = this.i), this.state = this.endTag) : this.state = this.text, !0) }, o.prototype.text = function () { if (this.i = this.content.indexOf("<", this.i), -1 === this.i) return void (this.start < this.content.length && this.handler.onText(this.content.substring(this.start, this.content.length))); var t = this.content[this.i + 1]; if (t >= "a" && t <= "z" || t >= "A" && t <= "Z") this.start !== this.i && this.handler.onText(this.content.substring(this.start, this.i)), this.start = ++this.i, this.state = this.tagName; else if ("/" === t || "!" === t || "?" === t) { this.start !== this.i && this.handler.onText(this.content.substring(this.start, this.i)); var i = this.content[this.i + 2]; if ("/" === t && (i >= "a" && i <= "z" || i >= "A" && i <= "Z")) return this.i += 2, this.start = this.i, void (this.state = this.endTag); var e = "--\x3e"; "!" === t && "-" === this.content[this.i + 2] && "-" === this.content[this.i + 3] || (e = ">"), this.i = this.content.indexOf(e, this.i), -1 !== this.i && (this.i += e.length, this.start = this.i) } else this.i++ }, o.prototype.tagName = function () { if (u[this.content[this.i]]) { for (this.handler.onTagName(this.content.substring(this.start, this.i)); u[this.content[++this.i]];); this.i < this.content.length && !this.checkClose() && (this.start = this.i, this.state = this.attrName) } else this.checkClose("onTagName") || this.i++ }, o.prototype.attrName = function () { var t = this.content[this.i]; if (u[t] || "=" === t) { this.handler.onAttrName(this.content.substring(this.start, this.i)); for (var i = "=" === t, e = this.content.length; ++this.i < e;)if (t = this.content[this.i], !u[t]) { if (this.checkClose()) return; if (i) return this.start = this.i, void (this.state = this.attrVal); if ("=" !== this.content[this.i]) return this.start = this.i, void (this.state = this.attrName); i = !0 } } else this.checkClose("onAttrName") || this.i++ }, o.prototype.attrVal = function () { var t = this.content[this.i], i = this.content.length; if ('"' === t || "'" === t) { if (this.start = ++this.i, this.i = this.content.indexOf(t, this.i), -1 === this.i) return; this.handler.onAttrVal(this.content.substring(this.start, this.i)) } else for (; this.i < i; this.i++) { if (u[this.content[this.i]]) { this.handler.onAttrVal(this.content.substring(this.start, this.i)); break } if (this.checkClose("onAttrVal")) return } for (; u[this.content[++this.i]];); this.i < i && !this.checkClose() && (this.start = this.i, this.state = this.attrName) }, o.prototype.endTag = function () { var t = this.content[this.i]; if (u[t] || ">" === t || "/" === t) { if (this.handler.onCloseTag(this.content.substring(this.start, this.i)), ">" !== t && (this.i = this.content.indexOf(">", this.i), -1 === this.i)) return; this.start = ++this.i, this.state = this.text } else this.i++ }, module.exports = r;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import handleEvents from '../../utils/handleEvents';
|
|
2
|
+
|
|
3
|
+
Component({
|
|
4
|
+
options: {
|
|
5
|
+
virtualHost: true,
|
|
6
|
+
},
|
|
7
|
+
properties: {
|
|
8
|
+
id: {
|
|
9
|
+
type: String,
|
|
10
|
+
value: '',
|
|
11
|
+
},
|
|
12
|
+
className: {
|
|
13
|
+
type: String,
|
|
14
|
+
value: '',
|
|
15
|
+
},
|
|
16
|
+
style: {
|
|
17
|
+
type: String,
|
|
18
|
+
value: '',
|
|
19
|
+
},
|
|
20
|
+
scrollY: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
value: true,
|
|
23
|
+
},
|
|
24
|
+
scrollX: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
value: false,
|
|
27
|
+
},
|
|
28
|
+
upperThreshold: {
|
|
29
|
+
type: Number,
|
|
30
|
+
value: 50,
|
|
31
|
+
},
|
|
32
|
+
lowerThreshold: {
|
|
33
|
+
type: Number,
|
|
34
|
+
value: 50,
|
|
35
|
+
},
|
|
36
|
+
scrollTop: {
|
|
37
|
+
type: Number,
|
|
38
|
+
},
|
|
39
|
+
scrollLeft: {
|
|
40
|
+
type: Number,
|
|
41
|
+
},
|
|
42
|
+
scrollIntoView: {
|
|
43
|
+
type: String,
|
|
44
|
+
},
|
|
45
|
+
scrollWithAnimation: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
value: false,
|
|
48
|
+
},
|
|
49
|
+
enableBackToTop: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
value: false,
|
|
52
|
+
},
|
|
53
|
+
enableFlex: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
value: false,
|
|
56
|
+
},
|
|
57
|
+
scrollAnchoring: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
value: false,
|
|
60
|
+
},
|
|
61
|
+
refresherEnabled: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
value: false,
|
|
64
|
+
},
|
|
65
|
+
refresherThreshold: {
|
|
66
|
+
type: Number,
|
|
67
|
+
value: 50,
|
|
68
|
+
},
|
|
69
|
+
refresherDefaultStyle: {
|
|
70
|
+
type: String,
|
|
71
|
+
value: 'block',
|
|
72
|
+
},
|
|
73
|
+
refresherBackground: {
|
|
74
|
+
type: String,
|
|
75
|
+
value: '#fff',
|
|
76
|
+
},
|
|
77
|
+
refresherTriggered: {
|
|
78
|
+
type: Boolean,
|
|
79
|
+
value: false,
|
|
80
|
+
},
|
|
81
|
+
enhanced: {
|
|
82
|
+
type: Boolean,
|
|
83
|
+
value: false,
|
|
84
|
+
},
|
|
85
|
+
bounces: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
value: true,
|
|
88
|
+
},
|
|
89
|
+
showScrollbar: {
|
|
90
|
+
type: Boolean,
|
|
91
|
+
value: true,
|
|
92
|
+
},
|
|
93
|
+
pagingEnabled: {
|
|
94
|
+
type: Boolean,
|
|
95
|
+
value: false,
|
|
96
|
+
},
|
|
97
|
+
fastDeceleration: {
|
|
98
|
+
type: Boolean,
|
|
99
|
+
value: false,
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
data: {
|
|
103
|
+
clientHeight: 0,
|
|
104
|
+
clientWidth: 0,
|
|
105
|
+
},
|
|
106
|
+
methods: {
|
|
107
|
+
getComponentClientHeight: function () {
|
|
108
|
+
const that = this;
|
|
109
|
+
const query = wx.createSelectorQuery().in(this);
|
|
110
|
+
query.select('.g-scroll-view').boundingClientRect();
|
|
111
|
+
query.exec((res) => {
|
|
112
|
+
that.setData({
|
|
113
|
+
clientHeight: res[0]?.height,
|
|
114
|
+
clientWidth: res[0]?.width,
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
},
|
|
118
|
+
scroll: function (event) {
|
|
119
|
+
const { clientHeight, clientWidth } = this.data;
|
|
120
|
+
const detail = { ...event.detail, clientHeight, clientWidth };
|
|
121
|
+
this.triggerEvent('scroll', detail);
|
|
122
|
+
},
|
|
123
|
+
...handleEvents([
|
|
124
|
+
// { name: 'scroll', title: '滚动时触发' },
|
|
125
|
+
{ name: 'scrolltolower', title: '滚动到底部/右边时触发' },
|
|
126
|
+
{ name: 'scrolltoupper', title: '滚动到顶部/左边时触发' },
|
|
127
|
+
{
|
|
128
|
+
name: 'dragstart',
|
|
129
|
+
title: '滑动开始事件(同时开启 enhanced 属性后生效)',
|
|
130
|
+
},
|
|
131
|
+
{ name: 'dragging', title: '滑动事件(同时开启 enhanced 属性后生效)' },
|
|
132
|
+
{ name: 'dragend', title: '滑动结束事件(同时开启 enhanced 属性后生效)' },
|
|
133
|
+
{ name: 'refresherpulling', title: '自定义下拉刷新控件被下拉' },
|
|
134
|
+
{ name: 'refresherrefresh', title: '自定义下拉刷新被触发' },
|
|
135
|
+
{ name: 'refresherrestore', title: '自定义下拉刷新被复位' },
|
|
136
|
+
{ name: 'refresherabort', title: '自定义下拉刷新被中止' },
|
|
137
|
+
]),
|
|
138
|
+
},
|
|
139
|
+
lifetimes: {
|
|
140
|
+
ready() {
|
|
141
|
+
this.getComponentClientHeight();
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<scroll-view
|
|
2
|
+
id="{{id}}"
|
|
3
|
+
class="weda-ui g-scroll-view {{className}}"
|
|
4
|
+
style="{{style}}"
|
|
5
|
+
scroll-x="{{scrollX}}"
|
|
6
|
+
scroll-y="{{scrollY}}"
|
|
7
|
+
upper-threshold="{{upperThreshold}}"
|
|
8
|
+
lower-threshold="{{lowerThreshold}}"
|
|
9
|
+
scroll-top="{{scrollTop}}"
|
|
10
|
+
scroll-left="{{scrollLeft}}"
|
|
11
|
+
scroll-into-view="{{scrollIntoView}}"
|
|
12
|
+
scroll-with-animation="{{scrollWithAnimation}}"
|
|
13
|
+
enable-back-to-top="{{enableBackToTop}}"
|
|
14
|
+
enable-flex="{{enableFlex}}"
|
|
15
|
+
scroll-anchoring="{{scrollAnchoring}}"
|
|
16
|
+
refresher-enabled="{{refresherEnabled}}"
|
|
17
|
+
refresher-threshold="{{refresherThreshold}}"
|
|
18
|
+
refresher-default-style="{{refresherDefaultStyle}}"
|
|
19
|
+
refresher-background="{{refresherBackground}}"
|
|
20
|
+
refresher-triggered="{{refresherTriggered}}"
|
|
21
|
+
enhanced="{{enhanced}}"
|
|
22
|
+
bounces="{{bounces}}"
|
|
23
|
+
show-scrollbar="{{showScrollbar}}"
|
|
24
|
+
paging-enabled="{{pagingEnabled}}"
|
|
25
|
+
fast-deceleration="{{fastDeceleration}}"
|
|
26
|
+
bindscroll="scroll"
|
|
27
|
+
bindscrolltolower="scrolltolower"
|
|
28
|
+
bindscrolltoupper="scrolltoupper"
|
|
29
|
+
binddragstart="dragstart"
|
|
30
|
+
binddragging="dragging"
|
|
31
|
+
binddragend="dragend"
|
|
32
|
+
bindrefresherpulling="refresherpulling"
|
|
33
|
+
bindrefresherrefresh="refresherrefresh"
|
|
34
|
+
bindrefresherrestore="refresherrestore"
|
|
35
|
+
bindrefresherabort="refresherabort"
|
|
36
|
+
>
|
|
37
|
+
<slot></slot>
|
|
38
|
+
</scroll-view>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { WD_PREFIX } from '../../utils/constant';
|
|
2
|
+
|
|
3
|
+
Component({
|
|
4
|
+
options: {
|
|
5
|
+
virtualHost: true,
|
|
6
|
+
},
|
|
7
|
+
properties: {
|
|
8
|
+
name: {
|
|
9
|
+
type: String,
|
|
10
|
+
value: '',
|
|
11
|
+
},
|
|
12
|
+
className: {
|
|
13
|
+
type: String,
|
|
14
|
+
value: '',
|
|
15
|
+
},
|
|
16
|
+
style: {
|
|
17
|
+
type: String,
|
|
18
|
+
value: '',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
data: {
|
|
22
|
+
classPrefix: WD_PREFIX,
|
|
23
|
+
},
|
|
24
|
+
methods: {},
|
|
25
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="6" height="10" viewBox="0 0 6 10" fill="none"><path d="M1.45964 9.45972L0.540405 8.54048L4.08079 5.0001L0.540405 1.45972L1.45964 0.540478L5.91926 5.0001L1.45964 9.45972Z" fill="black" fill-opacity="0.9"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none"><path d="M6.00002 7.38053L10.6195 12L12 10.6194L7.38055 6L12 1.38057L10.6195 4.00035e-05L6.00002 4.61947L1.38053 0L0 1.38053L4.61949 6L0 10.6195L1.38053 12L6.00002 7.38053Z" fill="black" fill-opacity="0.9"></path></svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="none">
|
|
2
|
+
<rect x="6" y="14" width="36" height="26" fill="#DCDCDC"/>
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M23.5 20.5V30H24.5V20.5H23.5ZM23.25 32V33.5H24.75V32H23.25Z" fill="black" fill-opacity="0.9"/>
|
|
4
|
+
<path d="M6 7H42V13H6V7Z" fill="#DCDCDC"/>
|
|
5
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M46.5234 43.9636C46.5234 44.483 46.2687 44.9325 45.9028 45.2929C45.5387 45.6516 45.0374 45.9517 44.4584 46.1929C43.2981 46.6764 41.7298 46.9636 40.0234 46.9636C38.3171 46.9636 36.7488 46.6764 35.5885 46.1929C35.0094 45.9517 34.5082 45.6516 34.1441 45.2929C33.7782 44.9325 33.5234 44.483 33.5234 43.9636V36.9636C33.5234 36.4443 33.7782 35.9948 34.1441 35.6343C34.5082 35.2756 35.0094 34.9756 35.5885 34.7343C36.7488 34.2509 38.3171 33.9636 40.0234 33.9636C41.7298 33.9636 43.2981 34.2509 44.4584 34.7343C45.0374 34.9756 45.5387 35.2756 45.9028 35.6343C46.2687 35.9948 46.5234 36.4443 46.5234 36.9636V43.9636ZM34.8458 36.3467C34.6045 36.5845 34.5234 36.7926 34.5234 36.9636C34.5234 37.1346 34.6045 37.3428 34.8458 37.5805C35.0889 37.82 35.4664 38.0587 35.9731 38.2699C36.9844 38.6912 38.4161 38.9636 40.0234 38.9636C41.6308 38.9636 43.0625 38.6912 44.0738 38.2699C44.5805 38.0587 44.9579 37.82 45.201 37.5805C45.4424 37.3428 45.5234 37.1346 45.5234 36.9636C45.5234 36.7926 45.4424 36.5845 45.201 36.3467C44.9579 36.1072 44.5805 35.8685 44.0738 35.6574C43.0625 35.236 41.6308 34.9636 40.0234 34.9636C38.4161 34.9636 36.9844 35.236 35.9731 35.6574C35.4664 35.8685 35.0889 36.1072 34.8458 36.3467ZM45.5234 38.6118V40.4636C45.5234 40.6346 45.4424 40.8428 45.201 41.0805C44.9579 41.32 44.5805 41.5587 44.0738 41.7699C43.0625 42.1912 41.6308 42.4636 40.0234 42.4636C38.4161 42.4636 36.9844 42.1912 35.9731 41.7699C35.4664 41.5587 35.0889 41.32 34.8458 41.0805C34.6045 40.8428 34.5234 40.6346 34.5234 40.4636V38.6118C34.8288 38.8333 35.1902 39.027 35.5885 39.1929C36.7488 39.6764 38.3171 39.9636 40.0234 39.9636C41.7298 39.9636 43.2981 39.6764 44.4584 39.1929C44.8566 39.027 45.2181 38.8333 45.5234 38.6118ZM45.5234 43.9636V42.1118C45.2181 42.3333 44.8566 42.527 44.4584 42.6929C43.2981 43.1764 41.7298 43.4636 40.0234 43.4636C38.3171 43.4636 36.7488 43.1764 35.5885 42.6929C35.1902 42.527 34.8288 42.3333 34.5234 42.1118V43.9636C34.5234 44.1346 34.6045 44.3428 34.8458 44.5805C35.0889 44.82 35.4664 45.0587 35.9731 45.2699C36.9844 45.6912 38.4161 45.9636 40.0234 45.9636C41.6308 45.9636 43.0625 45.6912 44.0738 45.2699C44.5805 45.0587 44.9579 44.82 45.201 44.5805C45.4424 44.3428 45.5234 44.1346 45.5234 43.9636Z" fill="black" fill-opacity="0.9"/>
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
Component({
|
|
2
|
+
options: {
|
|
3
|
+
virtualHost: true,
|
|
4
|
+
},
|
|
5
|
+
properties: {
|
|
6
|
+
errorObj: {
|
|
7
|
+
type: Object,
|
|
8
|
+
value: {},
|
|
9
|
+
},
|
|
10
|
+
hasRecord: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
value: false,
|
|
13
|
+
},
|
|
14
|
+
component: {
|
|
15
|
+
type: String,
|
|
16
|
+
value: '',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
data: {
|
|
20
|
+
visible: false,
|
|
21
|
+
},
|
|
22
|
+
methods: {
|
|
23
|
+
// 复制到剪贴板
|
|
24
|
+
copyClipBoard: function () {
|
|
25
|
+
wx.setClipboardData({
|
|
26
|
+
data: this.data.copiedText,
|
|
27
|
+
success() {
|
|
28
|
+
wx.getClipboardData({
|
|
29
|
+
success() {},
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
},
|
|
34
|
+
// 显隐弹出层
|
|
35
|
+
showModal: function () {
|
|
36
|
+
const { errorObj } = this.data;
|
|
37
|
+
const copiedText = `错误码: ${errorObj.code || '-'}\r\n错误信息: ${
|
|
38
|
+
errorObj.message || '-'
|
|
39
|
+
}\r\nRequestId: ${errorObj.requestId || '-'}`;
|
|
40
|
+
this.setData({
|
|
41
|
+
visible: true,
|
|
42
|
+
copiedText: copiedText,
|
|
43
|
+
});
|
|
44
|
+
},
|
|
45
|
+
hideModal: function () {
|
|
46
|
+
this.setData({
|
|
47
|
+
visible: false,
|
|
48
|
+
});
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<view class="weda-status_content wd-status-content">
|
|
2
|
+
<view class="weda-status_content__content wd-status-content__content {{(hasRecord || component === 'listview')? 'white-bg':'grey-bg'}}">
|
|
3
|
+
<view wx:if="{{!hasRecord}}" class="weda-status_content__content__image wd-status-content__status-icon error"></view>
|
|
4
|
+
<text class="title"> 数据加载失败 </text>
|
|
5
|
+
<text class="code"> 错误码:{{errorObj.code}} </text>
|
|
6
|
+
<view class="detail" bindtap="showModal">
|
|
7
|
+
查看详细异常信息
|
|
8
|
+
<image class="arrow" src="arrow-right.svg" />
|
|
9
|
+
</view>
|
|
10
|
+
</view>
|
|
11
|
+
</view>
|
|
12
|
+
<view class="weda-status_content_error-picker" wx:if="{{visible}}">
|
|
13
|
+
<view class="weda-status_content_mask" bindtap="hideModal"></view>
|
|
14
|
+
<view class="weda-status_content_picker-inner">
|
|
15
|
+
<view class="title">
|
|
16
|
+
详细异常信息
|
|
17
|
+
<image class="close" src="close.svg" bindtap="hideModal" />
|
|
18
|
+
</view>
|
|
19
|
+
<view class="detail">
|
|
20
|
+
<text class="line">错误码: {{errorObj.code}}</text>
|
|
21
|
+
<text class="line">错误信息: {{errorObj.message}}</text>
|
|
22
|
+
<text class="line">RequestId: {{errorObj.requestId}}</text>
|
|
23
|
+
</view>
|
|
24
|
+
<view class="foot">
|
|
25
|
+
<view class="copy" bindtap="copyClipBoard">复制到剪贴板</view>
|
|
26
|
+
</view>
|
|
27
|
+
</view>
|
|
28
|
+
</view>
|