centui 0.0.0-stage → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +433 -0
- package/README.md +54 -2
- package/dist/ActionBar-Bs5fkyFH.cjs +1 -0
- package/dist/ActionBar-CF1zMUMC.js +56 -0
- package/dist/ActivityIndicator-BOZRJBDn.cjs +1 -0
- package/dist/ActivityIndicator-Cp20c1E0.js +162 -0
- package/dist/Agree-ZswFiFNy.cjs +1 -0
- package/dist/Agree-lAcOo38C.js +43 -0
- package/dist/Amount-B2StZGGW.js +56 -0
- package/dist/Amount-CU7Oc4vv.cjs +1 -0
- package/dist/Bill-DDVs3Lu3.cjs +1 -0
- package/dist/Bill-qQ4LdkmR.js +58 -0
- package/dist/Button-Bu8liJQE.cjs +1 -0
- package/dist/Button-D7e-cuA1.js +60 -0
- package/dist/Captcha-BEF-de8-.cjs +1 -0
- package/dist/Captcha-CgpynYTc.js +283 -0
- package/dist/Cashier-CJLfQOXm.js +363 -0
- package/dist/Cashier-CLJngM0n.cjs +1 -0
- package/dist/CellItem-BHEh4Cp-.js +71 -0
- package/dist/CellItem-J0LkwZNL.cjs +1 -0
- package/dist/Chart-BINJAx7V.js +135 -0
- package/dist/Chart-DJ0Q1g1P.cjs +1 -0
- package/dist/CheckBox-D5bCJUXD.js +55 -0
- package/dist/CheckBox-DDeCshDK.cjs +1 -0
- package/dist/CheckBoxBase-BIPGJ-TD.js +43 -0
- package/dist/CheckBoxBase-CobK6-tL.cjs +1 -0
- package/dist/CheckList-BsKo_Fl3.cjs +1 -0
- package/dist/CheckList-ViiCo4yi.js +195 -0
- package/dist/Codebox-BLPrFnIv.js +188 -0
- package/dist/Codebox-yLkdTU7w.cjs +1 -0
- package/dist/DatePicker-CCU6gqG3.cjs +1 -0
- package/dist/DatePicker-CYvPJatt.js +175 -0
- package/dist/DetailItem-D6-zbZmd.js +21 -0
- package/dist/DetailItem-DDJXXao0.cjs +1 -0
- package/dist/Dialog-208_XUAL.cjs +1 -0
- package/dist/Dialog-Bb7Gth3j.js +148 -0
- package/dist/DropMenu-5TA_6bas.js +95 -0
- package/dist/DropMenu-D_ZMGOOi.cjs +1 -0
- package/dist/Field-0hdNWFNm.js +50 -0
- package/dist/Field-DDmHa4zB.cjs +1 -0
- package/dist/FieldItem-D79w330m.js +87 -0
- package/dist/FieldItem-UFKrl_5J.cjs +1 -0
- package/dist/Icon-83WWqE5z.cjs +31 -0
- package/dist/Icon-BgCtu0ZV.js +117 -0
- package/dist/ImageReader-DjshA_hh.cjs +1 -0
- package/dist/ImageReader-hUb5CEbV.js +122 -0
- package/dist/ImageViewer-BCEK4DOF.cjs +1 -0
- package/dist/ImageViewer-_dTRCIsV.js +68 -0
- package/dist/InputItem-DO5Yo_IH.cjs +1 -0
- package/dist/InputItem-yHsLFvKt.js +327 -0
- package/dist/Landscape-BsHyoM4N.cjs +1 -0
- package/dist/Landscape-Dd0abEy1.js +73 -0
- package/dist/LicensePlate-CTcAIbcb.js +201 -0
- package/dist/LicensePlate-CfwpVw0G.cjs +1 -0
- package/dist/NoticeBar-CV355FeO.cjs +1 -0
- package/dist/NoticeBar-G5aKL6VO.js +92 -0
- package/dist/NumberKeyboard-BWpxsbYt.cjs +1 -0
- package/dist/NumberKeyboard-B_TJXxki.js +335 -0
- package/dist/Picker-BOEGTBaN.cjs +1 -0
- package/dist/Picker-CA-JQ_OC.js +493 -0
- package/dist/Popup-Ca1jPi0t.cjs +1 -0
- package/dist/Popup-qLk-BsRS.js +116 -0
- package/dist/PopupTitleBar-9P4RUMC1.js +84 -0
- package/dist/PopupTitleBar-Bfl49eYJ.cjs +1 -0
- package/dist/Progress-CT-LHaQ0.cjs +1 -0
- package/dist/Progress-Clet0W_n.js +65 -0
- package/dist/Radio-B_MxJ65X.cjs +1 -0
- package/dist/Radio-DY-ZX0BP.js +67 -0
- package/dist/RadioGroup-B00aqM9e.js +84 -0
- package/dist/RadioGroup-B6ukqnm5.cjs +1 -0
- package/dist/RadioList-D-9PITpr.cjs +1 -0
- package/dist/RadioList-DNGsEzgf.js +125 -0
- package/dist/ResultPage-DUs8ok5R.js +64 -0
- package/dist/ResultPage-YQWDaFmz.cjs +1 -0
- package/dist/Roller-BznN57fL.js +91 -0
- package/dist/Roller-DALhjhfg.cjs +1 -0
- package/dist/RollerSuccess-BbMzNlkv.cjs +1 -0
- package/dist/RollerSuccess-CTh43Rh0.js +65 -0
- package/dist/Ruler-Bhf5J7hU.js +136 -0
- package/dist/Ruler-CEzB0oqG.cjs +1 -0
- package/dist/ScrollView-BNY62f7B.js +228 -0
- package/dist/ScrollView-BnadVBJC.cjs +1 -0
- package/dist/ScrollViewMore-BL1vpyMj.cjs +1 -0
- package/dist/ScrollViewMore-DBhoiI1X.js +54 -0
- package/dist/Selector-DOU8Af55.js +209 -0
- package/dist/Selector-DnFvOGbv.cjs +1 -0
- package/dist/Skeleton--SCiydNl.cjs +1 -0
- package/dist/Skeleton-DqA5IxL5.js +54 -0
- package/dist/Slider-BB2Nhpys.js +100 -0
- package/dist/Slider-vV7_nULf.cjs +1 -0
- package/dist/Stepper-BnDhL8IO.js +137 -0
- package/dist/Stepper-n_mc16V2.cjs +1 -0
- package/dist/Steps-BPQwab3T.js +157 -0
- package/dist/Steps-Dfpmgl8B.cjs +1 -0
- package/dist/SwiperItem-BY5cUoGn.cjs +1 -0
- package/dist/SwiperItem-BydyBdYU.js +323 -0
- package/dist/Switch-B1rsBY-M.js +31 -0
- package/dist/Switch-CghubImq.cjs +1 -0
- package/dist/TabPane-BCVsdptu.cjs +1 -0
- package/dist/TabPane-Q7oUFzmP.js +237 -0
- package/dist/TabPicker-BcL9assY.cjs +1 -0
- package/dist/TabPicker-BicPrto7.js +173 -0
- package/dist/Tag-C7ygxOwU.js +78 -0
- package/dist/Tag-CIA2npnD.cjs +1 -0
- package/dist/TextareaItem-Dl-PCLl-.js +168 -0
- package/dist/TextareaItem-Du5nl7tv.cjs +1 -0
- package/dist/Tip-DHPmevlv.js +165 -0
- package/dist/Tip-De_3tKtb.cjs +1 -0
- package/dist/Transition-B-baX512.js +14 -0
- package/dist/Transition-Bwbqr4Xr.cjs +1 -0
- package/dist/WaterMark-CgkuQjv3.js +103 -0
- package/dist/WaterMark-M81jg6T5.cjs +1 -0
- package/dist/action-bar.cjs +1 -0
- package/dist/action-bar.d.ts +1 -0
- package/dist/action-bar.js +1 -0
- package/dist/action-sheet-BjaReHkr.cjs +1 -0
- package/dist/action-sheet-Da8dHevy.js +121 -0
- package/dist/action-sheet.cjs +1 -0
- package/dist/action-sheet.d.ts +2 -0
- package/dist/action-sheet.js +1 -0
- package/dist/activity-indicator.cjs +1 -0
- package/dist/activity-indicator.d.ts +1 -0
- package/dist/activity-indicator.js +4 -0
- package/dist/agree.cjs +1 -0
- package/dist/agree.d.ts +1 -0
- package/dist/agree.js +1 -0
- package/dist/amount.cjs +1 -0
- package/dist/amount.d.ts +1 -0
- package/dist/amount.js +1 -0
- package/dist/bill.cjs +1 -0
- package/dist/bill.d.ts +1 -0
- package/dist/bill.js +1 -0
- package/dist/button.cjs +1 -0
- package/dist/button.d.ts +1 -0
- package/dist/button.js +1 -0
- package/dist/captcha.cjs +1 -0
- package/dist/captcha.d.ts +1 -0
- package/dist/captcha.js +1 -0
- package/dist/cashier.cjs +1 -0
- package/dist/cashier.d.ts +1 -0
- package/dist/cashier.js +1 -0
- package/dist/cell-item.cjs +1 -0
- package/dist/cell-item.d.ts +1 -0
- package/dist/cell-item.js +1 -0
- package/dist/chart.cjs +1 -0
- package/dist/chart.d.ts +1 -0
- package/dist/chart.js +1 -0
- package/dist/check-base.cjs +1 -0
- package/dist/check-base.d.ts +1 -0
- package/dist/check-base.js +1 -0
- package/dist/check.cjs +1 -0
- package/dist/check.d.ts +1 -0
- package/dist/check.js +3 -0
- package/dist/codebox.cjs +1 -0
- package/dist/codebox.d.ts +1 -0
- package/dist/codebox.js +1 -0
- package/dist/components/action-bar/ActionBar.vue.d.ts +34 -0
- package/dist/components/action-bar/index.d.ts +2 -0
- package/dist/components/action-sheet/ActionSheet.vue.d.ts +49 -0
- package/dist/components/action-sheet/index.d.ts +25 -0
- package/dist/components/activity-indicator/ActivityIndicator.vue.d.ts +31 -0
- package/dist/components/activity-indicator/Carousel.vue.d.ts +10 -0
- package/dist/components/activity-indicator/CarouselCircle.vue.d.ts +12 -0
- package/dist/components/activity-indicator/Roller.vue.d.ts +37 -0
- package/dist/components/activity-indicator/RollerSuccess.vue.d.ts +14 -0
- package/dist/components/activity-indicator/Spinning.vue.d.ts +10 -0
- package/dist/components/activity-indicator/index.d.ts +5 -0
- package/dist/components/agree/Agree.vue.d.ts +35 -0
- package/dist/components/agree/index.d.ts +1 -0
- package/dist/components/amount/Amount.vue.d.ts +25 -0
- package/dist/components/amount/index.d.ts +1 -0
- package/dist/components/bill/Bill.vue.d.ts +33 -0
- package/dist/components/bill/index.d.ts +1 -0
- package/dist/components/button/Button.vue.d.ts +38 -0
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/captcha/Captcha.vue.d.ts +76 -0
- package/dist/components/captcha/index.d.ts +1 -0
- package/dist/components/cashier/Cashier.vue.d.ts +101 -0
- package/dist/components/cashier/CashierChannel.vue.d.ts +58 -0
- package/dist/components/cashier/CashierChannelButton.vue.d.ts +14 -0
- package/dist/components/cashier/CashierChannelItem.vue.d.ts +30 -0
- package/dist/components/cashier/index.d.ts +4 -0
- package/dist/components/cell-item/CellItem.vue.d.ts +38 -0
- package/dist/components/cell-item/index.d.ts +1 -0
- package/dist/components/chart/Chart.vue.d.ts +30 -0
- package/dist/components/chart/index.d.ts +2 -0
- package/dist/components/check/Check.vue.d.ts +38 -0
- package/dist/components/check/CheckBox.vue.d.ts +31 -0
- package/dist/components/check/CheckGroup.vue.d.ts +27 -0
- package/dist/components/check/CheckList.vue.d.ts +58 -0
- package/dist/components/check/index.d.ts +6 -0
- package/dist/components/check/shared.d.ts +52 -0
- package/dist/components/check-base/CheckBoxBase.vue.d.ts +25 -0
- package/dist/components/check-base/index.d.ts +1 -0
- package/dist/components/codebox/Codebox.vue.d.ts +58 -0
- package/dist/components/codebox/index.d.ts +1 -0
- package/dist/components/date-picker/DatePicker.vue.d.ts +70 -0
- package/dist/components/date-picker/index.d.ts +1 -0
- package/dist/components/detail-item/DetailItem.vue.d.ts +22 -0
- package/dist/components/detail-item/index.d.ts +1 -0
- package/dist/components/dialog/Dialog.vue.d.ts +88 -0
- package/dist/components/dialog/index.d.ts +40 -0
- package/dist/components/drop-menu/DropMenu.vue.d.ts +55 -0
- package/dist/components/drop-menu/index.d.ts +1 -0
- package/dist/components/field/Field.vue.d.ts +30 -0
- package/dist/components/field/index.d.ts +1 -0
- package/dist/components/field-item/FieldItem.vue.d.ts +42 -0
- package/dist/components/field-item/index.d.ts +1 -0
- package/dist/components/icon/Icon.vue.d.ts +20 -0
- package/dist/components/icon/default-svg-list.d.ts +2 -0
- package/dist/components/icon/index.d.ts +1 -0
- package/dist/components/icon/load-sprite.d.ts +6 -0
- package/dist/components/image-reader/ImageReader.vue.d.ts +46 -0
- package/dist/components/image-reader/index.d.ts +1 -0
- package/dist/components/image-viewer/ImageViewer.vue.d.ts +25 -0
- package/dist/components/image-viewer/index.d.ts +1 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/input-item/InputItem.vue.d.ts +97 -0
- package/dist/components/input-item/cursor.d.ts +7 -0
- package/dist/components/input-item/index.d.ts +1 -0
- package/dist/components/landscape/Landscape.vue.d.ts +38 -0
- package/dist/components/landscape/index.d.ts +1 -0
- package/dist/components/license-plate/LicensePlate.vue.d.ts +32 -0
- package/dist/components/license-plate/LicensePlateInput.vue.d.ts +14 -0
- package/dist/components/license-plate/LicensePlateKeyboard.vue.d.ts +30 -0
- package/dist/components/license-plate/index.d.ts +3 -0
- package/dist/components/notice-bar/NoticeBar.vue.d.ts +44 -0
- package/dist/components/notice-bar/index.d.ts +1 -0
- package/dist/components/number-keyboard/KeyboardBoard.vue.d.ts +33 -0
- package/dist/components/number-keyboard/KeyboardKey.vue.d.ts +19 -0
- package/dist/components/number-keyboard/NumberKeyboard.vue.d.ts +59 -0
- package/dist/components/number-keyboard/index.d.ts +3 -0
- package/dist/components/picker/Picker.vue.d.ts +64 -0
- package/dist/components/picker/PickerColumn.vue.d.ts +64 -0
- package/dist/components/picker/index.d.ts +3 -0
- package/dist/components/popup/Popup.vue.d.ts +50 -0
- package/dist/components/popup/PopupTitleBar.vue.d.ts +45 -0
- package/dist/components/popup/index.d.ts +2 -0
- package/dist/components/progress/Progress.vue.d.ts +39 -0
- package/dist/components/progress/index.d.ts +1 -0
- package/dist/components/radio/Radio.vue.d.ts +39 -0
- package/dist/components/radio/RadioBox.vue.d.ts +31 -0
- package/dist/components/radio/RadioGroup.vue.d.ts +24 -0
- package/dist/components/radio/index.d.ts +3 -0
- package/dist/components/radio-list/RadioList.vue.d.ts +72 -0
- package/dist/components/radio-list/index.d.ts +2 -0
- package/dist/components/result-page/ResultPage.vue.d.ts +28 -0
- package/dist/components/result-page/index.d.ts +1 -0
- package/dist/components/ruler/Ruler.vue.d.ts +34 -0
- package/dist/components/ruler/index.d.ts +1 -0
- package/dist/components/scroll-view/ScrollView.vue.d.ts +84 -0
- package/dist/components/scroll-view/ScrollViewMore.vue.d.ts +12 -0
- package/dist/components/scroll-view/ScrollViewRefresh.vue.d.ts +20 -0
- package/dist/components/scroll-view/index.d.ts +3 -0
- package/dist/components/selector/Selector.vue.d.ts +88 -0
- package/dist/components/selector/index.d.ts +2 -0
- package/dist/components/skeleton/Skeleton.vue.d.ts +30 -0
- package/dist/components/skeleton/index.d.ts +1 -0
- package/dist/components/slider/Slider.vue.d.ts +24 -0
- package/dist/components/slider/index.d.ts +1 -0
- package/dist/components/stepper/Stepper.vue.d.ts +32 -0
- package/dist/components/stepper/index.d.ts +1 -0
- package/dist/components/steps/Steps.vue.d.ts +56 -0
- package/dist/components/steps/index.d.ts +2 -0
- package/dist/components/swiper/Swiper.vue.d.ts +57 -0
- package/dist/components/swiper/SwiperItem.vue.d.ts +26 -0
- package/dist/components/swiper/index.d.ts +2 -0
- package/dist/components/switch/Switch.vue.d.ts +16 -0
- package/dist/components/switch/index.d.ts +1 -0
- package/dist/components/tab-picker/TabPicker.vue.d.ts +78 -0
- package/dist/components/tab-picker/index.d.ts +1 -0
- package/dist/components/tabs/TabBar.vue.d.ts +50 -0
- package/dist/components/tabs/TabPane.vue.d.ts +31 -0
- package/dist/components/tabs/Tabs.vue.d.ts +34 -0
- package/dist/components/tabs/index.d.ts +3 -0
- package/dist/components/tag/Tag.vue.d.ts +39 -0
- package/dist/components/tag/index.d.ts +1 -0
- package/dist/components/textarea-item/TextareaItem.vue.d.ts +80 -0
- package/dist/components/textarea-item/index.d.ts +1 -0
- package/dist/components/tip/Tip.vue.d.ts +98 -0
- package/dist/components/tip/TipContent.vue.d.ts +33 -0
- package/dist/components/tip/index.d.ts +2 -0
- package/dist/components/toast/Toast.vue.d.ts +45 -0
- package/dist/components/toast/index.d.ts +129 -0
- package/dist/components/transition/Transition.vue.d.ts +13 -0
- package/dist/components/transition/index.d.ts +1 -0
- package/dist/components/water-mark/WaterMark.vue.d.ts +35 -0
- package/dist/components/water-mark/index.d.ts +1 -0
- package/dist/cursor-BIPoNm8V.js +11 -0
- package/dist/cursor-tQE3LcbU.cjs +1 -0
- package/dist/date-picker.cjs +1 -0
- package/dist/date-picker.d.ts +1 -0
- package/dist/date-picker.js +1 -0
- package/dist/detail-item.cjs +1 -0
- package/dist/detail-item.d.ts +1 -0
- package/dist/detail-item.js +1 -0
- package/dist/dialog-C38EDWGJ.cjs +1 -0
- package/dist/dialog-DdNA6YSe.js +91 -0
- package/dist/dialog.cjs +1 -0
- package/dist/dialog.d.ts +2 -0
- package/dist/dialog.js +3 -0
- package/dist/drop-menu.cjs +1 -0
- package/dist/drop-menu.d.ts +1 -0
- package/dist/drop-menu.js +1 -0
- package/dist/field-item.cjs +1 -0
- package/dist/field-item.d.ts +1 -0
- package/dist/field-item.js +1 -0
- package/dist/field.cjs +1 -0
- package/dist/field.d.ts +1 -0
- package/dist/field.js +1 -0
- package/dist/icon.cjs +1 -0
- package/dist/icon.d.ts +1 -0
- package/dist/icon.js +1 -0
- package/dist/image-reader.cjs +1 -0
- package/dist/image-reader.d.ts +1 -0
- package/dist/image-reader.js +1 -0
- package/dist/image-viewer.cjs +1 -0
- package/dist/image-viewer.d.ts +1 -0
- package/dist/image-viewer.js +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +64 -0
- package/dist/index.js +61 -0
- package/dist/input-item.cjs +1 -0
- package/dist/input-item.d.ts +1 -0
- package/dist/input-item.js +1 -0
- package/dist/landscape.cjs +1 -0
- package/dist/landscape.d.ts +1 -0
- package/dist/landscape.js +1 -0
- package/dist/license-plate.cjs +1 -0
- package/dist/license-plate.d.ts +1 -0
- package/dist/license-plate.js +1 -0
- package/dist/notice-bar.cjs +1 -0
- package/dist/notice-bar.d.ts +1 -0
- package/dist/notice-bar.js +1 -0
- package/dist/number-keyboard.cjs +1 -0
- package/dist/number-keyboard.d.ts +1 -0
- package/dist/number-keyboard.js +1 -0
- package/dist/picker.cjs +1 -0
- package/dist/picker.d.ts +1 -0
- package/dist/picker.js +1 -0
- package/dist/popup.cjs +1 -0
- package/dist/popup.d.ts +1 -0
- package/dist/popup.js +3 -0
- package/dist/progress.cjs +1 -0
- package/dist/progress.d.ts +1 -0
- package/dist/progress.js +1 -0
- package/dist/radio-list.cjs +1 -0
- package/dist/radio-list.d.ts +1 -0
- package/dist/radio-list.js +1 -0
- package/dist/radio.cjs +1 -0
- package/dist/radio.d.ts +1 -0
- package/dist/radio.js +3 -0
- package/dist/result-page.cjs +1 -0
- package/dist/result-page.d.ts +1 -0
- package/dist/result-page.js +1 -0
- package/dist/ruler.cjs +1 -0
- package/dist/ruler.d.ts +1 -0
- package/dist/ruler.js +1 -0
- package/dist/scroll-view.cjs +1 -0
- package/dist/scroll-view.d.ts +1 -0
- package/dist/scroll-view.js +3 -0
- package/dist/selector.cjs +1 -0
- package/dist/selector.d.ts +1 -0
- package/dist/selector.js +1 -0
- package/dist/shared-C9XlLe7F.js +36 -0
- package/dist/shared-k9cbQbvK.cjs +1 -0
- package/dist/skeleton.cjs +1 -0
- package/dist/skeleton.d.ts +1 -0
- package/dist/skeleton.js +1 -0
- package/dist/slider.cjs +1 -0
- package/dist/slider.d.ts +1 -0
- package/dist/slider.js +1 -0
- package/dist/stepper.cjs +1 -0
- package/dist/stepper.d.ts +1 -0
- package/dist/stepper.js +1 -0
- package/dist/steps.cjs +1 -0
- package/dist/steps.d.ts +1 -0
- package/dist/steps.js +1 -0
- package/dist/swiper.cjs +1 -0
- package/dist/swiper.d.ts +1 -0
- package/dist/swiper.js +1 -0
- package/dist/switch.cjs +1 -0
- package/dist/switch.d.ts +1 -0
- package/dist/switch.js +1 -0
- package/dist/tab-picker.cjs +1 -0
- package/dist/tab-picker.d.ts +1 -0
- package/dist/tab-picker.js +1 -0
- package/dist/tabs.cjs +1 -0
- package/dist/tabs.d.ts +1 -0
- package/dist/tabs.js +1 -0
- package/dist/tag.cjs +1 -0
- package/dist/tag.d.ts +1 -0
- package/dist/tag.js +1 -0
- package/dist/textarea-item.cjs +1 -0
- package/dist/textarea-item.d.ts +1 -0
- package/dist/textarea-item.js +1 -0
- package/dist/tip.cjs +1 -0
- package/dist/tip.d.ts +1 -0
- package/dist/tip.js +1 -0
- package/dist/toast-ByIFvpMs.js +146 -0
- package/dist/toast-C1K2_cOo.cjs +1 -0
- package/dist/toast.cjs +1 -0
- package/dist/toast.d.ts +2 -0
- package/dist/toast.js +1 -0
- package/dist/transition.cjs +1 -0
- package/dist/transition.d.ts +1 -0
- package/dist/transition.js +1 -0
- package/dist/water-mark.cjs +1 -0
- package/dist/water-mark.d.ts +1 -0
- package/dist/water-mark.js +1 -0
- package/package.json +296 -3
|
@@ -0,0 +1,493 @@
|
|
|
1
|
+
import { t as e } from "./Popup-qLk-BsRS.js";
|
|
2
|
+
import { t } from "./PopupTitleBar-9P4RUMC1.js";
|
|
3
|
+
import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, nextTick as u, normalizeClass as d, normalizeStyle as f, onBeforeMount as p, onBeforeUnmount as m, onMounted as h, openBlock as g, ref as _, renderList as v, toDisplayString as y, unref as b, watch as x, withCtx as S } from "vue";
|
|
4
|
+
import { cascade as C, compareObjects as w, inArray as T, t as E, traverse as D, warn as O } from "@centui/core";
|
|
5
|
+
import { Scroller as k, getDpr as A, render as j } from "@centui/core/web";
|
|
6
|
+
// src/components/picker/PickerColumn.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
+
var M = { class: "cu-picker-column-container" }, N = { class: "cu-picker-column-list" }, P = ["textContent"], ee = { class: "cu-picker-column-hooks" }, F = [
|
|
8
|
+
"onTouchstart",
|
|
9
|
+
"onMousedown",
|
|
10
|
+
"onTouchmove",
|
|
11
|
+
"onMousemove",
|
|
12
|
+
"onTouchend",
|
|
13
|
+
"onMouseup"
|
|
14
|
+
], I = /* @__PURE__ */ l({
|
|
15
|
+
name: "cu-picker-column",
|
|
16
|
+
__name: "PickerColumn",
|
|
17
|
+
props: {
|
|
18
|
+
data: { default: () => [] },
|
|
19
|
+
cols: { default: 1 },
|
|
20
|
+
defaultValue: { default: () => [] },
|
|
21
|
+
defaultIndex: { default: () => [] },
|
|
22
|
+
invalidIndex: { default: () => [] },
|
|
23
|
+
lineHeight: { default: 45 },
|
|
24
|
+
keepIndex: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: !1
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
emits: ["initialed", "change"],
|
|
30
|
+
setup(e, { expose: t, emit: i }) {
|
|
31
|
+
let c = e, l = i, h = A(), b = _(), S = _([]), C = [], w = null, E = _(1), I = _(0), L = _([]), R = _(!1), z = _(!1), B = _(!1), V = r(() => ({
|
|
32
|
+
maskerHeight: (c.lineHeight * 2 + 10) * h,
|
|
33
|
+
indicatorHeight: c.lineHeight * h
|
|
34
|
+
}));
|
|
35
|
+
x(() => c.data, (e) => {
|
|
36
|
+
S.value = [...e], u(() => {
|
|
37
|
+
he();
|
|
38
|
+
});
|
|
39
|
+
}, { deep: !0 }), p(() => {
|
|
40
|
+
S.value = [...c.data];
|
|
41
|
+
}), m(() => {
|
|
42
|
+
w &&= (clearTimeout(w), null), C.forEach((e) => {
|
|
43
|
+
H(e);
|
|
44
|
+
}), C.length = 0;
|
|
45
|
+
});
|
|
46
|
+
function H(e) {
|
|
47
|
+
if (!e) return;
|
|
48
|
+
let t = e.stop;
|
|
49
|
+
if (typeof t == "function") {
|
|
50
|
+
t.call(e);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
let n = e.getValues();
|
|
54
|
+
e.scrollTo(n.left, n.top, !1, n.zoom);
|
|
55
|
+
}
|
|
56
|
+
function U() {
|
|
57
|
+
return b.value ? Array.from(b.value.querySelectorAll(".cu-picker-column-hook")) : [];
|
|
58
|
+
}
|
|
59
|
+
function W(e = 0) {
|
|
60
|
+
let t = U();
|
|
61
|
+
for (let n = e, r = t.length; n < r; n++) {
|
|
62
|
+
let e = t[n];
|
|
63
|
+
e && te(e, n);
|
|
64
|
+
}
|
|
65
|
+
e || (ne(), R.value || (R.value = !0, w && clearTimeout(w), w = setTimeout(() => {
|
|
66
|
+
w = null, l("initialed");
|
|
67
|
+
}, 0))), z.value = !0;
|
|
68
|
+
}
|
|
69
|
+
function te(e, t) {
|
|
70
|
+
if (!b.value) return;
|
|
71
|
+
let n = b.value.querySelectorAll(".column-list"), r = n[t];
|
|
72
|
+
if (t === void 0 || !n || !e || !r) return;
|
|
73
|
+
let i = e.getBoundingClientRect();
|
|
74
|
+
H(C[t]);
|
|
75
|
+
let a = new k((e, t) => {
|
|
76
|
+
j(r, e, t);
|
|
77
|
+
}, {
|
|
78
|
+
scrollingX: !1,
|
|
79
|
+
snapping: !0,
|
|
80
|
+
snappingVelocity: 1,
|
|
81
|
+
animationDuration: 350,
|
|
82
|
+
scrollingComplete: () => {
|
|
83
|
+
ce(t);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
a.setPosition(i.left + e.clientLeft, i.top + e.clientTop), a.setDimensions(e.clientWidth, e.clientHeight, r.offsetWidth, r.offsetHeight + V.value.maskerHeight), a.setSnapSize(0, V.value.indicatorHeight), C[t] = a, Y(t);
|
|
87
|
+
}
|
|
88
|
+
function ne() {
|
|
89
|
+
let e = S.value, t = C;
|
|
90
|
+
G(e, c.defaultIndex, c.defaultValue, (e, n) => {
|
|
91
|
+
let r = t[e];
|
|
92
|
+
r ? q(e, n) ? Z(r, e, n) : (X(r, e, n), L.value[e] = n) : O(`initialColumnIndex: scroller of column ${e} is undefined`);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
function G(e, t = [], n, r = () => {}) {
|
|
96
|
+
e && D(e, (e, i, a) => {
|
|
97
|
+
let o = a[0], s = a[1], c = t[o], l = n[o];
|
|
98
|
+
if (c === void 0 && l === void 0 && (c = 0), c !== void 0 && s === c || l !== void 0 && (e.text === l || e.label === l || e.value === l)) return r(o, s), 2;
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
function re(e) {
|
|
102
|
+
return Math.round(e / V.value.indicatorHeight);
|
|
103
|
+
}
|
|
104
|
+
function K(e) {
|
|
105
|
+
return e * V.value.indicatorHeight;
|
|
106
|
+
}
|
|
107
|
+
function ie(e, t) {
|
|
108
|
+
return L.value[e] === t;
|
|
109
|
+
}
|
|
110
|
+
function q(e, t) {
|
|
111
|
+
let n = c.invalidIndex[e];
|
|
112
|
+
return T(n, t);
|
|
113
|
+
}
|
|
114
|
+
function ae(e) {
|
|
115
|
+
for (let t of c.data[e].keys()) if (!q(e, t)) return !0;
|
|
116
|
+
return O(`hasValidIndex: has no valid items in column index ${e}`), !1;
|
|
117
|
+
}
|
|
118
|
+
function J(e, t) {
|
|
119
|
+
if (!ae(e)) return t;
|
|
120
|
+
let n = t;
|
|
121
|
+
for (; q(e, n);) n += E.value;
|
|
122
|
+
return n < 0 || n > c.data[e].length - 1 ? (E.value = -E.value, J(e, t)) : n;
|
|
123
|
+
}
|
|
124
|
+
function Y(e) {
|
|
125
|
+
let t = C[e], n = S.value[e] || [], r = L.value[e] || 0;
|
|
126
|
+
t && r && (r > n.length - 1 && (r = n.length - 1), X(t, e, r), L.value[e] = r);
|
|
127
|
+
}
|
|
128
|
+
function X(e, t, n) {
|
|
129
|
+
let r = K(n);
|
|
130
|
+
e.scrollTo(0, r);
|
|
131
|
+
}
|
|
132
|
+
function Z(e, t, n) {
|
|
133
|
+
let r = K(J(t, n));
|
|
134
|
+
e.scrollTo(0, Q(e, r), !0);
|
|
135
|
+
}
|
|
136
|
+
function Q(e, t) {
|
|
137
|
+
let n = e.getScrollMax().top;
|
|
138
|
+
return t < 0 ? 0 : t > n ? n : t;
|
|
139
|
+
}
|
|
140
|
+
function oe(e, t, n = !1) {
|
|
141
|
+
e.preventDefault();
|
|
142
|
+
let r = C[t], i = n ? [{
|
|
143
|
+
pageX: e.pageX,
|
|
144
|
+
pageY: e.pageY
|
|
145
|
+
}] : Array.from(e.touches);
|
|
146
|
+
r ? (I.value = n ? e.pageY : e.touches[0].pageY, r.doTouchStart(i, e.timeStamp), n && (B.value = !0)) : O(`touchstart: scroller of column ${t} is undefined`);
|
|
147
|
+
}
|
|
148
|
+
function $(e, t, n = !1) {
|
|
149
|
+
let r = C[t], i = n ? [{
|
|
150
|
+
pageX: e.pageX,
|
|
151
|
+
pageY: e.pageY
|
|
152
|
+
}] : Array.from(e.touches);
|
|
153
|
+
if (!r || n && !B.value) return;
|
|
154
|
+
let a = I.value - (n ? e.pageY : e.touches[0].pageY);
|
|
155
|
+
E.value = a ? a / Math.abs(a) : 1, r.doTouchMove(i, e.timeStamp), n && (B.value = !0);
|
|
156
|
+
}
|
|
157
|
+
function se(e, t, n = !1) {
|
|
158
|
+
let r = C[t];
|
|
159
|
+
!r || n && !B.value || (r.doTouchEnd(e.timeStamp), n && (B.value = !1));
|
|
160
|
+
}
|
|
161
|
+
function ce(e) {
|
|
162
|
+
let t = C[e];
|
|
163
|
+
if (!t) return;
|
|
164
|
+
let n = t.getValues().top, r = re(Q(t, n)), i = q(e, r);
|
|
165
|
+
i || r === L.value[e] ? (i && Z(t, e, r), r === L.value[e] && X(t, e, r)) : (L.value[e] = r, l("change", e, r, le(e)));
|
|
166
|
+
}
|
|
167
|
+
function le(e = 0) {
|
|
168
|
+
return ue()[e];
|
|
169
|
+
}
|
|
170
|
+
function ue() {
|
|
171
|
+
let e = S.value, t = L.value, n = [];
|
|
172
|
+
return e.forEach((e, r) => {
|
|
173
|
+
n[r] = e[t[r]];
|
|
174
|
+
}), n;
|
|
175
|
+
}
|
|
176
|
+
function de(e = 0) {
|
|
177
|
+
return L.value[e];
|
|
178
|
+
}
|
|
179
|
+
function fe() {
|
|
180
|
+
return L.value;
|
|
181
|
+
}
|
|
182
|
+
function pe(e, t, n = () => {}) {
|
|
183
|
+
e !== void 0 && t !== void 0 && (c.keepIndex || (L.value[e] = 0), S.value[e] = t, u(() => {
|
|
184
|
+
n();
|
|
185
|
+
}));
|
|
186
|
+
}
|
|
187
|
+
function me(e, t = 0) {
|
|
188
|
+
u(() => {
|
|
189
|
+
W(t), e && e();
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
function he() {
|
|
193
|
+
if (!b.value) return;
|
|
194
|
+
let e = U(), t = b.value.querySelectorAll(".column-list");
|
|
195
|
+
e.forEach((e, n) => {
|
|
196
|
+
let r = C[n], i = t[n];
|
|
197
|
+
r && e && i && (r.setDimensions(e.clientWidth, e.clientHeight, i.offsetWidth, i.offsetHeight + V.value.maskerHeight), Y(n));
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
return t({
|
|
201
|
+
refresh: me,
|
|
202
|
+
getColumnValue: le,
|
|
203
|
+
getColumnValues: ue,
|
|
204
|
+
getColumnIndex: de,
|
|
205
|
+
getColumnIndexs: fe,
|
|
206
|
+
getColumnIndexByDefault: G,
|
|
207
|
+
setColumnValues: pe,
|
|
208
|
+
isScrollInitialed: z,
|
|
209
|
+
activedIndexs: L,
|
|
210
|
+
scrollers: C
|
|
211
|
+
}), (t, r) => (g(), o("div", {
|
|
212
|
+
ref_key: "root",
|
|
213
|
+
ref: b,
|
|
214
|
+
class: "cu-picker-column",
|
|
215
|
+
style: f({ height: `${V.value.indicatorHeight + 2 * V.value.maskerHeight}px` })
|
|
216
|
+
}, [s("div", M, [
|
|
217
|
+
s("div", {
|
|
218
|
+
class: "cu-picker-column-masker top",
|
|
219
|
+
style: f({ height: `${V.value.maskerHeight}px` })
|
|
220
|
+
}, null, 4),
|
|
221
|
+
s("div", {
|
|
222
|
+
class: "cu-picker-column-masker bottom",
|
|
223
|
+
style: f({ height: `${V.value.maskerHeight}px` })
|
|
224
|
+
}, null, 4),
|
|
225
|
+
s("div", N, [(g(!0), o(n, null, v(S.value, (e, t) => (g(), o("div", {
|
|
226
|
+
key: t,
|
|
227
|
+
class: "cu-picker-column-item"
|
|
228
|
+
}, [s("ul", {
|
|
229
|
+
class: "column-list",
|
|
230
|
+
style: f({ "padding-top": `${V.value.maskerHeight}px` })
|
|
231
|
+
}, [(g(!0), o(n, null, v(e, (e, n) => (g(), o("li", {
|
|
232
|
+
key: n,
|
|
233
|
+
class: d(["column-item", {
|
|
234
|
+
active: ie(t, n),
|
|
235
|
+
disabled: q(t, n)
|
|
236
|
+
}]),
|
|
237
|
+
style: f({
|
|
238
|
+
height: `${V.value.indicatorHeight}px`,
|
|
239
|
+
"line-height": `${V.value.indicatorHeight}px`
|
|
240
|
+
}),
|
|
241
|
+
textContent: y(e.text || e.label)
|
|
242
|
+
}, null, 14, P))), 128))], 4)]))), 128)), e.cols ? (g(!0), o(n, { key: 0 }, v(e.cols - S.value.length, (e) => (g(), o("div", {
|
|
243
|
+
key: e + S.value.length - 1,
|
|
244
|
+
class: "cu-picker-column-item"
|
|
245
|
+
}, [s("ul", {
|
|
246
|
+
class: "column-list",
|
|
247
|
+
style: f({ "padding-top": `${V.value.maskerHeight}px` })
|
|
248
|
+
}, null, 4)]))), 128)) : a("", !0)]),
|
|
249
|
+
s("div", ee, [e.cols ? (g(!0), o(n, { key: 0 }, v(e.cols, (e) => (g(), o("div", {
|
|
250
|
+
key: e - 1,
|
|
251
|
+
class: "cu-picker-column-hook",
|
|
252
|
+
onTouchstart: (t) => oe(t, e - 1),
|
|
253
|
+
onMousedown: (t) => oe(t, e - 1, !0),
|
|
254
|
+
onTouchmove: (t) => $(t, e - 1),
|
|
255
|
+
onMousemove: (t) => $(t, e - 1, !0),
|
|
256
|
+
onTouchend: (t) => se(t, e - 1),
|
|
257
|
+
onMouseup: (t) => se(t, e - 1, !0)
|
|
258
|
+
}, null, 40, F))), 128)) : a("", !0)])
|
|
259
|
+
])], 4));
|
|
260
|
+
}
|
|
261
|
+
}), L = /* @__PURE__ */ l({
|
|
262
|
+
name: "cu-picker",
|
|
263
|
+
__name: "Picker",
|
|
264
|
+
props: {
|
|
265
|
+
modelValue: {
|
|
266
|
+
type: Boolean,
|
|
267
|
+
default: !1
|
|
268
|
+
},
|
|
269
|
+
isView: {
|
|
270
|
+
type: Boolean,
|
|
271
|
+
default: !1
|
|
272
|
+
},
|
|
273
|
+
title: { default: "" },
|
|
274
|
+
describe: { default: "" },
|
|
275
|
+
okText: { default: void 0 },
|
|
276
|
+
cancelText: { default: void 0 },
|
|
277
|
+
maskClosable: {
|
|
278
|
+
type: Boolean,
|
|
279
|
+
default: !0
|
|
280
|
+
},
|
|
281
|
+
lineHeight: { default: void 0 },
|
|
282
|
+
keepIndex: {
|
|
283
|
+
type: Boolean,
|
|
284
|
+
default: !1
|
|
285
|
+
},
|
|
286
|
+
largeRadius: {
|
|
287
|
+
type: Boolean,
|
|
288
|
+
default: !1
|
|
289
|
+
},
|
|
290
|
+
data: { default: () => [] },
|
|
291
|
+
cols: { default: 1 },
|
|
292
|
+
defaultValue: { default: () => [] },
|
|
293
|
+
defaultIndex: { default: () => [] },
|
|
294
|
+
invalidIndex: { default: () => [] },
|
|
295
|
+
isCascade: {
|
|
296
|
+
type: Boolean,
|
|
297
|
+
default: !1
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
emits: [
|
|
301
|
+
"update:modelValue",
|
|
302
|
+
"initialed",
|
|
303
|
+
"confirm",
|
|
304
|
+
"cancel",
|
|
305
|
+
"change",
|
|
306
|
+
"show",
|
|
307
|
+
"hide"
|
|
308
|
+
],
|
|
309
|
+
setup(n, { expose: r, emit: a }) {
|
|
310
|
+
let s = n, l = a, u = s.okText ?? String(E("md.picker.confirm")), f = s.cancelText ?? String(E("md.picker.cancel")), p = s.lineHeight ?? 45, m = _(), v = _(!1), y = _(!0), T = _(null);
|
|
311
|
+
x(() => s.modelValue, (e) => {
|
|
312
|
+
v.value = e, e && O();
|
|
313
|
+
}), x(v, (e) => {
|
|
314
|
+
e || l("update:modelValue", e);
|
|
315
|
+
}), x(() => s.data, (e, t) => {
|
|
316
|
+
w(e, t) || k();
|
|
317
|
+
}, {
|
|
318
|
+
deep: !0,
|
|
319
|
+
immediate: !0
|
|
320
|
+
}), x(() => s.defaultIndex, () => {
|
|
321
|
+
k();
|
|
322
|
+
}, { deep: !0 }), h(() => {
|
|
323
|
+
O(), s.isView && setTimeout(() => {
|
|
324
|
+
m.value?.refresh();
|
|
325
|
+
});
|
|
326
|
+
});
|
|
327
|
+
function D() {
|
|
328
|
+
return m.value;
|
|
329
|
+
}
|
|
330
|
+
function O() {
|
|
331
|
+
!s.isView && s.modelValue && (v.value = s.modelValue), y.value ? y.value = !1 : setTimeout(() => {
|
|
332
|
+
T.value = [...D()?.activedIndexs ?? []];
|
|
333
|
+
}, 100);
|
|
334
|
+
}
|
|
335
|
+
function k() {
|
|
336
|
+
if (!s.isCascade) return;
|
|
337
|
+
let e = j(), t = M();
|
|
338
|
+
setTimeout(() => {
|
|
339
|
+
let n = D();
|
|
340
|
+
n && C(n, {
|
|
341
|
+
currentLevel: -1,
|
|
342
|
+
maxLevel: s.cols,
|
|
343
|
+
values: s.data || [],
|
|
344
|
+
defaultIndex: e,
|
|
345
|
+
defaultValue: t
|
|
346
|
+
});
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
function A() {
|
|
350
|
+
k();
|
|
351
|
+
}
|
|
352
|
+
function j() {
|
|
353
|
+
return T.value || s.defaultIndex;
|
|
354
|
+
}
|
|
355
|
+
function M() {
|
|
356
|
+
return T.value ? [] : s.defaultValue;
|
|
357
|
+
}
|
|
358
|
+
function N(e) {
|
|
359
|
+
let t = e;
|
|
360
|
+
if (typeof t.isScrolling == "function") return t.isScrolling();
|
|
361
|
+
let n = e;
|
|
362
|
+
return n._isAnimating !== !1 || n._isDecelerating !== !1 || n._isDragging !== !1 || n._isGesturing !== !1;
|
|
363
|
+
}
|
|
364
|
+
function P() {
|
|
365
|
+
let e = D();
|
|
366
|
+
if (!e) return;
|
|
367
|
+
let t = e.getColumnValues();
|
|
368
|
+
e.scrollers.some((e) => N(e)) || (v.value = !1, l("confirm", t));
|
|
369
|
+
}
|
|
370
|
+
function ee() {
|
|
371
|
+
l("initialed");
|
|
372
|
+
}
|
|
373
|
+
function F() {
|
|
374
|
+
v.value = !1, l("cancel"), setTimeout(() => {
|
|
375
|
+
A(), D()?.refresh();
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
function L(e, t, n) {
|
|
379
|
+
if (s.isCascade) {
|
|
380
|
+
let t = D();
|
|
381
|
+
t && C(t, {
|
|
382
|
+
currentLevel: e,
|
|
383
|
+
maxLevel: s.cols,
|
|
384
|
+
values: [n]
|
|
385
|
+
}, () => {
|
|
386
|
+
t.refresh(void 0, e + 1);
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
l("change", e, t, n);
|
|
390
|
+
}
|
|
391
|
+
function R() {
|
|
392
|
+
D()?.isScrollInitialed || setTimeout(() => {
|
|
393
|
+
D()?.refresh();
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
function z() {
|
|
397
|
+
l("hide");
|
|
398
|
+
}
|
|
399
|
+
function B() {
|
|
400
|
+
l("show");
|
|
401
|
+
}
|
|
402
|
+
function V(e, t) {
|
|
403
|
+
let n = D();
|
|
404
|
+
n && (s.isView || v.value) && n.refresh(e, t);
|
|
405
|
+
}
|
|
406
|
+
function H() {
|
|
407
|
+
return D()?.getColumnValues() ?? [];
|
|
408
|
+
}
|
|
409
|
+
function U(e = 0) {
|
|
410
|
+
return D()?.getColumnIndex(e);
|
|
411
|
+
}
|
|
412
|
+
function W() {
|
|
413
|
+
return D()?.getColumnIndexs() ?? [];
|
|
414
|
+
}
|
|
415
|
+
return r({
|
|
416
|
+
refresh: V,
|
|
417
|
+
getColumnValues: H,
|
|
418
|
+
getColumnIndex: U,
|
|
419
|
+
getColumnIndexs: W
|
|
420
|
+
}), (r, a) => (g(), o("div", { class: d(["cu-picker", { "with-popup": !n.isView }]) }, [n.isView ? (g(), i(I, {
|
|
421
|
+
key: 0,
|
|
422
|
+
ref_key: "pickerColumn",
|
|
423
|
+
ref: m,
|
|
424
|
+
data: n.data,
|
|
425
|
+
"default-value": n.defaultValue,
|
|
426
|
+
"default-index": n.defaultIndex,
|
|
427
|
+
"invalid-index": n.invalidIndex,
|
|
428
|
+
"line-height": b(p),
|
|
429
|
+
"keep-index": n.keepIndex,
|
|
430
|
+
cols: n.cols,
|
|
431
|
+
onInitialed: a[0] ||= (e) => l("initialed"),
|
|
432
|
+
onChange: L
|
|
433
|
+
}, null, 8, [
|
|
434
|
+
"data",
|
|
435
|
+
"default-value",
|
|
436
|
+
"default-index",
|
|
437
|
+
"invalid-index",
|
|
438
|
+
"line-height",
|
|
439
|
+
"keep-index",
|
|
440
|
+
"cols"
|
|
441
|
+
])) : (g(), i(e, {
|
|
442
|
+
key: 1,
|
|
443
|
+
"model-value": v.value,
|
|
444
|
+
class: "inner-popup",
|
|
445
|
+
position: "bottom",
|
|
446
|
+
"mask-closable": n.maskClosable,
|
|
447
|
+
"prevent-scroll": "",
|
|
448
|
+
"onUpdate:modelValue": a[1] ||= (e) => v.value = e,
|
|
449
|
+
onBeforeShow: R,
|
|
450
|
+
onShow: B,
|
|
451
|
+
onHide: z,
|
|
452
|
+
onMaskClick: F
|
|
453
|
+
}, {
|
|
454
|
+
default: S(() => [c(t, {
|
|
455
|
+
title: n.title,
|
|
456
|
+
describe: n.describe,
|
|
457
|
+
"ok-text": b(u),
|
|
458
|
+
"cancel-text": b(f),
|
|
459
|
+
"large-radius": n.largeRadius,
|
|
460
|
+
onConfirm: P,
|
|
461
|
+
onCancel: F
|
|
462
|
+
}, null, 8, [
|
|
463
|
+
"title",
|
|
464
|
+
"describe",
|
|
465
|
+
"ok-text",
|
|
466
|
+
"cancel-text",
|
|
467
|
+
"large-radius"
|
|
468
|
+
]), c(I, {
|
|
469
|
+
ref_key: "pickerColumn",
|
|
470
|
+
ref: m,
|
|
471
|
+
data: n.data,
|
|
472
|
+
"default-value": M(),
|
|
473
|
+
"default-index": j(),
|
|
474
|
+
"invalid-index": n.invalidIndex,
|
|
475
|
+
"line-height": b(p),
|
|
476
|
+
"keep-index": n.keepIndex,
|
|
477
|
+
cols: n.cols,
|
|
478
|
+
onInitialed: ee,
|
|
479
|
+
onChange: L
|
|
480
|
+
}, null, 8, [
|
|
481
|
+
"data",
|
|
482
|
+
"default-value",
|
|
483
|
+
"default-index",
|
|
484
|
+
"invalid-index",
|
|
485
|
+
"line-height",
|
|
486
|
+
"keep-index",
|
|
487
|
+
"cols"
|
|
488
|
+
])]),
|
|
489
|
+
_: 1
|
|
490
|
+
}, 8, ["model-value", "mask-closable"]))], 2));
|
|
491
|
+
}
|
|
492
|
+
});
|
|
493
|
+
export { I as n, L as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=require("vue");var t=(0,e.defineComponent)({name:`cu-popup`,__name:`Popup`,props:{modelValue:{type:Boolean,default:!1},hasMask:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!0},position:{default:`center`},transition:{default:void 0},preventScroll:{type:Boolean,default:!1},preventScrollExclude:{default:``}},emits:[`update:modelValue`,`beforeShow`,`before-show`,`beforeHide`,`before-hide`,`show`,`hide`,`maskClick`],setup(t,{emit:n}){let r=t,i=n,a=typeof process<`u`&&process.env.MAND_ENV===`test`,o=(0,e.ref)(),s=null,c=(0,e.ref)(!1),l=(0,e.ref)(!1),u=(0,e.ref)(!1),d=(0,e.ref)(!1);(0,e.provide)(`mdPopupLargeRadius`,d);let f=(0,e.computed)(()=>r.transition??p(r.position));function p(e){switch(e){case`bottom`:return`cu-slide-up`;case`top`:return`cu-slide-down`;case`left`:return`cu-slide-right`;case`right`:return`cu-slide-left`;default:return`cu-fade`}}(0,e.watch)(()=>r.modelValue,e=>{e?u.value?(s&&clearTimeout(s),s=setTimeout(()=>{s=null,m()},50)):m():h()}),(0,e.watch)(()=>r.preventScrollExclude,(e,t)=>{_(!1,t),_(!0,e)}),(0,e.onMounted)(()=>{r.modelValue&&m()}),(0,e.onBeforeUnmount)(()=>{s&&=(clearTimeout(s),null)});function m(){c.value=!0,u.value=!0,l.value=!0,a&&(b(),x()),r.preventScroll&&g(!0)}function h(){u.value=!0,l.value=!1,r.preventScroll&&g(!1),i(`update:modelValue`,!1),a&&(b(),x())}function g(e){let t=e?`addEventListener`:`removeEventListener`,n=o.value?.querySelector(`.cu-popup-mask`),r=o.value?.querySelector(`.cu-popup-box`);n&&n[t](`touchmove`,v,!1),r&&r[t](`touchmove`,v,!1),_(e)}function _(e,t=r.preventScrollExclude){let n=e?`addEventListener`:`removeEventListener`,i=typeof t==`string`?t?o.value?.querySelector(t):void 0:t;i&&i[n](`touchmove`,y,!1)}function v(e){e.preventDefault()}function y(e){e.stopImmediatePropagation()}function b(){l.value?(i(`beforeShow`),i(`before-show`)):(i(`beforeHide`),i(`before-hide`))}function x(){u.value&&=(l.value?i(`show`):(c.value=!1,i(`hide`)),!1)}function S(){r.maskClosable&&(h(),i(`maskClick`))}return(n,r)=>(0,e.withDirectives)(((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{ref_key:`root`,ref:o,class:(0,e.normalizeClass)([`cu-popup`,[t.hasMask?`with-mask`:``,d.value?`large-radius`:``,t.position]])},[(0,e.createVNode)(e.Transition,{name:`cu-mask-fade`},{default:(0,e.withCtx)(()=>[(0,e.withDirectives)((0,e.createElementVNode)(`div`,{class:`cu-popup-mask`,onClick:S},null,512),[[e.vShow,t.hasMask&&l.value]])]),_:1}),(0,e.createVNode)(e.Transition,{name:f.value,onBeforeEnter:b,onBeforeLeave:b,onAfterEnter:x,onAfterLeave:x},{default:(0,e.withCtx)(()=>[(0,e.withDirectives)((0,e.createElementVNode)(`div`,{class:(0,e.normalizeClass)([`cu-popup-box`,[f.value]])},[(0,e.renderSlot)(n.$slots,`default`)],2),[[e.vShow,l.value]])]),_:3},8,[`name`])],2)),[[e.vShow,c.value]])}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return t}});
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { Transition as e, computed as t, createElementBlock as n, createElementVNode as r, createVNode as i, defineComponent as a, normalizeClass as o, onBeforeUnmount as s, onMounted as c, openBlock as l, provide as u, ref as d, renderSlot as f, vShow as p, watch as m, withCtx as h, withDirectives as g } from "vue";
|
|
2
|
+
// src/components/popup/Popup.vue
|
|
3
|
+
var _ = /* @__PURE__ */ a({
|
|
4
|
+
name: "cu-popup",
|
|
5
|
+
__name: "Popup",
|
|
6
|
+
props: {
|
|
7
|
+
modelValue: {
|
|
8
|
+
type: Boolean,
|
|
9
|
+
default: !1
|
|
10
|
+
},
|
|
11
|
+
hasMask: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: !0
|
|
14
|
+
},
|
|
15
|
+
maskClosable: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: !0
|
|
18
|
+
},
|
|
19
|
+
position: { default: "center" },
|
|
20
|
+
transition: { default: void 0 },
|
|
21
|
+
preventScroll: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: !1
|
|
24
|
+
},
|
|
25
|
+
preventScrollExclude: { default: "" }
|
|
26
|
+
},
|
|
27
|
+
emits: [
|
|
28
|
+
"update:modelValue",
|
|
29
|
+
"beforeShow",
|
|
30
|
+
"before-show",
|
|
31
|
+
"beforeHide",
|
|
32
|
+
"before-hide",
|
|
33
|
+
"show",
|
|
34
|
+
"hide",
|
|
35
|
+
"maskClick"
|
|
36
|
+
],
|
|
37
|
+
setup(a, { emit: _ }) {
|
|
38
|
+
let v = a, y = _, b = typeof process < "u" && process.env.MAND_ENV === "test", x = d(), S = null, C = d(!1), w = d(!1), T = d(!1), E = d(!1);
|
|
39
|
+
u("mdPopupLargeRadius", E);
|
|
40
|
+
let D = t(() => v.transition ?? O(v.position));
|
|
41
|
+
function O(e) {
|
|
42
|
+
switch (e) {
|
|
43
|
+
case "bottom": return "cu-slide-up";
|
|
44
|
+
case "top": return "cu-slide-down";
|
|
45
|
+
case "left": return "cu-slide-right";
|
|
46
|
+
case "right": return "cu-slide-left";
|
|
47
|
+
default: return "cu-fade";
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
m(() => v.modelValue, (e) => {
|
|
51
|
+
e ? T.value ? (S && clearTimeout(S), S = setTimeout(() => {
|
|
52
|
+
S = null, k();
|
|
53
|
+
}, 50)) : k() : A();
|
|
54
|
+
}), m(() => v.preventScrollExclude, (e, t) => {
|
|
55
|
+
M(!1, t), M(!0, e);
|
|
56
|
+
}), c(() => {
|
|
57
|
+
v.modelValue && k();
|
|
58
|
+
}), s(() => {
|
|
59
|
+
S &&= (clearTimeout(S), null);
|
|
60
|
+
});
|
|
61
|
+
function k() {
|
|
62
|
+
C.value = !0, T.value = !0, w.value = !0, b && (F(), I()), v.preventScroll && j(!0);
|
|
63
|
+
}
|
|
64
|
+
function A() {
|
|
65
|
+
T.value = !0, w.value = !1, v.preventScroll && j(!1), y("update:modelValue", !1), b && (F(), I());
|
|
66
|
+
}
|
|
67
|
+
function j(e) {
|
|
68
|
+
let t = e ? "addEventListener" : "removeEventListener", n = x.value?.querySelector(".cu-popup-mask"), r = x.value?.querySelector(".cu-popup-box");
|
|
69
|
+
n && n[t]("touchmove", N, !1), r && r[t]("touchmove", N, !1), M(e);
|
|
70
|
+
}
|
|
71
|
+
function M(e, t = v.preventScrollExclude) {
|
|
72
|
+
let n = e ? "addEventListener" : "removeEventListener", r = typeof t == "string" ? t ? x.value?.querySelector(t) : void 0 : t;
|
|
73
|
+
r && r[n]("touchmove", P, !1);
|
|
74
|
+
}
|
|
75
|
+
function N(e) {
|
|
76
|
+
e.preventDefault();
|
|
77
|
+
}
|
|
78
|
+
function P(e) {
|
|
79
|
+
e.stopImmediatePropagation();
|
|
80
|
+
}
|
|
81
|
+
function F() {
|
|
82
|
+
w.value ? (y("beforeShow"), y("before-show")) : (y("beforeHide"), y("before-hide"));
|
|
83
|
+
}
|
|
84
|
+
function I() {
|
|
85
|
+
T.value &&= (w.value ? y("show") : (C.value = !1, y("hide")), !1);
|
|
86
|
+
}
|
|
87
|
+
function L() {
|
|
88
|
+
v.maskClosable && (A(), y("maskClick"));
|
|
89
|
+
}
|
|
90
|
+
return (t, s) => g((l(), n("div", {
|
|
91
|
+
ref_key: "root",
|
|
92
|
+
ref: x,
|
|
93
|
+
class: o(["cu-popup", [
|
|
94
|
+
a.hasMask ? "with-mask" : "",
|
|
95
|
+
E.value ? "large-radius" : "",
|
|
96
|
+
a.position
|
|
97
|
+
]])
|
|
98
|
+
}, [i(e, { name: "cu-mask-fade" }, {
|
|
99
|
+
default: h(() => [g(r("div", {
|
|
100
|
+
class: "cu-popup-mask",
|
|
101
|
+
onClick: L
|
|
102
|
+
}, null, 512), [[p, a.hasMask && w.value]])]),
|
|
103
|
+
_: 1
|
|
104
|
+
}), i(e, {
|
|
105
|
+
name: D.value,
|
|
106
|
+
onBeforeEnter: F,
|
|
107
|
+
onBeforeLeave: F,
|
|
108
|
+
onAfterEnter: I,
|
|
109
|
+
onAfterLeave: I
|
|
110
|
+
}, {
|
|
111
|
+
default: h(() => [g(r("div", { class: o(["cu-popup-box", [D.value]]) }, [f(t.$slots, "default")], 2), [[p, w.value]])]),
|
|
112
|
+
_: 3
|
|
113
|
+
}, 8, ["name"])], 2)), [[p, C.value]]);
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
export { _ as t };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { t as e } from "./Icon-BgCtu0ZV.js";
|
|
2
|
+
import { Fragment as t, createCommentVNode as n, createElementBlock as r, createVNode as i, defineComponent as a, inject as o, normalizeClass as s, openBlock as c, renderSlot as l, watch as u } from "vue";
|
|
3
|
+
// src/components/popup/PopupTitleBar.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var d = ["innerHTML"], f = {
|
|
5
|
+
key: 1,
|
|
6
|
+
class: "title-bar-title"
|
|
7
|
+
}, p = ["innerHTML"], m = ["innerHTML"], h = {
|
|
8
|
+
key: 2,
|
|
9
|
+
class: "title-bar-title"
|
|
10
|
+
}, g = ["innerHTML"], _ = /* @__PURE__ */ a({
|
|
11
|
+
name: "cu-popup-title-bar",
|
|
12
|
+
__name: "PopupTitleBar",
|
|
13
|
+
props: {
|
|
14
|
+
title: { default: "" },
|
|
15
|
+
describe: { default: "" },
|
|
16
|
+
okText: { default: "" },
|
|
17
|
+
cancelText: { default: "" },
|
|
18
|
+
largeRadius: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !1
|
|
21
|
+
},
|
|
22
|
+
onlyClose: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !1
|
|
25
|
+
},
|
|
26
|
+
titleAlign: { default: "center" }
|
|
27
|
+
},
|
|
28
|
+
emits: ["confirm", "cancel"],
|
|
29
|
+
setup(a, { emit: _ }) {
|
|
30
|
+
let v = a, y = _, b = o("mdPopupLargeRadius", null);
|
|
31
|
+
u(() => v.largeRadius, (e) => {
|
|
32
|
+
b && (b.value = e);
|
|
33
|
+
}, { immediate: !0 });
|
|
34
|
+
function x(e) {
|
|
35
|
+
e.preventDefault();
|
|
36
|
+
}
|
|
37
|
+
return (o, u) => (c(), r("div", {
|
|
38
|
+
class: s(["cu-popup-title-bar", [`title-align-${a.titleAlign}`, {
|
|
39
|
+
large: !!a.describe,
|
|
40
|
+
"large-radius": a.largeRadius
|
|
41
|
+
}]]),
|
|
42
|
+
onTouchmove: x
|
|
43
|
+
}, [
|
|
44
|
+
a.onlyClose ? n("", !0) : (c(), r(t, { key: 0 }, [a.cancelText ? (c(), r("div", {
|
|
45
|
+
key: 0,
|
|
46
|
+
class: "title-bar-left cu-popup-cancel",
|
|
47
|
+
innerHTML: a.cancelText,
|
|
48
|
+
onClick: u[0] ||= (e) => y("cancel")
|
|
49
|
+
}, null, 8, d)) : o.$slots.cancel ? (c(), r("div", {
|
|
50
|
+
key: 1,
|
|
51
|
+
class: "title-bar-left cu-popup-cancel",
|
|
52
|
+
onClick: u[1] ||= (e) => y("cancel")
|
|
53
|
+
}, [l(o.$slots, "cancel")])) : n("", !0)], 64)),
|
|
54
|
+
a.title ? (c(), r("div", f, [a.title ? (c(), r("p", {
|
|
55
|
+
key: 0,
|
|
56
|
+
class: "title",
|
|
57
|
+
innerHTML: a.title
|
|
58
|
+
}, null, 8, p)) : n("", !0), a.describe ? (c(), r("p", {
|
|
59
|
+
key: 1,
|
|
60
|
+
class: "describe",
|
|
61
|
+
innerHTML: a.describe
|
|
62
|
+
}, null, 8, m)) : n("", !0)])) : (c(), r("div", h, [l(o.$slots, "title")])),
|
|
63
|
+
a.onlyClose ? n("", !0) : (c(), r(t, { key: 3 }, [a.okText ? (c(), r("div", {
|
|
64
|
+
key: 0,
|
|
65
|
+
class: "title-bar-right cu-popup-confirm",
|
|
66
|
+
innerHTML: a.okText,
|
|
67
|
+
onClick: u[2] ||= (e) => y("confirm")
|
|
68
|
+
}, null, 8, g)) : o.$slots.confirm ? (c(), r("div", {
|
|
69
|
+
key: 1,
|
|
70
|
+
class: "title-bar-right cu-popup-confirm",
|
|
71
|
+
onClick: u[3] ||= (e) => y("confirm")
|
|
72
|
+
}, [l(o.$slots, "confirm")])) : n("", !0)], 64)),
|
|
73
|
+
a.onlyClose ? (c(), r("div", {
|
|
74
|
+
key: 4,
|
|
75
|
+
class: "title-bar-right cu-popup-close",
|
|
76
|
+
onClick: u[4] ||= (e) => y("cancel")
|
|
77
|
+
}, [i(e, {
|
|
78
|
+
name: "close",
|
|
79
|
+
size: "lg"
|
|
80
|
+
})])) : n("", !0)
|
|
81
|
+
], 34));
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
export { _ as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./Icon-83WWqE5z.cjs");let t=require("vue");var n=[`innerHTML`],r={key:1,class:`title-bar-title`},i=[`innerHTML`],a=[`innerHTML`],o={key:2,class:`title-bar-title`},s=[`innerHTML`],c=(0,t.defineComponent)({name:`cu-popup-title-bar`,__name:`PopupTitleBar`,props:{title:{default:``},describe:{default:``},okText:{default:``},cancelText:{default:``},largeRadius:{type:Boolean,default:!1},onlyClose:{type:Boolean,default:!1},titleAlign:{default:`center`}},emits:[`confirm`,`cancel`],setup(c,{emit:l}){let u=c,d=l,f=(0,t.inject)(`mdPopupLargeRadius`,null);(0,t.watch)(()=>u.largeRadius,e=>{f&&(f.value=e)},{immediate:!0});function p(e){e.preventDefault()}return(l,u)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`cu-popup-title-bar`,[`title-align-${c.titleAlign}`,{large:!!c.describe,"large-radius":c.largeRadius}]]),onTouchmove:p},[c.onlyClose?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[c.cancelText?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`title-bar-left cu-popup-cancel`,innerHTML:c.cancelText,onClick:u[0]||=e=>d(`cancel`)},null,8,n)):l.$slots.cancel?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,class:`title-bar-left cu-popup-cancel`,onClick:u[1]||=e=>d(`cancel`)},[(0,t.renderSlot)(l.$slots,`cancel`)])):(0,t.createCommentVNode)(``,!0)],64)),c.title?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,r,[c.title?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,{key:0,class:`title`,innerHTML:c.title},null,8,i)):(0,t.createCommentVNode)(``,!0),c.describe?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,{key:1,class:`describe`,innerHTML:c.describe},null,8,a)):(0,t.createCommentVNode)(``,!0)])):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,o,[(0,t.renderSlot)(l.$slots,`title`)])),c.onlyClose?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:3},[c.okText?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`title-bar-right cu-popup-confirm`,innerHTML:c.okText,onClick:u[2]||=e=>d(`confirm`)},null,8,s)):l.$slots.confirm?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,class:`title-bar-right cu-popup-confirm`,onClick:u[3]||=e=>d(`confirm`)},[(0,t.renderSlot)(l.$slots,`confirm`)])):(0,t.createCommentVNode)(``,!0)],64)),c.onlyClose?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:4,class:`title-bar-right cu-popup-close`,onClick:u[4]||=e=>d(`cancel`)},[(0,t.createVNode)(e.t,{name:`close`,size:`lg`})])):(0,t.createCommentVNode)(``,!0)],34))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return c}});
|