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,188 @@
|
|
|
1
|
+
import { t as e } from "./NumberKeyboard-B_TJXxki.js";
|
|
2
|
+
import { Fragment as t, computed as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, nextTick as l, normalizeClass as u, onBeforeUnmount as d, onMounted as f, openBlock as p, ref as m, renderList as h, renderSlot as g, toDisplayString as _, vShow as v, watch as y, withDirectives as b } from "vue";
|
|
3
|
+
// src/components/codebox/Codebox.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var x = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "cu-codebox-dot"
|
|
7
|
+
}, S = {
|
|
8
|
+
key: 1,
|
|
9
|
+
class: "cu-codebox-blink"
|
|
10
|
+
}, C = ["maxlength", "value"], w = [
|
|
11
|
+
"type",
|
|
12
|
+
"maxlength",
|
|
13
|
+
"value"
|
|
14
|
+
], T = [
|
|
15
|
+
"value",
|
|
16
|
+
"type",
|
|
17
|
+
"maxlength"
|
|
18
|
+
], E = /* @__PURE__ */ c({
|
|
19
|
+
name: "cu-codebox",
|
|
20
|
+
__name: "Codebox",
|
|
21
|
+
props: {
|
|
22
|
+
modelValue: { default: "" },
|
|
23
|
+
maxlength: { default: 4 },
|
|
24
|
+
autofocus: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: !1
|
|
27
|
+
},
|
|
28
|
+
disabled: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: !1
|
|
31
|
+
},
|
|
32
|
+
justify: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: !1
|
|
35
|
+
},
|
|
36
|
+
mask: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: !1
|
|
39
|
+
},
|
|
40
|
+
closable: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: !0
|
|
43
|
+
},
|
|
44
|
+
system: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: !1
|
|
47
|
+
},
|
|
48
|
+
okText: { default: void 0 },
|
|
49
|
+
disorder: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: !1
|
|
52
|
+
},
|
|
53
|
+
isView: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: !1
|
|
56
|
+
},
|
|
57
|
+
inputType: { default: "tel" },
|
|
58
|
+
isErrorStyle: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: !1
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
emits: [
|
|
64
|
+
"update:modelValue",
|
|
65
|
+
"submit",
|
|
66
|
+
"focus",
|
|
67
|
+
"blur"
|
|
68
|
+
],
|
|
69
|
+
setup(c, { expose: E, emit: D }) {
|
|
70
|
+
let O = c, k = D, A = m(), j = m(), M = m(), N = m(""), P = m(O.autofocus), F = n(() => Math.abs(parseInt(String(O.maxlength), 10)) || 1), I = n(() => Number(O.maxlength));
|
|
71
|
+
y(() => O.modelValue, (e) => {
|
|
72
|
+
e !== N.value && (N.value = e);
|
|
73
|
+
}, { immediate: !0 }), f(() => {
|
|
74
|
+
O.closable && document.addEventListener("click", L), !O.system && !O.isView && M.value?.$el && document.body.appendChild(M.value.$el);
|
|
75
|
+
}), d(() => {
|
|
76
|
+
O.closable && document.removeEventListener("click", L), P.value && U(), !O.system && !O.isView && M.value?.$el && M.value.$el.parentNode && M.value.$el.parentNode.removeChild(M.value.$el);
|
|
77
|
+
});
|
|
78
|
+
function L(e) {
|
|
79
|
+
A.value && !A.value.contains(e.target) && (P.value = !1);
|
|
80
|
+
}
|
|
81
|
+
function R(e) {
|
|
82
|
+
let t = e.target.value;
|
|
83
|
+
(I.value <= 0 || t.length <= I.value) && (N.value = t), N.value.length === I.value && k("submit", N.value), k("update:modelValue", N.value);
|
|
84
|
+
}
|
|
85
|
+
function z(e) {
|
|
86
|
+
e.preventDefault(), k("submit", N.value);
|
|
87
|
+
}
|
|
88
|
+
function B(e) {
|
|
89
|
+
(I.value <= 0 || N.value.length < I.value) && e !== "." && (N.value += e), N.value.length === I.value && l(() => {
|
|
90
|
+
k("submit", N.value);
|
|
91
|
+
}), k("update:modelValue", N.value);
|
|
92
|
+
}
|
|
93
|
+
function V() {
|
|
94
|
+
N.value = N.value.slice(0, N.value.length - 1), k("update:modelValue", N.value);
|
|
95
|
+
}
|
|
96
|
+
function H() {
|
|
97
|
+
k("submit", N.value);
|
|
98
|
+
}
|
|
99
|
+
function U() {
|
|
100
|
+
P.value = !1, O.system && j.value?.blur();
|
|
101
|
+
}
|
|
102
|
+
function W() {
|
|
103
|
+
O.disabled || (P.value = !0, O.system && j.value?.focus());
|
|
104
|
+
}
|
|
105
|
+
function G() {
|
|
106
|
+
k("blur");
|
|
107
|
+
}
|
|
108
|
+
function K() {
|
|
109
|
+
k("focus");
|
|
110
|
+
}
|
|
111
|
+
return E({
|
|
112
|
+
focus: W,
|
|
113
|
+
blur: U
|
|
114
|
+
}), (n, l) => (p(), i("div", {
|
|
115
|
+
ref_key: "root",
|
|
116
|
+
ref: A,
|
|
117
|
+
class: "cu-codebox-wrapper"
|
|
118
|
+
}, [
|
|
119
|
+
a("div", {
|
|
120
|
+
class: u(["cu-codebox", {
|
|
121
|
+
"is-disabled": c.disabled,
|
|
122
|
+
"is-justify": c.justify
|
|
123
|
+
}]),
|
|
124
|
+
onClick: W
|
|
125
|
+
}, [Number(c.maxlength) > 0 ? (p(!0), i(t, { key: 0 }, h(F.value, (e) => (p(), i("span", {
|
|
126
|
+
key: e,
|
|
127
|
+
class: u([
|
|
128
|
+
"cu-codebox-box",
|
|
129
|
+
e === N.value.length + 1 && P.value && "is-active",
|
|
130
|
+
N.value.charAt(e - 1) !== "" && "is-filled",
|
|
131
|
+
c.isErrorStyle && "is-error"
|
|
132
|
+
])
|
|
133
|
+
}, [N.value.charAt(e - 1) ? (p(), i(t, { key: 0 }, [c.mask ? (p(), i("i", x)) : (p(), i(t, { key: 1 }, [o(_(N.value.charAt(e - 1)), 1)], 64))], 64)) : r("", !0), e === N.value.length + 1 && P.value ? (p(), i("i", S)) : r("", !0)], 2))), 128)) : (p(), i(t, { key: 1 }, [c.mask ? (p(), i("input", {
|
|
134
|
+
key: 0,
|
|
135
|
+
type: "password",
|
|
136
|
+
maxlength: c.maxlength,
|
|
137
|
+
value: N.value,
|
|
138
|
+
readonly: "",
|
|
139
|
+
disabled: "",
|
|
140
|
+
class: u(["cu-codebox-holder", P.value && "is-active"])
|
|
141
|
+
}, null, 10, C)) : (p(), i("input", {
|
|
142
|
+
key: 1,
|
|
143
|
+
type: c.inputType,
|
|
144
|
+
maxlength: c.maxlength,
|
|
145
|
+
value: N.value,
|
|
146
|
+
readonly: "",
|
|
147
|
+
disabled: "",
|
|
148
|
+
class: u(["cu-codebox-holder", P.value && "is-active"])
|
|
149
|
+
}, null, 10, w))], 64))], 2),
|
|
150
|
+
g(n.$slots, "default"),
|
|
151
|
+
b(a("form", {
|
|
152
|
+
action: "",
|
|
153
|
+
onSubmit: z
|
|
154
|
+
}, [a("input", {
|
|
155
|
+
ref_key: "input",
|
|
156
|
+
ref: j,
|
|
157
|
+
value: N.value,
|
|
158
|
+
type: c.inputType,
|
|
159
|
+
maxlength: c.maxlength,
|
|
160
|
+
class: "cu-codebox-input",
|
|
161
|
+
onInput: R,
|
|
162
|
+
onFocus: K,
|
|
163
|
+
onBlur: G
|
|
164
|
+
}, null, 40, T)], 544), [[v, c.system]]),
|
|
165
|
+
b(s(e, {
|
|
166
|
+
ref_key: "keyboard",
|
|
167
|
+
ref: M,
|
|
168
|
+
class: "cu-codebox-keyboard",
|
|
169
|
+
type: Number(c.maxlength) > 0 ? "simple" : "professional",
|
|
170
|
+
"ok-text": c.okText,
|
|
171
|
+
disorder: c.disorder,
|
|
172
|
+
"is-view": c.isView,
|
|
173
|
+
"model-value": P.value,
|
|
174
|
+
"onUpdate:modelValue": l[0] ||= (e) => P.value = e,
|
|
175
|
+
onDelete: V,
|
|
176
|
+
onEnter: B,
|
|
177
|
+
onConfirm: H
|
|
178
|
+
}, null, 8, [
|
|
179
|
+
"type",
|
|
180
|
+
"ok-text",
|
|
181
|
+
"disorder",
|
|
182
|
+
"is-view",
|
|
183
|
+
"model-value"
|
|
184
|
+
]), [[v, !c.system]])
|
|
185
|
+
], 512));
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
export { E as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./NumberKeyboard-BWpxsbYt.cjs");let t=require("vue");var n={key:0,class:`cu-codebox-dot`},r={key:1,class:`cu-codebox-blink`},i=[`maxlength`,`value`],a=[`type`,`maxlength`,`value`],o=[`value`,`type`,`maxlength`],s=(0,t.defineComponent)({name:`cu-codebox`,__name:`Codebox`,props:{modelValue:{default:``},maxlength:{default:4},autofocus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},justify:{type:Boolean,default:!1},mask:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},system:{type:Boolean,default:!1},okText:{default:void 0},disorder:{type:Boolean,default:!1},isView:{type:Boolean,default:!1},inputType:{default:`tel`},isErrorStyle:{type:Boolean,default:!1}},emits:[`update:modelValue`,`submit`,`focus`,`blur`],setup(s,{expose:c,emit:l}){let u=s,d=l,f=(0,t.ref)(),p=(0,t.ref)(),m=(0,t.ref)(),h=(0,t.ref)(``),g=(0,t.ref)(u.autofocus),_=(0,t.computed)(()=>Math.abs(parseInt(String(u.maxlength),10))||1),v=(0,t.computed)(()=>Number(u.maxlength));(0,t.watch)(()=>u.modelValue,e=>{e!==h.value&&(h.value=e)},{immediate:!0}),(0,t.onMounted)(()=>{u.closable&&document.addEventListener(`click`,y),!u.system&&!u.isView&&m.value?.$el&&document.body.appendChild(m.value.$el)}),(0,t.onBeforeUnmount)(()=>{u.closable&&document.removeEventListener(`click`,y),g.value&&T(),!u.system&&!u.isView&&m.value?.$el&&m.value.$el.parentNode&&m.value.$el.parentNode.removeChild(m.value.$el)});function y(e){f.value&&!f.value.contains(e.target)&&(g.value=!1)}function b(e){let t=e.target.value;(v.value<=0||t.length<=v.value)&&(h.value=t),h.value.length===v.value&&d(`submit`,h.value),d(`update:modelValue`,h.value)}function x(e){e.preventDefault(),d(`submit`,h.value)}function S(e){(v.value<=0||h.value.length<v.value)&&e!==`.`&&(h.value+=e),h.value.length===v.value&&(0,t.nextTick)(()=>{d(`submit`,h.value)}),d(`update:modelValue`,h.value)}function C(){h.value=h.value.slice(0,h.value.length-1),d(`update:modelValue`,h.value)}function w(){d(`submit`,h.value)}function T(){g.value=!1,u.system&&p.value?.blur()}function E(){u.disabled||(g.value=!0,u.system&&p.value?.focus())}function D(){d(`blur`)}function O(){d(`focus`)}return c({focus:E,blur:T}),(c,l)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{ref_key:`root`,ref:f,class:`cu-codebox-wrapper`},[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`cu-codebox`,{"is-disabled":s.disabled,"is-justify":s.justify}]),onClick:E},[Number(s.maxlength)>0?((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,{key:0},(0,t.renderList)(_.value,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:e,class:(0,t.normalizeClass)([`cu-codebox-box`,e===h.value.length+1&&g.value&&`is-active`,h.value.charAt(e-1)!==``&&`is-filled`,s.isErrorStyle&&`is-error`])},[h.value.charAt(e-1)?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[s.mask?((0,t.openBlock)(),(0,t.createElementBlock)(`i`,n)):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[(0,t.createTextVNode)((0,t.toDisplayString)(h.value.charAt(e-1)),1)],64))],64)):(0,t.createCommentVNode)(``,!0),e===h.value.length+1&&g.value?((0,t.openBlock)(),(0,t.createElementBlock)(`i`,r)):(0,t.createCommentVNode)(``,!0)],2))),128)):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[s.mask?((0,t.openBlock)(),(0,t.createElementBlock)(`input`,{key:0,type:`password`,maxlength:s.maxlength,value:h.value,readonly:``,disabled:``,class:(0,t.normalizeClass)([`cu-codebox-holder`,g.value&&`is-active`])},null,10,i)):((0,t.openBlock)(),(0,t.createElementBlock)(`input`,{key:1,type:s.inputType,maxlength:s.maxlength,value:h.value,readonly:``,disabled:``,class:(0,t.normalizeClass)([`cu-codebox-holder`,g.value&&`is-active`])},null,10,a))],64))],2),(0,t.renderSlot)(c.$slots,`default`),(0,t.withDirectives)((0,t.createElementVNode)(`form`,{action:``,onSubmit:x},[(0,t.createElementVNode)(`input`,{ref_key:`input`,ref:p,value:h.value,type:s.inputType,maxlength:s.maxlength,class:`cu-codebox-input`,onInput:b,onFocus:O,onBlur:D},null,40,o)],544),[[t.vShow,s.system]]),(0,t.withDirectives)((0,t.createVNode)(e.t,{ref_key:`keyboard`,ref:m,class:`cu-codebox-keyboard`,type:Number(s.maxlength)>0?`simple`:`professional`,"ok-text":s.okText,disorder:s.disorder,"is-view":s.isView,"model-value":g.value,"onUpdate:modelValue":l[0]||=e=>g.value=e,onDelete:C,onEnter:S,onConfirm:w},null,8,[`type`,`ok-text`,`disorder`,`is-view`,`model-value`]),[[t.vShow,!s.system]])],512))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return s}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./Picker-BOEGTBaN.cjs");let t=require("vue"),n=require("@centui/core");var r=(0,t.defineComponent)({name:`cu-date-picker`,__name:`DatePicker`,props:{modelValue:{type:Boolean,default:!1},type:{default:`date`},customTypes:{default:void 0},minDate:{default:void 0},maxDate:{default:void 0},defaultDate:{default:void 0},minuteStep:{default:1},unitText:{default:void 0},todayText:{default:void 0},textRender:{type:Function,default:void 0},isView:{type:Boolean,default:!1},title:{default:``},describe:{default:``},okText:{default:void 0},cancelText:{default:void 0},maskClosable:{type:Boolean,default:!0},lineHeight:{default:void 0},keepIndex:{type:Boolean,default:!1},largeRadius:{type:Boolean,default:!1}},emits:[`update:modelValue`,`initialed`,`change`,`confirm`,`cancel`,`show`,`hide`],setup(r,{expose:i,emit:a}){let o=r,s=a,c=(0,t.ref)(),l=(0,t.ref)([]),u=(0,t.ref)([]),d=(0,t.ref)([]),f=(0,t.ref)(null);function p(){return{type:o.type,customTypes:o.customTypes,minDate:o.minDate,maxDate:o.maxDate,defaultDate:o.defaultDate,minuteStep:o.minuteStep,unitText:o.unitText,todayText:o.todayText,textRender:o.textRender}}(0,t.watch)(()=>[o.type,o.minDate,o.maxDate,o.defaultDate,o.minuteStep],()=>{m()}),(0,t.onMounted)(()=>{m()});function m(){let{generators:e,defaults:t,columns:r}=(0,n.buildDateColumns)(p());d.value=e,u.value=t,l.value=r,c.value?.refresh()}function h(e,t=[]){let r=l.value,i=d.value;for(let a=e,o=i.length;a<o;a++){let e=[],o=i[a];for(let o=0;o<a;o++){let a=i[o];if(t[o]&&a){e.push({type:a.type,value:t[o]});continue}let s=c.value?.getColumnIndex(o)??0;if(r[o]){let t=g(o,s);e.push(t??``)}else e.push(``),(0,n.warn)(`DatePicker columnData of index ${o} is void`)}let s=o?o(...e):[];l.value[a]=s}}function g(e,t){return(c.value?.getColumnValues()??[])[e]}function _(){s(`initialed`)}function v(e,t,n){s(`change`,e,t,n),e<l.value.length-1&&h(e+1)}function y(e){s(`confirm`,e)}function b(){s(`cancel`),setTimeout(()=>{f.value&&(l.value=[...f.value],c.value?.refresh())})}function x(){f.value=[...l.value],s(`show`)}function S(){s(`hide`)}function C(e=`yyyy-MM-dd hh:mm`){return(0,n.formatDate)(c.value?.getColumnValues()??[],e)}return i({getFormatDate:C}),(n,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`cu-date-picker`,[r.type]])},[(0,t.createVNode)(e.t,{ref_key:`picker`,ref:c,"model-value":r.modelValue,"is-view":r.isView,title:r.title,describe:r.describe,"ok-text":r.okText,"cancel-text":r.cancelText,"mask-closable":r.maskClosable,"line-height":r.lineHeight,"keep-index":r.keepIndex,"large-radius":r.largeRadius,data:l.value,cols:l.value.length,"default-value":u.value,"onUpdate:modelValue":i[0]||=e=>s(`update:modelValue`,e),onInitialed:_,onChange:v,onConfirm:y,onCancel:b,onShow:x,onHide:S},null,8,[`model-value`,`is-view`,`title`,`describe`,`ok-text`,`cancel-text`,`mask-closable`,`line-height`,`keep-index`,`large-radius`,`data`,`cols`,`default-value`])],2))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return r}});
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { t as e } from "./Picker-CA-JQ_OC.js";
|
|
2
|
+
import { createElementBlock as t, createVNode as n, defineComponent as r, normalizeClass as i, onMounted as a, openBlock as o, ref as s, watch as c } from "vue";
|
|
3
|
+
import { buildDateColumns as l, formatDate as u, warn as d } from "@centui/core";
|
|
4
|
+
// src/components/date-picker/DatePicker.vue
|
|
5
|
+
var f = /* @__PURE__ */ r({
|
|
6
|
+
name: "cu-date-picker",
|
|
7
|
+
__name: "DatePicker",
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: !1
|
|
12
|
+
},
|
|
13
|
+
type: { default: "date" },
|
|
14
|
+
customTypes: { default: void 0 },
|
|
15
|
+
minDate: { default: void 0 },
|
|
16
|
+
maxDate: { default: void 0 },
|
|
17
|
+
defaultDate: { default: void 0 },
|
|
18
|
+
minuteStep: { default: 1 },
|
|
19
|
+
unitText: { default: void 0 },
|
|
20
|
+
todayText: { default: void 0 },
|
|
21
|
+
textRender: {
|
|
22
|
+
type: Function,
|
|
23
|
+
default: void 0
|
|
24
|
+
},
|
|
25
|
+
isView: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: !1
|
|
28
|
+
},
|
|
29
|
+
title: { default: "" },
|
|
30
|
+
describe: { default: "" },
|
|
31
|
+
okText: { default: void 0 },
|
|
32
|
+
cancelText: { default: void 0 },
|
|
33
|
+
maskClosable: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: !0
|
|
36
|
+
},
|
|
37
|
+
lineHeight: { default: void 0 },
|
|
38
|
+
keepIndex: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: !1
|
|
41
|
+
},
|
|
42
|
+
largeRadius: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: !1
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
emits: [
|
|
48
|
+
"update:modelValue",
|
|
49
|
+
"initialed",
|
|
50
|
+
"change",
|
|
51
|
+
"confirm",
|
|
52
|
+
"cancel",
|
|
53
|
+
"show",
|
|
54
|
+
"hide"
|
|
55
|
+
],
|
|
56
|
+
setup(r, { expose: f, emit: p }) {
|
|
57
|
+
let m = r, h = p, g = s(), _ = s([]), v = s([]), y = s([]), b = s(null);
|
|
58
|
+
function x() {
|
|
59
|
+
return {
|
|
60
|
+
type: m.type,
|
|
61
|
+
customTypes: m.customTypes,
|
|
62
|
+
minDate: m.minDate,
|
|
63
|
+
maxDate: m.maxDate,
|
|
64
|
+
defaultDate: m.defaultDate,
|
|
65
|
+
minuteStep: m.minuteStep,
|
|
66
|
+
unitText: m.unitText,
|
|
67
|
+
todayText: m.todayText,
|
|
68
|
+
textRender: m.textRender
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
c(() => [
|
|
72
|
+
m.type,
|
|
73
|
+
m.minDate,
|
|
74
|
+
m.maxDate,
|
|
75
|
+
m.defaultDate,
|
|
76
|
+
m.minuteStep
|
|
77
|
+
], () => {
|
|
78
|
+
S();
|
|
79
|
+
}), a(() => {
|
|
80
|
+
S();
|
|
81
|
+
});
|
|
82
|
+
function S() {
|
|
83
|
+
let { generators: e, defaults: t, columns: n } = l(x());
|
|
84
|
+
y.value = e, v.value = t, _.value = n, g.value?.refresh();
|
|
85
|
+
}
|
|
86
|
+
function C(e, t = []) {
|
|
87
|
+
let n = _.value, r = y.value;
|
|
88
|
+
for (let i = e, a = r.length; i < a; i++) {
|
|
89
|
+
let e = [], a = r[i];
|
|
90
|
+
for (let a = 0; a < i; a++) {
|
|
91
|
+
let i = r[a];
|
|
92
|
+
if (t[a] && i) {
|
|
93
|
+
e.push({
|
|
94
|
+
type: i.type,
|
|
95
|
+
value: t[a]
|
|
96
|
+
});
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
let o = g.value?.getColumnIndex(a) ?? 0;
|
|
100
|
+
if (n[a]) {
|
|
101
|
+
let t = w(a, o);
|
|
102
|
+
e.push(t ?? "");
|
|
103
|
+
} else e.push(""), d(`DatePicker columnData of index ${a} is void`);
|
|
104
|
+
}
|
|
105
|
+
let o = a ? a(...e) : [];
|
|
106
|
+
_.value[i] = o;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
function w(e, t) {
|
|
110
|
+
return (g.value?.getColumnValues() ?? [])[e];
|
|
111
|
+
}
|
|
112
|
+
function T() {
|
|
113
|
+
h("initialed");
|
|
114
|
+
}
|
|
115
|
+
function E(e, t, n) {
|
|
116
|
+
h("change", e, t, n), e < _.value.length - 1 && C(e + 1);
|
|
117
|
+
}
|
|
118
|
+
function D(e) {
|
|
119
|
+
h("confirm", e);
|
|
120
|
+
}
|
|
121
|
+
function O() {
|
|
122
|
+
h("cancel"), setTimeout(() => {
|
|
123
|
+
b.value && (_.value = [...b.value], g.value?.refresh());
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
function k() {
|
|
127
|
+
b.value = [..._.value], h("show");
|
|
128
|
+
}
|
|
129
|
+
function A() {
|
|
130
|
+
h("hide");
|
|
131
|
+
}
|
|
132
|
+
function j(e = "yyyy-MM-dd hh:mm") {
|
|
133
|
+
return u(g.value?.getColumnValues() ?? [], e);
|
|
134
|
+
}
|
|
135
|
+
return f({ getFormatDate: j }), (a, s) => (o(), t("div", { class: i(["cu-date-picker", [r.type]]) }, [n(e, {
|
|
136
|
+
ref_key: "picker",
|
|
137
|
+
ref: g,
|
|
138
|
+
"model-value": r.modelValue,
|
|
139
|
+
"is-view": r.isView,
|
|
140
|
+
title: r.title,
|
|
141
|
+
describe: r.describe,
|
|
142
|
+
"ok-text": r.okText,
|
|
143
|
+
"cancel-text": r.cancelText,
|
|
144
|
+
"mask-closable": r.maskClosable,
|
|
145
|
+
"line-height": r.lineHeight,
|
|
146
|
+
"keep-index": r.keepIndex,
|
|
147
|
+
"large-radius": r.largeRadius,
|
|
148
|
+
data: _.value,
|
|
149
|
+
cols: _.value.length,
|
|
150
|
+
"default-value": v.value,
|
|
151
|
+
"onUpdate:modelValue": s[0] ||= (e) => h("update:modelValue", e),
|
|
152
|
+
onInitialed: T,
|
|
153
|
+
onChange: E,
|
|
154
|
+
onConfirm: D,
|
|
155
|
+
onCancel: O,
|
|
156
|
+
onShow: k,
|
|
157
|
+
onHide: A
|
|
158
|
+
}, null, 8, [
|
|
159
|
+
"model-value",
|
|
160
|
+
"is-view",
|
|
161
|
+
"title",
|
|
162
|
+
"describe",
|
|
163
|
+
"ok-text",
|
|
164
|
+
"cancel-text",
|
|
165
|
+
"mask-closable",
|
|
166
|
+
"line-height",
|
|
167
|
+
"keep-index",
|
|
168
|
+
"large-radius",
|
|
169
|
+
"data",
|
|
170
|
+
"cols",
|
|
171
|
+
"default-value"
|
|
172
|
+
])], 2));
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
export { f as t };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createElementBlock as e, createElementVNode as t, createTextVNode as n, defineComponent as r, normalizeClass as i, openBlock as a, renderSlot as o, toDisplayString as s } from "vue";
|
|
2
|
+
// src/components/detail-item/DetailItem.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var c = ["textContent"], l = { class: "cu-detail-content" }, u = /* @__PURE__ */ r({
|
|
4
|
+
name: "cu-detail-item",
|
|
5
|
+
__name: "DetailItem",
|
|
6
|
+
props: {
|
|
7
|
+
title: { default: "" },
|
|
8
|
+
content: { default: "" },
|
|
9
|
+
bold: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: !1
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
setup(r) {
|
|
15
|
+
return (u, d) => (a(), e("div", { class: i(["cu-detail-item", { "is-bold": r.bold }]) }, [t("div", {
|
|
16
|
+
class: "cu-detail-title",
|
|
17
|
+
textContent: s(r.title)
|
|
18
|
+
}, null, 8, c), t("div", l, [o(u.$slots, "default", {}, () => [n(s(r.content), 1)])])], 2));
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
export { u as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=require("vue");var t=[`textContent`],n={class:`cu-detail-content`},r=(0,e.defineComponent)({name:`cu-detail-item`,__name:`DetailItem`,props:{title:{default:``},content:{default:``},bold:{type:Boolean,default:!1}},setup(r){return(i,a)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:(0,e.normalizeClass)([`cu-detail-item`,{"is-bold":r.bold}])},[(0,e.createElementVNode)(`div`,{class:`cu-detail-title`,textContent:(0,e.toDisplayString)(r.title)},null,8,t),(0,e.createElementVNode)(`div`,n,[(0,e.renderSlot)(i.$slots,`default`,{},()=>[(0,e.createTextVNode)((0,e.toDisplayString)(r.content),1)])])],2))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return r}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./Popup-Ca1jPi0t.cjs"),t=require("./Icon-83WWqE5z.cjs"),n=require("./Roller-DALhjhfg.cjs");let r=require("vue");var i={class:`cu-dialog-content`},a={class:`cu-dialog-body`},o={key:1,class:`cu-dialog-icon`},s=[`textContent`],c=[`innerHTML`],l=[`onClick`],u=(0,r.defineComponent)({name:`cu-dialog`,__name:`Dialog`,props:{modelValue:{type:Boolean,default:!1},title:{default:``},icon:{default:``},iconSvg:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},content:{default:``},btns:{default:()=>[]},layout:{default:`row`},appendTo:{type:[null,Boolean],default:void 0},hasMask:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!1},transition:{default:`cu-fade`},preventScroll:{type:Boolean,default:!1},preventScrollExclude:{default:``}},emits:[`update:modelValue`,`show`,`hide`],setup(u,{expose:d,emit:f}){let p=u,m=f,h=(0,r.ref)(),g=p.appendTo===!1?null:p.appendTo??(typeof document<`u`?document.body:null);(0,r.onMounted)(()=>{g&&g.appendChild(h.value)}),(0,r.onBeforeUnmount)(()=>{g&&h.value&&h.value.parentNode===g&&g.removeChild(h.value)});function _(e){m(`update:modelValue`,e)}function v(){m(`show`)}function y(){m(`hide`)}function b(e){e.disabled||e.loading||(typeof e.handler==`function`?e.handler.call(null,e):x())}function x(){m(`update:modelValue`,!1)}return d({close:x}),(d,f)=>((0,r.openBlock)(),(0,r.createElementBlock)(`div`,{ref_key:`root`,ref:h,class:`cu-dialog`,role:`dialog`,"aria-modal":`true`},[(0,r.createVNode)(e.t,{"model-value":u.modelValue,"has-mask":u.hasMask,"mask-closable":u.maskClosable,position:`center`,transition:u.transition,"prevent-scroll":u.preventScroll,"prevent-scroll-exclude":u.preventScrollExclude,"onUpdate:modelValue":_,onShow:v,onHide:y},{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)(`div`,i,[(0,r.renderSlot)(d.$slots,`header`),(0,r.createElementVNode)(`div`,a,[u.closable?((0,r.openBlock)(),(0,r.createElementBlock)(`a`,{key:0,role:`button`,class:`cu-dialog-close`,onClick:x},[(0,r.createVNode)(t.t,{name:`close`})])):(0,r.createCommentVNode)(``,!0),u.icon?((0,r.openBlock)(),(0,r.createElementBlock)(`div`,o,[(0,r.createVNode)(t.t,{name:u.icon,svg:u.iconSvg},null,8,[`name`,`svg`])])):(0,r.createCommentVNode)(``,!0),u.title?((0,r.openBlock)(),(0,r.createElementBlock)(`h2`,{key:2,class:`cu-dialog-title`,textContent:(0,r.toDisplayString)(u.title)},null,8,s)):(0,r.createCommentVNode)(``,!0),(0,r.renderSlot)(d.$slots,`default`,{},()=>[(0,r.createElementVNode)(`div`,{class:`cu-dialog-text`,innerHTML:u.content},null,8,c)])]),(0,r.createElementVNode)(`footer`,{class:(0,r.normalizeClass)([`cu-dialog-actions`,{"is-column":u.layout===`column`}])},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(u.btns,(e,i)=>((0,r.openBlock)(),(0,r.createElementBlock)(`a`,{key:i,role:`button`,class:(0,r.normalizeClass)([`cu-dialog-btn`,{disabled:!!e.disabled,warning:!e.disabled&&!!e.warning}]),onClick:t=>b(e),onTouchmove:f[0]||=(0,r.withModifiers)(()=>{},[`prevent`])},[e.loading?((0,r.openBlock)(),(0,r.createBlock)(n.t,{key:0,class:`cu-dialog-btn-loading`})):e.icon?((0,r.openBlock)(),(0,r.createBlock)(t.t,{key:1,class:`cu-dialog-btn-icon`,name:e.icon,svg:e.iconSvg,size:`md`},null,8,[`name`,`svg`])):(0,r.createCommentVNode)(``,!0),(0,r.createTextVNode)(` `+(0,r.toDisplayString)(e.text),1)],42,l))),128))],2)])]),_:3},8,[`model-value`,`has-mask`,`mask-closable`,`transition`,`prevent-scroll`,`prevent-scroll-exclude`])],512))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return u}});
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { t as e } from "./Popup-qLk-BsRS.js";
|
|
2
|
+
import { t } from "./Icon-BgCtu0ZV.js";
|
|
3
|
+
import { t as n } from "./Roller-BznN57fL.js";
|
|
4
|
+
import { Fragment as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, normalizeClass as d, onBeforeUnmount as f, onMounted as p, openBlock as m, ref as h, renderList as g, renderSlot as _, toDisplayString as v, withCtx as y, withModifiers as b } from "vue";
|
|
5
|
+
// src/components/dialog/Dialog.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var x = { class: "cu-dialog-content" }, S = { class: "cu-dialog-body" }, C = {
|
|
7
|
+
key: 1,
|
|
8
|
+
class: "cu-dialog-icon"
|
|
9
|
+
}, w = ["textContent"], T = ["innerHTML"], E = ["onClick"], D = /* @__PURE__ */ u({
|
|
10
|
+
name: "cu-dialog",
|
|
11
|
+
__name: "Dialog",
|
|
12
|
+
props: {
|
|
13
|
+
modelValue: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: !1
|
|
16
|
+
},
|
|
17
|
+
title: { default: "" },
|
|
18
|
+
icon: { default: "" },
|
|
19
|
+
iconSvg: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: !1
|
|
22
|
+
},
|
|
23
|
+
closable: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: !0
|
|
26
|
+
},
|
|
27
|
+
content: { default: "" },
|
|
28
|
+
btns: { default: () => [] },
|
|
29
|
+
layout: { default: "row" },
|
|
30
|
+
appendTo: {
|
|
31
|
+
type: [null, Boolean],
|
|
32
|
+
default: void 0
|
|
33
|
+
},
|
|
34
|
+
hasMask: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: !0
|
|
37
|
+
},
|
|
38
|
+
maskClosable: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: !1
|
|
41
|
+
},
|
|
42
|
+
transition: { default: "cu-fade" },
|
|
43
|
+
preventScroll: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: !1
|
|
46
|
+
},
|
|
47
|
+
preventScrollExclude: { default: "" }
|
|
48
|
+
},
|
|
49
|
+
emits: [
|
|
50
|
+
"update:modelValue",
|
|
51
|
+
"show",
|
|
52
|
+
"hide"
|
|
53
|
+
],
|
|
54
|
+
setup(u, { expose: D, emit: O }) {
|
|
55
|
+
let k = u, A = O, j = h(), M = k.appendTo === !1 ? null : k.appendTo ?? (typeof document < "u" ? document.body : null);
|
|
56
|
+
p(() => {
|
|
57
|
+
M && M.appendChild(j.value);
|
|
58
|
+
}), f(() => {
|
|
59
|
+
M && j.value && j.value.parentNode === M && M.removeChild(j.value);
|
|
60
|
+
});
|
|
61
|
+
function N(e) {
|
|
62
|
+
A("update:modelValue", e);
|
|
63
|
+
}
|
|
64
|
+
function P() {
|
|
65
|
+
A("show");
|
|
66
|
+
}
|
|
67
|
+
function F() {
|
|
68
|
+
A("hide");
|
|
69
|
+
}
|
|
70
|
+
function I(e) {
|
|
71
|
+
e.disabled || e.loading || (typeof e.handler == "function" ? e.handler.call(null, e) : L());
|
|
72
|
+
}
|
|
73
|
+
function L() {
|
|
74
|
+
A("update:modelValue", !1);
|
|
75
|
+
}
|
|
76
|
+
return D({ close: L }), (f, p) => (m(), o("div", {
|
|
77
|
+
ref_key: "root",
|
|
78
|
+
ref: j,
|
|
79
|
+
class: "cu-dialog",
|
|
80
|
+
role: "dialog",
|
|
81
|
+
"aria-modal": "true"
|
|
82
|
+
}, [l(e, {
|
|
83
|
+
"model-value": u.modelValue,
|
|
84
|
+
"has-mask": u.hasMask,
|
|
85
|
+
"mask-closable": u.maskClosable,
|
|
86
|
+
position: "center",
|
|
87
|
+
transition: u.transition,
|
|
88
|
+
"prevent-scroll": u.preventScroll,
|
|
89
|
+
"prevent-scroll-exclude": u.preventScrollExclude,
|
|
90
|
+
"onUpdate:modelValue": N,
|
|
91
|
+
onShow: P,
|
|
92
|
+
onHide: F
|
|
93
|
+
}, {
|
|
94
|
+
default: y(() => [s("div", x, [
|
|
95
|
+
_(f.$slots, "header"),
|
|
96
|
+
s("div", S, [
|
|
97
|
+
u.closable ? (m(), o("a", {
|
|
98
|
+
key: 0,
|
|
99
|
+
role: "button",
|
|
100
|
+
class: "cu-dialog-close",
|
|
101
|
+
onClick: L
|
|
102
|
+
}, [l(t, { name: "close" })])) : a("", !0),
|
|
103
|
+
u.icon ? (m(), o("div", C, [l(t, {
|
|
104
|
+
name: u.icon,
|
|
105
|
+
svg: u.iconSvg
|
|
106
|
+
}, null, 8, ["name", "svg"])])) : a("", !0),
|
|
107
|
+
u.title ? (m(), o("h2", {
|
|
108
|
+
key: 2,
|
|
109
|
+
class: "cu-dialog-title",
|
|
110
|
+
textContent: v(u.title)
|
|
111
|
+
}, null, 8, w)) : a("", !0),
|
|
112
|
+
_(f.$slots, "default", {}, () => [s("div", {
|
|
113
|
+
class: "cu-dialog-text",
|
|
114
|
+
innerHTML: u.content
|
|
115
|
+
}, null, 8, T)])
|
|
116
|
+
]),
|
|
117
|
+
s("footer", { class: d(["cu-dialog-actions", { "is-column": u.layout === "column" }]) }, [(m(!0), o(r, null, g(u.btns, (e, r) => (m(), o("a", {
|
|
118
|
+
key: r,
|
|
119
|
+
role: "button",
|
|
120
|
+
class: d(["cu-dialog-btn", {
|
|
121
|
+
disabled: !!e.disabled,
|
|
122
|
+
warning: !e.disabled && !!e.warning
|
|
123
|
+
}]),
|
|
124
|
+
onClick: (t) => I(e),
|
|
125
|
+
onTouchmove: p[0] ||= b(() => {}, ["prevent"])
|
|
126
|
+
}, [e.loading ? (m(), i(n, {
|
|
127
|
+
key: 0,
|
|
128
|
+
class: "cu-dialog-btn-loading"
|
|
129
|
+
})) : e.icon ? (m(), i(t, {
|
|
130
|
+
key: 1,
|
|
131
|
+
class: "cu-dialog-btn-icon",
|
|
132
|
+
name: e.icon,
|
|
133
|
+
svg: e.iconSvg,
|
|
134
|
+
size: "md"
|
|
135
|
+
}, null, 8, ["name", "svg"])) : a("", !0), c(" " + v(e.text), 1)], 42, E))), 128))], 2)
|
|
136
|
+
])]),
|
|
137
|
+
_: 3
|
|
138
|
+
}, 8, [
|
|
139
|
+
"model-value",
|
|
140
|
+
"has-mask",
|
|
141
|
+
"mask-closable",
|
|
142
|
+
"transition",
|
|
143
|
+
"prevent-scroll",
|
|
144
|
+
"prevent-scroll-exclude"
|
|
145
|
+
])], 512));
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
export { D as t };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { t as e } from "./Popup-qLk-BsRS.js";
|
|
2
|
+
import { t } from "./RadioList-DNGsEzgf.js";
|
|
3
|
+
import { Fragment as n, computed as r, createElementBlock as i, createElementVNode as a, createSlots as o, createVNode as s, defineComponent as c, normalizeClass as l, onMounted as u, openBlock as d, ref as f, renderList as p, renderSlot as m, toDisplayString as h, useSlots as g, watch as _, withCtx as v } from "vue";
|
|
4
|
+
// src/components/drop-menu/DropMenu.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var y = { class: "cu-drop-menu" }, b = { class: "cu-drop-menu-bar" }, x = ["onClick"], S = ["textContent"], C = { class: "cu-drop-menu-list" }, w = /* @__PURE__ */ c({
|
|
6
|
+
name: "cu-drop-menu",
|
|
7
|
+
__name: "DropMenu",
|
|
8
|
+
props: {
|
|
9
|
+
data: { default: () => [] },
|
|
10
|
+
defaultValue: { default: () => [] }
|
|
11
|
+
},
|
|
12
|
+
emits: [
|
|
13
|
+
"change",
|
|
14
|
+
"show",
|
|
15
|
+
"hide"
|
|
16
|
+
],
|
|
17
|
+
setup(c, { expose: w, emit: T }) {
|
|
18
|
+
let E = c, D = T, O = g(), k = f(!1), A = f([]), j = f([]), M = f(-1), N = f(""), P = r(() => {
|
|
19
|
+
let e = O.default;
|
|
20
|
+
return e ? e({ option: {} }).some((e) => e.type !== Comment) : !1;
|
|
21
|
+
}), F = r(() => M.value < 0 || !E.data[M.value] ? [] : E.data[M.value].options ?? []);
|
|
22
|
+
_(() => E.data, (e, t) => {
|
|
23
|
+
JSON.stringify(e) !== JSON.stringify(t) && I();
|
|
24
|
+
}), _(() => E.defaultValue, (e, t) => {
|
|
25
|
+
JSON.stringify(e) !== JSON.stringify(t) && I();
|
|
26
|
+
}), u(() => {
|
|
27
|
+
I();
|
|
28
|
+
});
|
|
29
|
+
function I() {
|
|
30
|
+
j.value = E.defaultValue;
|
|
31
|
+
let e = (t, n, r) => {
|
|
32
|
+
t && t.forEach((t) => {
|
|
33
|
+
let i = r[0], a = E.defaultValue[i], o = t;
|
|
34
|
+
a !== void 0 && (o.value === a || o.text === a || o.label === a) ? A.value[i] = o : n > 0 && e(o.options ?? void 0, n, r);
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
E.data.forEach((t, n) => {
|
|
38
|
+
e(t.options ?? [], 0, [n]);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function L(e) {
|
|
42
|
+
return !!(A.value[e] !== void 0 || E.defaultValue[e]);
|
|
43
|
+
}
|
|
44
|
+
function R(e, t) {
|
|
45
|
+
let n = A.value[t];
|
|
46
|
+
return n === void 0 ? e.text : String(n.text ?? "");
|
|
47
|
+
}
|
|
48
|
+
function z(e, t) {
|
|
49
|
+
e && !e.disabled && (k.value ? k.value = !1 : (k.value = !0, M.value = t));
|
|
50
|
+
}
|
|
51
|
+
function B(e) {
|
|
52
|
+
let t = M.value, n = E.data[t];
|
|
53
|
+
k.value = !1, j.value[t] = e.value, A.value[t] = e, D("change", n, e);
|
|
54
|
+
}
|
|
55
|
+
return w({
|
|
56
|
+
getSelectedValues: () => A.value,
|
|
57
|
+
getSelectedValue: (e) => A.value[e]
|
|
58
|
+
}), (r, u) => (d(), i("div", y, [a("div", b, [(d(!0), i(n, null, p(c.data, (e, t) => (d(), i("div", {
|
|
59
|
+
key: t,
|
|
60
|
+
class: l(["bar-item", {
|
|
61
|
+
active: t === M.value,
|
|
62
|
+
selected: L(t),
|
|
63
|
+
disabled: e.disabled
|
|
64
|
+
}]),
|
|
65
|
+
onClick: (n) => z(e, t)
|
|
66
|
+
}, [a("span", { textContent: h(R(e, t)) }, null, 8, S)], 10, x))), 128))]), s(e, {
|
|
67
|
+
modelValue: k.value,
|
|
68
|
+
"onUpdate:modelValue": u[0] ||= (e) => k.value = e,
|
|
69
|
+
position: "top",
|
|
70
|
+
"prevent-scroll": "",
|
|
71
|
+
"prevent-scroll-exclude": N.value,
|
|
72
|
+
onShow: u[1] ||= (e) => r.$emit("show"),
|
|
73
|
+
onHide: u[2] ||= (e) => r.$emit("hide"),
|
|
74
|
+
onBeforeHide: u[3] ||= (e) => M.value = -1
|
|
75
|
+
}, {
|
|
76
|
+
default: v(() => [a("div", C, [s(t, {
|
|
77
|
+
"model-value": j.value[M.value],
|
|
78
|
+
options: F.value,
|
|
79
|
+
"is-slot-scope": P.value,
|
|
80
|
+
"align-center": "",
|
|
81
|
+
onChange: B
|
|
82
|
+
}, o({ _: 2 }, [P.value ? {
|
|
83
|
+
name: "default",
|
|
84
|
+
fn: v(({ option: e }) => [m(r.$slots, "default", { option: e })]),
|
|
85
|
+
key: "0"
|
|
86
|
+
} : void 0]), 1032, [
|
|
87
|
+
"model-value",
|
|
88
|
+
"options",
|
|
89
|
+
"is-slot-scope"
|
|
90
|
+
])])]),
|
|
91
|
+
_: 3
|
|
92
|
+
}, 8, ["modelValue", "prevent-scroll-exclude"])]));
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
export { w as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./Popup-Ca1jPi0t.cjs"),t=require("./RadioList-D-9PITpr.cjs");let n=require("vue");var r={class:`cu-drop-menu`},i={class:`cu-drop-menu-bar`},a=[`onClick`],o=[`textContent`],s={class:`cu-drop-menu-list`},c=(0,n.defineComponent)({name:`cu-drop-menu`,__name:`DropMenu`,props:{data:{default:()=>[]},defaultValue:{default:()=>[]}},emits:[`change`,`show`,`hide`],setup(c,{expose:l,emit:u}){let d=c,f=u,p=(0,n.useSlots)(),m=(0,n.ref)(!1),h=(0,n.ref)([]),g=(0,n.ref)([]),_=(0,n.ref)(-1),v=(0,n.ref)(``),y=(0,n.computed)(()=>{let e=p.default;return e?e({option:{}}).some(e=>e.type!==Comment):!1}),b=(0,n.computed)(()=>_.value<0||!d.data[_.value]?[]:d.data[_.value].options??[]);(0,n.watch)(()=>d.data,(e,t)=>{JSON.stringify(e)!==JSON.stringify(t)&&x()}),(0,n.watch)(()=>d.defaultValue,(e,t)=>{JSON.stringify(e)!==JSON.stringify(t)&&x()}),(0,n.onMounted)(()=>{x()});function x(){g.value=d.defaultValue;let e=(t,n,r)=>{t&&t.forEach(t=>{let i=r[0],a=d.defaultValue[i],o=t;a!==void 0&&(o.value===a||o.text===a||o.label===a)?h.value[i]=o:n>0&&e(o.options??void 0,n,r)})};d.data.forEach((t,n)=>{e(t.options??[],0,[n])})}function S(e){return!!(h.value[e]!==void 0||d.defaultValue[e])}function C(e,t){let n=h.value[t];return n===void 0?e.text:String(n.text??``)}function w(e,t){e&&!e.disabled&&(m.value?m.value=!1:(m.value=!0,_.value=t))}function T(e){let t=_.value,n=d.data[t];m.value=!1,g.value[t]=e.value,h.value[t]=e,f(`change`,n,e)}return l({getSelectedValues:()=>h.value,getSelectedValue:e=>h.value[e]}),(l,u)=>((0,n.openBlock)(),(0,n.createElementBlock)(`div`,r,[(0,n.createElementVNode)(`div`,i,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(c.data,(e,t)=>((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{key:t,class:(0,n.normalizeClass)([`bar-item`,{active:t===_.value,selected:S(t),disabled:e.disabled}]),onClick:n=>w(e,t)},[(0,n.createElementVNode)(`span`,{textContent:(0,n.toDisplayString)(C(e,t))},null,8,o)],10,a))),128))]),(0,n.createVNode)(e.t,{modelValue:m.value,"onUpdate:modelValue":u[0]||=e=>m.value=e,position:`top`,"prevent-scroll":``,"prevent-scroll-exclude":v.value,onShow:u[1]||=e=>l.$emit(`show`),onHide:u[2]||=e=>l.$emit(`hide`),onBeforeHide:u[3]||=e=>_.value=-1},{default:(0,n.withCtx)(()=>[(0,n.createElementVNode)(`div`,s,[(0,n.createVNode)(t.t,{"model-value":g.value[_.value],options:b.value,"is-slot-scope":y.value,"align-center":``,onChange:T},(0,n.createSlots)({_:2},[y.value?{name:`default`,fn:(0,n.withCtx)(({option:e})=>[(0,n.renderSlot)(l.$slots,`default`,{option:e})]),key:`0`}:void 0]),1032,[`model-value`,`options`,`is-slot-scope`])])]),_:3},8,[`modelValue`,`prevent-scroll-exclude`])]))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return c}});
|