lew-ui 2.3.8 → 2.3.9
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 +21 -21
- package/README.md +46 -33
- package/README.zh-CN.md +48 -35
- package/dist/components/alert/src/LewAlert.vue.d.ts +5 -5
- package/dist/components/avatar/src/LewAvatar.vue.d.ts +12 -12
- package/dist/components/backtop/src/LewBackTop.vue.d.ts +5 -5
- package/dist/components/badge/src/LewBadge.vue.d.ts +4 -4
- package/dist/components/breadcrumb/src/LewBreadcrumb.vue.d.ts +7 -7
- package/dist/components/button/src/LewButton.vue.d.ts +6 -6
- package/dist/components/cascader/src/LewCascader.vue.d.ts +13 -13
- package/dist/components/checkbox/src/LewCheckbox.vue.d.ts +7 -7
- package/dist/components/checkbox/src/LewCheckboxGroup.vue.d.ts +112 -5
- package/dist/components/collapse/src/LewCollapse.vue.d.ts +4 -4
- package/dist/components/collapse/src/LewCollapseItem.vue.d.ts +4 -4
- package/dist/components/date-picker/src/LewDate.vue.d.ts +6 -6
- package/dist/components/date-picker/src/LewDatePicker.vue.d.ts +6 -6
- package/dist/components/date-range-picker/src/LewDateRange.vue.d.ts +12 -8
- package/dist/components/date-range-picker/src/LewDateRangePicker.vue.d.ts +14 -10
- package/dist/components/drawer/src/LewDrawer.vue.d.ts +11 -11
- package/dist/components/dropdown/src/LewDropdown.vue.d.ts +12 -12
- package/dist/components/empty/src/LewEmpty.vue.d.ts +9 -9
- package/dist/components/expand/src/LewExpand.vue.d.ts +4 -4
- package/dist/components/flex/src/LewFlex.vue.d.ts +12 -12
- package/dist/components/form/src/LewForm.vue.d.ts +12 -12
- package/dist/components/form/src/LewFormItem.vue.d.ts +14 -14
- package/dist/components/form/src/LewGetLabelWidth.vue.d.ts +5 -5
- package/dist/components/form/src/RequiredIcon.vue.d.ts +4 -4
- package/dist/components/image/src/LewImage.vue.d.ts +7 -7
- package/dist/components/input/src/LewInput.vue.d.ts +16 -16
- package/dist/components/input-number/src/LewInputNumber.vue.d.ts +9 -9
- package/dist/components/input-table/src/FormModal.vue.d.ts +24 -5
- package/dist/components/input-table/src/props.d.ts +10 -0
- package/dist/components/input-tag/src/LewInputTag.vue.d.ts +7 -7
- package/dist/components/input-tree/src/LewInputTree.vue.d.ts +4 -4
- package/dist/components/magic-number/src/LewMagicNumber.vue.d.ts +4 -4
- package/dist/components/mark/src/LewMark.vue.d.ts +12 -12
- package/dist/components/menu/src/LewMenu.vue.d.ts +5 -5
- package/dist/components/menu-tree/src/LewMenuTree.vue.d.ts +7 -7
- package/dist/components/modal/src/LewModal.vue.d.ts +8 -8
- package/dist/components/pagination/src/LewPagination.vue.d.ts +5 -5
- package/dist/components/popok/src/LewPopok.vue.d.ts +8 -8
- package/dist/components/popover/src/LewPopover.vue.d.ts +14 -14
- package/dist/components/radio/src/LewRadio.vue.d.ts +5 -5
- package/dist/components/radio/src/LewRadioGroup.vue.d.ts +7 -7
- package/dist/components/result/src/LewResult.vue.d.ts +6 -6
- package/dist/components/select/src/LewSelect.vue.d.ts +20 -18
- package/dist/components/select/src/props.d.ts +3 -2
- package/dist/components/select-multiple/src/LewSelectMultiple.vue.d.ts +20 -20
- package/dist/components/slider/src/LewSlider.vue.d.ts +1 -7
- package/dist/components/slider-range/src/LewSliderRange.vue.d.ts +1 -7
- package/dist/components/steps/src/LewSteps.vue.d.ts +4 -4
- package/dist/components/switch/src/LewSwitch.vue.d.ts +8 -8
- package/dist/components/table/src/LewTable.vue.d.ts +42 -29
- package/dist/components/table/src/props.d.ts +19 -12
- package/dist/components/tabs/src/LewTabs.vue.d.ts +11 -11
- package/dist/components/tag/src/LewTag.vue.d.ts +11 -11
- package/dist/components/text-trim/src/LewTextTrim.vue.d.ts +13 -13
- package/dist/components/textarea/src/LewTextarea.vue.d.ts +12 -12
- package/dist/components/title/src/LewTitle.vue.d.ts +5 -5
- package/dist/components/tree/src/LewTree.vue.d.ts +14 -14
- package/dist/components/tree-select/src/LewTreeSelect.vue.d.ts +19 -19
- package/dist/components/upload/src/LewUpload.vue.d.ts +5 -5
- package/dist/confetti.browser.min.js +456 -0
- package/dist/constants/index.d.ts +6 -0
- package/dist/directives/context-menu/src/LewContextMenu.vue.d.ts +7 -7
- package/dist/directives/context-menu/src/index.d.ts +1 -1
- package/dist/directives/dialog/src/LewDialog.vue.d.ts +6 -6
- package/dist/directives/dialog/src/index.d.ts +5 -9
- package/dist/docs/axios/config.d.ts +2 -0
- package/dist/docs/axios/http.d.ts +4 -0
- package/dist/docs/axios/index.d.ts +13 -0
- package/dist/docs/docs/alert/api/index.d.ts +1 -0
- package/dist/docs/docs/alert/api/props.d.ts +11 -0
- package/dist/docs/docs/alert/demo/index.d.ts +4 -0
- package/dist/docs/docs/alert/index.d.ts +3 -0
- package/dist/docs/docs/avatar/api/index.d.ts +1 -0
- package/dist/docs/docs/avatar/api/props.d.ts +11 -0
- package/dist/docs/docs/avatar/demo/index.d.ts +10 -0
- package/dist/docs/docs/avatar/index.d.ts +3 -0
- package/dist/docs/docs/backtop/api/events.d.ts +11 -0
- package/dist/docs/docs/backtop/api/index.d.ts +2 -0
- package/dist/docs/docs/backtop/api/props.d.ts +12 -0
- package/dist/docs/docs/backtop/demo/index.d.ts +8 -0
- package/dist/docs/docs/backtop/index.d.ts +3 -0
- package/dist/docs/docs/badge/api/index.d.ts +1 -0
- package/dist/docs/docs/badge/api/props.d.ts +11 -0
- package/dist/docs/docs/badge/demo/index.d.ts +8 -0
- package/dist/docs/docs/badge/index.d.ts +3 -0
- package/dist/docs/docs/breadcrumb/api/breadcrumbOptions.d.ts +11 -0
- package/dist/docs/docs/breadcrumb/api/index.d.ts +2 -0
- package/dist/docs/docs/breadcrumb/api/props.d.ts +11 -0
- package/dist/docs/docs/breadcrumb/demo/index.d.ts +8 -0
- package/dist/docs/docs/breadcrumb/index.d.ts +3 -0
- package/dist/docs/docs/button/api/index.d.ts +1 -0
- package/dist/docs/docs/button/api/props.d.ts +11 -0
- package/dist/docs/docs/button/demo/index.d.ts +16 -0
- package/dist/docs/docs/button/index.d.ts +3 -0
- package/dist/docs/docs/cascader/api/cascaderOptions.d.ts +11 -0
- package/dist/docs/docs/cascader/api/index.d.ts +3 -0
- package/dist/docs/docs/cascader/api/model.d.ts +12 -0
- package/dist/docs/docs/cascader/api/props.d.ts +11 -0
- package/dist/docs/docs/cascader/demo/index.d.ts +22 -0
- package/dist/docs/docs/cascader/index.d.ts +3 -0
- package/dist/docs/docs/checkbox/api/checkboxModel.d.ts +12 -0
- package/dist/docs/docs/checkbox/api/checkboxProps.d.ts +12 -0
- package/dist/docs/docs/checkbox/api/index.d.ts +5 -0
- package/dist/docs/docs/checkbox/api/model.d.ts +12 -0
- package/dist/docs/docs/checkbox/api/options.d.ts +12 -0
- package/dist/docs/docs/checkbox/api/props.d.ts +12 -0
- package/dist/docs/docs/checkbox/demo/index.d.ts +12 -0
- package/dist/docs/docs/checkbox/index.d.ts +3 -0
- package/dist/docs/docs/collapse/api/collapseItemModel.d.ts +12 -0
- package/dist/docs/docs/collapse/api/collapseItemProps.d.ts +12 -0
- package/dist/docs/docs/collapse/api/index.d.ts +4 -0
- package/dist/docs/docs/collapse/api/model.d.ts +12 -0
- package/dist/docs/docs/collapse/api/props.d.ts +12 -0
- package/dist/docs/docs/collapse/demo/index.d.ts +8 -0
- package/dist/docs/docs/collapse/index.d.ts +3 -0
- package/dist/docs/docs/color/api/index.d.ts +1 -0
- package/dist/docs/docs/color/api/props.d.ts +11 -0
- package/dist/docs/docs/color/demo/index.d.ts +4 -0
- package/dist/docs/docs/color/index.d.ts +3 -0
- package/dist/docs/docs/context-menu/api/index.d.ts +2 -0
- package/dist/docs/docs/context-menu/api/options.d.ts +17 -0
- package/dist/docs/docs/context-menu/api/props.d.ts +12 -0
- package/dist/docs/docs/context-menu/demo/index.d.ts +10 -0
- package/dist/docs/docs/context-menu/index.d.ts +3 -0
- package/dist/docs/docs/datePicker/api/events.d.ts +11 -0
- package/dist/docs/docs/datePicker/api/index.d.ts +3 -0
- package/dist/docs/docs/datePicker/api/model.d.ts +12 -0
- package/dist/docs/docs/datePicker/api/props.d.ts +12 -0
- package/dist/docs/docs/datePicker/demo/index.d.ts +12 -0
- package/dist/docs/docs/datePicker/index.d.ts +3 -0
- package/dist/docs/docs/dateRangePicker/api/events.d.ts +11 -0
- package/dist/docs/docs/dateRangePicker/api/index.d.ts +3 -0
- package/dist/docs/docs/dateRangePicker/api/model.d.ts +12 -0
- package/dist/docs/docs/dateRangePicker/api/props.d.ts +12 -0
- package/dist/docs/docs/dateRangePicker/demo/index.d.ts +8 -0
- package/dist/docs/docs/dateRangePicker/index.d.ts +3 -0
- package/dist/docs/docs/dialog/api/events.d.ts +10 -0
- package/dist/docs/docs/dialog/api/index.d.ts +2 -0
- package/dist/docs/docs/dialog/api/props.d.ts +12 -0
- package/dist/docs/docs/dialog/demo/index.d.ts +6 -0
- package/dist/docs/docs/dialog/index.d.ts +3 -0
- package/dist/docs/docs/drawer/api/index.d.ts +2 -0
- package/dist/docs/docs/drawer/api/model.d.ts +12 -0
- package/dist/docs/docs/drawer/api/props.d.ts +12 -0
- package/dist/docs/docs/drawer/demo/index.d.ts +10 -0
- package/dist/docs/docs/drawer/index.d.ts +3 -0
- package/dist/docs/docs/dropdown/api/events.d.ts +12 -0
- package/dist/docs/docs/dropdown/api/index.d.ts +2 -0
- package/dist/docs/docs/dropdown/api/props.d.ts +12 -0
- package/dist/docs/docs/dropdown/demo/index.d.ts +8 -0
- package/dist/docs/docs/dropdown/index.d.ts +3 -0
- package/dist/docs/docs/empty/api/index.d.ts +1 -0
- package/dist/docs/docs/empty/api/props.d.ts +12 -0
- package/dist/docs/docs/empty/demo/index.d.ts +4 -0
- package/dist/docs/docs/empty/index.d.ts +3 -0
- package/dist/docs/docs/flex/api/index.d.ts +1 -0
- package/dist/docs/docs/flex/api/props.d.ts +12 -0
- package/dist/docs/docs/flex/demo/index.d.ts +8 -0
- package/dist/docs/docs/flex/index.d.ts +3 -0
- package/dist/docs/docs/form/api/formItemProps.d.ts +12 -0
- package/dist/docs/docs/form/api/index.d.ts +3 -0
- package/dist/docs/docs/form/api/methods.d.ts +10 -0
- package/dist/docs/docs/form/api/props.d.ts +12 -0
- package/dist/docs/docs/form/demo/index.d.ts +12 -0
- package/dist/docs/docs/form/index.d.ts +3 -0
- package/dist/docs/docs/icon/api/index.d.ts +1 -0
- package/dist/docs/docs/icon/api/props.d.ts +11 -0
- package/dist/docs/docs/icon/demo/index.d.ts +6 -0
- package/dist/docs/docs/icon/index.d.ts +3 -0
- package/dist/docs/docs/image/api/index.d.ts +1 -0
- package/dist/docs/docs/image/api/props.d.ts +11 -0
- package/dist/docs/docs/image/demo/index.d.ts +8 -0
- package/dist/docs/docs/image/index.d.ts +3 -0
- package/dist/docs/docs/index.d.ts +4 -0
- package/dist/docs/docs/input/api/events.d.ts +10 -0
- package/dist/docs/docs/input/api/index.d.ts +3 -0
- package/dist/docs/docs/input/api/model.d.ts +12 -0
- package/dist/docs/docs/input/api/props.d.ts +12 -0
- package/dist/docs/docs/input/demo/index.d.ts +24 -0
- package/dist/docs/docs/input/index.d.ts +3 -0
- package/dist/docs/docs/input-number/api/index.d.ts +2 -0
- package/dist/docs/docs/input-number/api/model.d.ts +12 -0
- package/dist/docs/docs/input-number/api/props.d.ts +12 -0
- package/dist/docs/docs/input-number/demo/index.d.ts +12 -0
- package/dist/docs/docs/input-number/index.d.ts +3 -0
- package/dist/docs/docs/input-table/api/index.d.ts +1 -0
- package/dist/docs/docs/input-table/api/props.d.ts +12 -0
- package/dist/docs/docs/input-table/demo/index.d.ts +8 -0
- package/dist/docs/docs/input-table/index.d.ts +3 -0
- package/dist/docs/docs/input-tree/api/index.d.ts +1 -0
- package/dist/docs/docs/input-tree/api/props.d.ts +12 -0
- package/dist/docs/docs/input-tree/demo/index.d.ts +12 -0
- package/dist/docs/docs/input-tree/index.d.ts +3 -0
- package/dist/docs/docs/inputPro/api/index.d.ts +1 -0
- package/dist/docs/docs/inputPro/api/props.d.ts +11 -0
- package/dist/docs/docs/inputPro/demo/index.d.ts +6 -0
- package/dist/docs/docs/inputPro/index.d.ts +3 -0
- package/dist/docs/docs/inputTag/api/events.d.ts +10 -0
- package/dist/docs/docs/inputTag/api/index.d.ts +3 -0
- package/dist/docs/docs/inputTag/api/model.d.ts +12 -0
- package/dist/docs/docs/inputTag/api/props.d.ts +12 -0
- package/dist/docs/docs/inputTag/demo/index.d.ts +16 -0
- package/dist/docs/docs/inputTag/index.d.ts +3 -0
- package/dist/docs/docs/loading/api/index.d.ts +1 -0
- package/dist/docs/docs/loading/api/props.d.ts +11 -0
- package/dist/docs/docs/loading/demo/index.d.ts +4 -0
- package/dist/docs/docs/loading/index.d.ts +3 -0
- package/dist/docs/docs/magicNumber/api/index.d.ts +1 -0
- package/dist/docs/docs/magicNumber/api/props.d.ts +12 -0
- package/dist/docs/docs/magicNumber/demo/index.d.ts +8 -0
- package/dist/docs/docs/magicNumber/index.d.ts +3 -0
- package/dist/docs/docs/mark/api/index.d.ts +1 -0
- package/dist/docs/docs/mark/api/props.d.ts +12 -0
- package/dist/docs/docs/mark/demo/index.d.ts +4 -0
- package/dist/docs/docs/mark/index.d.ts +3 -0
- package/dist/docs/docs/menu/api/index.d.ts +2 -0
- package/dist/docs/docs/menu/api/options.d.ts +11 -0
- package/dist/docs/docs/menu/api/props.d.ts +12 -0
- package/dist/docs/docs/menu/demo/index.d.ts +4 -0
- package/dist/docs/docs/menu/index.d.ts +3 -0
- package/dist/docs/docs/menu-tree/api/index.d.ts +2 -0
- package/dist/docs/docs/menu-tree/api/options.d.ts +11 -0
- package/dist/docs/docs/menu-tree/api/props.d.ts +12 -0
- package/dist/docs/docs/menu-tree/demo/index.d.ts +4 -0
- package/dist/docs/docs/menu-tree/index.d.ts +3 -0
- package/dist/docs/docs/message/api/events.d.ts +11 -0
- package/dist/docs/docs/message/api/index.d.ts +2 -0
- package/dist/docs/docs/message/api/props.d.ts +11 -0
- package/dist/docs/docs/message/demo/index.d.ts +8 -0
- package/dist/docs/docs/message/index.d.ts +3 -0
- package/dist/docs/docs/modal/api/index.d.ts +2 -0
- package/dist/docs/docs/modal/api/model.d.ts +12 -0
- package/dist/docs/docs/modal/api/props.d.ts +12 -0
- package/dist/docs/docs/modal/demo/index.d.ts +10 -0
- package/dist/docs/docs/modal/index.d.ts +3 -0
- package/dist/docs/docs/notification/api/index.d.ts +1 -0
- package/dist/docs/docs/notification/api/props.d.ts +11 -0
- package/dist/docs/docs/notification/demo/index.d.ts +6 -0
- package/dist/docs/docs/notification/index.d.ts +3 -0
- package/dist/docs/docs/pagination/api/events.d.ts +10 -0
- package/dist/docs/docs/pagination/api/index.d.ts +3 -0
- package/dist/docs/docs/pagination/api/model.d.ts +12 -0
- package/dist/docs/docs/pagination/api/props.d.ts +12 -0
- package/dist/docs/docs/pagination/demo/index.d.ts +8 -0
- package/dist/docs/docs/pagination/index.d.ts +3 -0
- package/dist/docs/docs/popok/api/index.d.ts +1 -0
- package/dist/docs/docs/popok/api/props.d.ts +12 -0
- package/dist/docs/docs/popok/demo/index.d.ts +6 -0
- package/dist/docs/docs/popok/index.d.ts +3 -0
- package/dist/docs/docs/popover/api/index.d.ts +2 -0
- package/dist/docs/docs/popover/api/props.d.ts +12 -0
- package/dist/docs/docs/popover/api/slots.d.ts +10 -0
- package/dist/docs/docs/popover/demo/index.d.ts +4 -0
- package/dist/docs/docs/popover/index.d.ts +3 -0
- package/dist/docs/docs/radio/api/index.d.ts +3 -0
- package/dist/docs/docs/radio/api/model.d.ts +12 -0
- package/dist/docs/docs/radio/api/props.d.ts +12 -0
- package/dist/docs/docs/radio/api/radioOptions.d.ts +11 -0
- package/dist/docs/docs/radio/demo/index.d.ts +8 -0
- package/dist/docs/docs/radio/index.d.ts +3 -0
- package/dist/docs/docs/result/api/index.d.ts +2 -0
- package/dist/docs/docs/result/api/props.d.ts +12 -0
- package/dist/docs/docs/result/api/slots.d.ts +10 -0
- package/dist/docs/docs/result/demo/index.d.ts +4 -0
- package/dist/docs/docs/result/index.d.ts +3 -0
- package/dist/docs/docs/select/api/events.d.ts +10 -0
- package/dist/docs/docs/select/api/index.d.ts +5 -0
- package/dist/docs/docs/select/api/model.d.ts +12 -0
- package/dist/docs/docs/select/api/options.d.ts +16 -0
- package/dist/docs/docs/select/api/props.d.ts +12 -0
- package/dist/docs/docs/select/api/slots.d.ts +10 -0
- package/dist/docs/docs/select/demo/index.d.ts +16 -0
- package/dist/docs/docs/select/index.d.ts +3 -0
- package/dist/docs/docs/selectMultiple/api/events.d.ts +10 -0
- package/dist/docs/docs/selectMultiple/api/index.d.ts +5 -0
- package/dist/docs/docs/selectMultiple/api/model.d.ts +12 -0
- package/dist/docs/docs/selectMultiple/api/options.d.ts +16 -0
- package/dist/docs/docs/selectMultiple/api/props.d.ts +12 -0
- package/dist/docs/docs/selectMultiple/api/slots.d.ts +10 -0
- package/dist/docs/docs/selectMultiple/demo/index.d.ts +16 -0
- package/dist/docs/docs/selectMultiple/index.d.ts +3 -0
- package/dist/docs/docs/space/api/index.d.ts +1 -0
- package/dist/docs/docs/space/api/props.d.ts +11 -0
- package/dist/docs/docs/space/demo/index.d.ts +8 -0
- package/dist/docs/docs/space/index.d.ts +3 -0
- package/dist/docs/docs/steps/api/index.d.ts +2 -0
- package/dist/docs/docs/steps/api/model.d.ts +12 -0
- package/dist/docs/docs/steps/api/props.d.ts +12 -0
- package/dist/docs/docs/steps/demo/index.d.ts +8 -0
- package/dist/docs/docs/steps/index.d.ts +3 -0
- package/dist/docs/docs/switch/api/events.d.ts +10 -0
- package/dist/docs/docs/switch/api/index.d.ts +3 -0
- package/dist/docs/docs/switch/api/model.d.ts +12 -0
- package/dist/docs/docs/switch/api/props.d.ts +12 -0
- package/dist/docs/docs/switch/demo/index.d.ts +10 -0
- package/dist/docs/docs/switch/index.d.ts +3 -0
- package/dist/docs/docs/table/api/index.d.ts +3 -0
- package/dist/docs/docs/table/api/model.d.ts +12 -0
- package/dist/docs/docs/table/api/props.d.ts +12 -0
- package/dist/docs/docs/table/api/tableColumns.d.ts +11 -0
- package/dist/docs/docs/table/demo/index.d.ts +20 -0
- package/dist/docs/docs/table/index.d.ts +3 -0
- package/dist/docs/docs/tabs/api/index.d.ts +3 -0
- package/dist/docs/docs/tabs/api/model.d.ts +12 -0
- package/dist/docs/docs/tabs/api/props.d.ts +12 -0
- package/dist/docs/docs/tabs/api/tabsOptions.d.ts +11 -0
- package/dist/docs/docs/tabs/demo/index.d.ts +12 -0
- package/dist/docs/docs/tabs/index.d.ts +3 -0
- package/dist/docs/docs/tag/api/index.d.ts +1 -0
- package/dist/docs/docs/tag/api/props.d.ts +11 -0
- package/dist/docs/docs/tag/demo/index.d.ts +14 -0
- package/dist/docs/docs/tag/index.d.ts +3 -0
- package/dist/docs/docs/textTrim/api/index.d.ts +1 -0
- package/dist/docs/docs/textTrim/api/props.d.ts +11 -0
- package/dist/docs/docs/textTrim/demo/index.d.ts +6 -0
- package/dist/docs/docs/textTrim/index.d.ts +3 -0
- package/dist/docs/docs/textarea/api/events.d.ts +11 -0
- package/dist/docs/docs/textarea/api/index.d.ts +3 -0
- package/dist/docs/docs/textarea/api/model.d.ts +12 -0
- package/dist/docs/docs/textarea/api/props.d.ts +12 -0
- package/dist/docs/docs/textarea/demo/index.d.ts +16 -0
- package/dist/docs/docs/textarea/index.d.ts +3 -0
- package/dist/docs/docs/title/api/index.d.ts +1 -0
- package/dist/docs/docs/title/api/titleProps.d.ts +11 -0
- package/dist/docs/docs/title/demo/index.d.ts +8 -0
- package/dist/docs/docs/title/index.d.ts +3 -0
- package/dist/docs/docs/tooltip/api/index.d.ts +1 -0
- package/dist/docs/docs/tooltip/api/props.d.ts +11 -0
- package/dist/docs/docs/tooltip/demo/index.d.ts +6 -0
- package/dist/docs/docs/tooltip/index.d.ts +3 -0
- package/dist/docs/docs/tree/api/index.d.ts +4 -0
- package/dist/docs/docs/tree/api/model.d.ts +11 -0
- package/dist/docs/docs/tree/api/props.d.ts +11 -0
- package/dist/docs/docs/tree/api/slots.d.ts +10 -0
- package/dist/docs/docs/tree/api/treeDataSource.d.ts +11 -0
- package/dist/docs/docs/tree/demo/index.d.ts +18 -0
- package/dist/docs/docs/tree/index.d.ts +3 -0
- package/dist/docs/docs/tree-select/api/index.d.ts +3 -0
- package/dist/docs/docs/tree-select/api/model.d.ts +11 -0
- package/dist/docs/docs/tree-select/api/props.d.ts +11 -0
- package/dist/docs/docs/tree-select/api/slots.d.ts +10 -0
- package/dist/docs/docs/tree-select/demo/index.d.ts +18 -0
- package/dist/docs/docs/tree-select/index.d.ts +3 -0
- package/dist/docs/docs/upload/api/index.d.ts +1 -0
- package/dist/docs/docs/upload/api/props.d.ts +12 -0
- package/dist/docs/docs/upload/demo/index.d.ts +10 -0
- package/dist/docs/docs/upload/index.d.ts +3 -0
- package/dist/docs/docs/upload/uploadHelper.d.ts +7 -0
- package/dist/docs/guide/index.d.ts +4 -0
- package/dist/docs/lib/data.d.ts +108 -0
- package/dist/docs/lib/utils.d.ts +17 -0
- package/dist/docs/main.d.ts +1 -0
- package/dist/docs/router/index.d.ts +2 -0
- package/dist/docs/views/form-engine/schema/base.d.ts +19 -0
- package/dist/docs/views/form-engine/schema/compoments-menus.d.ts +762 -0
- package/dist/docs/views/form-engine/schema/components/cascader.d.ts +18 -0
- package/dist/docs/views/form-engine/schema/components/checkbox-group.d.ts +36 -0
- package/dist/docs/views/form-engine/schema/components/checkbox.d.ts +12 -0
- package/dist/docs/views/form-engine/schema/components/date-picker.d.ts +14 -0
- package/dist/docs/views/form-engine/schema/components/date-range-picker.d.ts +14 -0
- package/dist/docs/views/form-engine/schema/components/input-number.d.ts +43 -0
- package/dist/docs/views/form-engine/schema/components/input-tag.d.ts +6 -0
- package/dist/docs/views/form-engine/schema/components/input.d.ts +61 -0
- package/dist/docs/views/form-engine/schema/components/radio-group.d.ts +36 -0
- package/dist/docs/views/form-engine/schema/components/select-multiple.d.ts +36 -0
- package/dist/docs/views/form-engine/schema/components/select.d.ts +36 -0
- package/dist/docs/views/form-engine/schema/components/switch.d.ts +13 -0
- package/dist/docs/views/form-engine/schema/components/tabs.d.ts +47 -0
- package/dist/docs/views/form-engine/schema/components/textarea.d.ts +42 -0
- package/dist/docs/views/form-engine/schema/components/upload.d.ts +20 -0
- package/dist/docs/views/form-engine/schema/global.d.ts +13 -0
- package/dist/docs/views/form-engine/schema/index.d.ts +3 -0
- package/dist/favicon.ico +0 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1021 -900
- package/dist/index.umd.js +4 -4
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +4 -0
- package/dist/utils/index.d.ts +64 -0
- package/package.json +20 -18
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, openBlock, createElementBlock, normalizeStyle, unref, renderSlot, h as h$1, getCurrentScope, onScopeDispose,
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, normalizeStyle, unref, renderSlot, h as h$1, getCurrentScope, onScopeDispose, toRef as toRef$1, readonly, customRef, ref, onMounted, nextTick, getCurrentInstance, shallowRef, watch, toRefs, mergeModels, useModel, reactive, resolveComponent, createBlock, normalizeClass, withCtx, createElementVNode, createVNode, Transition, createCommentVNode, withModifiers, withDirectives, toDisplayString, vShow, Fragment, renderList, createTextVNode, resolveDirective, isRef, vModelText, mergeProps, createSlots, onUnmounted, vModelDynamic, watchEffect, TransitionGroup, resolveDynamicComponent, toRaw, vModelCheckbox, onActivated, normalizeProps, guardReactiveProps, Teleport, provide, inject, createApp } from "vue";
|
|
2
2
|
function _mergeNamespaces(n2, m2) {
|
|
3
3
|
for (var i2 = 0; i2 < m2.length; i2++) {
|
|
4
4
|
const e2 = m2[i2];
|
|
@@ -202,7 +202,7 @@ var reTrimStart = /^\s+/;
|
|
|
202
202
|
function baseTrim(string2) {
|
|
203
203
|
return string2 ? string2.slice(0, trimmedEndIndex(string2) + 1).replace(reTrimStart, "") : string2;
|
|
204
204
|
}
|
|
205
|
-
function isObject$
|
|
205
|
+
function isObject$3(value) {
|
|
206
206
|
var type = typeof value;
|
|
207
207
|
return value != null && (type == "object" || type == "function");
|
|
208
208
|
}
|
|
@@ -218,9 +218,9 @@ function toNumber$1(value) {
|
|
|
218
218
|
if (isSymbol(value)) {
|
|
219
219
|
return NAN;
|
|
220
220
|
}
|
|
221
|
-
if (isObject$
|
|
221
|
+
if (isObject$3(value)) {
|
|
222
222
|
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
|
223
|
-
value = isObject$
|
|
223
|
+
value = isObject$3(other) ? other + "" : other;
|
|
224
224
|
}
|
|
225
225
|
if (typeof value != "string") {
|
|
226
226
|
return value === 0 ? value : +value;
|
|
@@ -229,12 +229,12 @@ function toNumber$1(value) {
|
|
|
229
229
|
var isBinary = reIsBinary.test(value);
|
|
230
230
|
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
|
231
231
|
}
|
|
232
|
-
function identity
|
|
232
|
+
function identity(value) {
|
|
233
233
|
return value;
|
|
234
234
|
}
|
|
235
235
|
var asyncTag = "[object AsyncFunction]", funcTag$2 = "[object Function]", genTag$1 = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
|
|
236
236
|
function isFunction(value) {
|
|
237
|
-
if (!isObject$
|
|
237
|
+
if (!isObject$3(value)) {
|
|
238
238
|
return false;
|
|
239
239
|
}
|
|
240
240
|
var tag = baseGetTag(value);
|
|
@@ -272,7 +272,7 @@ var reIsNative = RegExp(
|
|
|
272
272
|
"^" + funcToString$1.call(hasOwnProperty$e).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
273
273
|
);
|
|
274
274
|
function baseIsNative(value) {
|
|
275
|
-
if (!isObject$
|
|
275
|
+
if (!isObject$3(value) || isMasked(value)) {
|
|
276
276
|
return false;
|
|
277
277
|
}
|
|
278
278
|
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
|
@@ -285,13 +285,13 @@ function getNative(object2, key) {
|
|
|
285
285
|
var value = getValue(object2, key);
|
|
286
286
|
return baseIsNative(value) ? value : void 0;
|
|
287
287
|
}
|
|
288
|
-
var WeakMap = getNative(root, "WeakMap");
|
|
288
|
+
var WeakMap$1 = getNative(root, "WeakMap");
|
|
289
289
|
var objectCreate = Object.create;
|
|
290
290
|
var baseCreate = /* @__PURE__ */ function() {
|
|
291
291
|
function object2() {
|
|
292
292
|
}
|
|
293
293
|
return function(proto) {
|
|
294
|
-
if (!isObject$
|
|
294
|
+
if (!isObject$3(proto)) {
|
|
295
295
|
return {};
|
|
296
296
|
}
|
|
297
297
|
if (objectCreate) {
|
|
@@ -356,7 +356,7 @@ var defineProperty = function() {
|
|
|
356
356
|
} catch (e2) {
|
|
357
357
|
}
|
|
358
358
|
}();
|
|
359
|
-
var baseSetToString = !defineProperty ? identity
|
|
359
|
+
var baseSetToString = !defineProperty ? identity : function(func, string2) {
|
|
360
360
|
return defineProperty(func, "toString", {
|
|
361
361
|
"configurable": true,
|
|
362
362
|
"enumerable": false,
|
|
@@ -468,7 +468,7 @@ function overRest(func, start2, transform) {
|
|
|
468
468
|
};
|
|
469
469
|
}
|
|
470
470
|
function baseRest(func, start2) {
|
|
471
|
-
return setToString(overRest(func, start2, identity
|
|
471
|
+
return setToString(overRest(func, start2, identity), func + "");
|
|
472
472
|
}
|
|
473
473
|
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
474
474
|
function isLength(value) {
|
|
@@ -478,7 +478,7 @@ function isArrayLike(value) {
|
|
|
478
478
|
return value != null && isLength(value.length) && !isFunction(value);
|
|
479
479
|
}
|
|
480
480
|
function isIterateeCall(value, index2, object2) {
|
|
481
|
-
if (!isObject$
|
|
481
|
+
if (!isObject$3(object2)) {
|
|
482
482
|
return false;
|
|
483
483
|
}
|
|
484
484
|
var type = typeof index2;
|
|
@@ -617,7 +617,7 @@ function nativeKeysIn(object2) {
|
|
|
617
617
|
var objectProto$9 = Object.prototype;
|
|
618
618
|
var hasOwnProperty$9 = objectProto$9.hasOwnProperty;
|
|
619
619
|
function baseKeysIn(object2) {
|
|
620
|
-
if (!isObject$
|
|
620
|
+
if (!isObject$3(object2)) {
|
|
621
621
|
return nativeKeysIn(object2);
|
|
622
622
|
}
|
|
623
623
|
var isProto = isPrototype(object2), result = [];
|
|
@@ -836,14 +836,14 @@ var stringToPath = memoizeCapped(function(string2) {
|
|
|
836
836
|
});
|
|
837
837
|
return result;
|
|
838
838
|
});
|
|
839
|
-
function toString$
|
|
839
|
+
function toString$3(value) {
|
|
840
840
|
return value == null ? "" : baseToString(value);
|
|
841
841
|
}
|
|
842
842
|
function castPath(value, object2) {
|
|
843
843
|
if (isArray(value)) {
|
|
844
844
|
return value;
|
|
845
845
|
}
|
|
846
|
-
return isKey(value, object2) ? [value] : stringToPath(toString$
|
|
846
|
+
return isKey(value, object2) ? [value] : stringToPath(toString$3(value));
|
|
847
847
|
}
|
|
848
848
|
var INFINITY$1 = 1 / 0;
|
|
849
849
|
function toKey(value) {
|
|
@@ -1037,9 +1037,9 @@ var Promise$1 = getNative(root, "Promise");
|
|
|
1037
1037
|
var Set$1 = getNative(root, "Set");
|
|
1038
1038
|
var mapTag$5 = "[object Map]", objectTag$2 = "[object Object]", promiseTag = "[object Promise]", setTag$5 = "[object Set]", weakMapTag$1 = "[object WeakMap]";
|
|
1039
1039
|
var dataViewTag$3 = "[object DataView]";
|
|
1040
|
-
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map$1), promiseCtorString = toSource(Promise$1), setCtorString = toSource(Set$1), weakMapCtorString = toSource(WeakMap);
|
|
1040
|
+
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map$1), promiseCtorString = toSource(Promise$1), setCtorString = toSource(Set$1), weakMapCtorString = toSource(WeakMap$1);
|
|
1041
1041
|
var getTag = baseGetTag;
|
|
1042
|
-
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$3 || Map$1 && getTag(new Map$1()) != mapTag$5 || Promise$1 && getTag(Promise$1.resolve()) != promiseTag || Set$1 && getTag(new Set$1()) != setTag$5 || WeakMap && getTag(new WeakMap()) != weakMapTag$1) {
|
|
1042
|
+
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$3 || Map$1 && getTag(new Map$1()) != mapTag$5 || Promise$1 && getTag(Promise$1.resolve()) != promiseTag || Set$1 && getTag(new Set$1()) != setTag$5 || WeakMap$1 && getTag(new WeakMap$1()) != weakMapTag$1) {
|
|
1043
1043
|
getTag = function(value) {
|
|
1044
1044
|
var result = baseGetTag(value), Ctor = result == objectTag$2 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
|
|
1045
1045
|
if (ctorString) {
|
|
@@ -1154,7 +1154,7 @@ function baseClone(value, bitmask, customizer, key, object2, stack) {
|
|
|
1154
1154
|
if (result !== void 0) {
|
|
1155
1155
|
return result;
|
|
1156
1156
|
}
|
|
1157
|
-
if (!isObject$
|
|
1157
|
+
if (!isObject$3(value)) {
|
|
1158
1158
|
return value;
|
|
1159
1159
|
}
|
|
1160
1160
|
var isArr = isArray(value);
|
|
@@ -1467,7 +1467,7 @@ function baseIsMatch(object2, source, matchData, customizer) {
|
|
|
1467
1467
|
return true;
|
|
1468
1468
|
}
|
|
1469
1469
|
function isStrictComparable(value) {
|
|
1470
|
-
return value === value && !isObject$
|
|
1470
|
+
return value === value && !isObject$3(value);
|
|
1471
1471
|
}
|
|
1472
1472
|
function getMatchData(object2) {
|
|
1473
1473
|
var result = keys(object2), length = result.length;
|
|
@@ -1544,7 +1544,7 @@ function baseIteratee(value) {
|
|
|
1544
1544
|
return value;
|
|
1545
1545
|
}
|
|
1546
1546
|
if (value == null) {
|
|
1547
|
-
return identity
|
|
1547
|
+
return identity;
|
|
1548
1548
|
}
|
|
1549
1549
|
if (typeof value == "object") {
|
|
1550
1550
|
return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
|
|
@@ -1616,7 +1616,7 @@ function debounce$2(func, wait, options) {
|
|
|
1616
1616
|
throw new TypeError(FUNC_ERROR_TEXT$1);
|
|
1617
1617
|
}
|
|
1618
1618
|
wait = toNumber$1(wait) || 0;
|
|
1619
|
-
if (isObject$
|
|
1619
|
+
if (isObject$3(options)) {
|
|
1620
1620
|
leading = !!options.leading;
|
|
1621
1621
|
maxing = "maxWait" in options;
|
|
1622
1622
|
maxWait = maxing ? nativeMax(toNumber$1(options.maxWait) || 0, wait) : maxWait;
|
|
@@ -1740,7 +1740,7 @@ function baseMergeDeep(object2, source, key, srcIndex, mergeFunc, customizer, st
|
|
|
1740
1740
|
newValue = objValue;
|
|
1741
1741
|
if (isArguments(objValue)) {
|
|
1742
1742
|
newValue = toPlainObject(objValue);
|
|
1743
|
-
} else if (!isObject$
|
|
1743
|
+
} else if (!isObject$3(objValue) || isFunction(objValue)) {
|
|
1744
1744
|
newValue = initCloneObject(srcValue);
|
|
1745
1745
|
}
|
|
1746
1746
|
} else {
|
|
@@ -1760,7 +1760,7 @@ function baseMerge(object2, source, srcIndex, customizer, stack) {
|
|
|
1760
1760
|
}
|
|
1761
1761
|
baseFor(source, function(srcValue, key) {
|
|
1762
1762
|
stack || (stack = new Stack());
|
|
1763
|
-
if (isObject$
|
|
1763
|
+
if (isObject$3(srcValue)) {
|
|
1764
1764
|
baseMergeDeep(object2, source, key, srcIndex, baseMerge, customizer, stack);
|
|
1765
1765
|
} else {
|
|
1766
1766
|
var newValue = customizer ? customizer(safeGet(object2, key), srcValue, key + "", object2, source, stack) : void 0;
|
|
@@ -1804,7 +1804,7 @@ var difference = baseRest(function(array2, values) {
|
|
|
1804
1804
|
return isArrayLikeObject(array2) ? baseDifference(array2, baseFlatten(values, 1, isArrayLikeObject, true)) : [];
|
|
1805
1805
|
});
|
|
1806
1806
|
function castFunction(value) {
|
|
1807
|
-
return typeof value == "function" ? value : identity
|
|
1807
|
+
return typeof value == "function" ? value : identity;
|
|
1808
1808
|
}
|
|
1809
1809
|
function forEach$1(collection, iteratee) {
|
|
1810
1810
|
var func = isArray(collection) ? arrayEach : baseEach;
|
|
@@ -1820,7 +1820,7 @@ var htmlEscapes = {
|
|
|
1820
1820
|
var escapeHtmlChar = basePropertyOf(htmlEscapes);
|
|
1821
1821
|
var reUnescapedHtml = /[&<>"']/g, reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
|
|
1822
1822
|
function escape(string2) {
|
|
1823
|
-
string2 = toString$
|
|
1823
|
+
string2 = toString$3(string2);
|
|
1824
1824
|
return string2 && reHasUnescapedHtml.test(string2) ? string2.replace(reUnescapedHtml, escapeHtmlChar) : string2;
|
|
1825
1825
|
}
|
|
1826
1826
|
function findIndex$1(array2, predicate, fromIndex) {
|
|
@@ -1854,7 +1854,7 @@ function has(object2, path) {
|
|
|
1854
1854
|
return object2 != null && hasPath(object2, path, baseHas);
|
|
1855
1855
|
}
|
|
1856
1856
|
var stringTag = "[object String]";
|
|
1857
|
-
function isString
|
|
1857
|
+
function isString(value) {
|
|
1858
1858
|
return typeof value == "string" || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
|
|
1859
1859
|
}
|
|
1860
1860
|
var nativeMin = Math.min;
|
|
@@ -1946,7 +1946,7 @@ var merge = createAssigner(function(object2, source, srcIndex) {
|
|
|
1946
1946
|
baseMerge(object2, source, srcIndex);
|
|
1947
1947
|
});
|
|
1948
1948
|
function baseSet(object2, path, value, customizer) {
|
|
1949
|
-
if (!isObject$
|
|
1949
|
+
if (!isObject$3(object2)) {
|
|
1950
1950
|
return object2;
|
|
1951
1951
|
}
|
|
1952
1952
|
path = castPath(path, object2);
|
|
@@ -1960,7 +1960,7 @@ function baseSet(object2, path, value, customizer) {
|
|
|
1960
1960
|
var objValue = nested[key];
|
|
1961
1961
|
newValue = void 0;
|
|
1962
1962
|
if (newValue === void 0) {
|
|
1963
|
-
newValue = isObject$
|
|
1963
|
+
newValue = isObject$3(objValue) ? objValue : isIndex(path[index2 + 1]) ? [] : {};
|
|
1964
1964
|
}
|
|
1965
1965
|
}
|
|
1966
1966
|
assignValue(nested, key, newValue);
|
|
@@ -2021,7 +2021,7 @@ function throttle(func, wait, options) {
|
|
|
2021
2021
|
if (typeof func != "function") {
|
|
2022
2022
|
throw new TypeError(FUNC_ERROR_TEXT);
|
|
2023
2023
|
}
|
|
2024
|
-
if (isObject$
|
|
2024
|
+
if (isObject$3(options)) {
|
|
2025
2025
|
leading = "leading" in options ? !!options.leading : leading;
|
|
2026
2026
|
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
2027
2027
|
}
|
|
@@ -2076,7 +2076,7 @@ function uniq(array2) {
|
|
|
2076
2076
|
var idCounter$1 = 0;
|
|
2077
2077
|
function uniqueId(prefix) {
|
|
2078
2078
|
var id = ++idCounter$1;
|
|
2079
|
-
return toString$
|
|
2079
|
+
return toString$3(prefix) + id;
|
|
2080
2080
|
}
|
|
2081
2081
|
const getIconType = (type) => {
|
|
2082
2082
|
const map2 = {
|
|
@@ -5198,18 +5198,6 @@ const cascaderProps = {
|
|
|
5198
5198
|
description: "是否只读"
|
|
5199
5199
|
}
|
|
5200
5200
|
};
|
|
5201
|
-
var _a;
|
|
5202
|
-
const isClient$1 = typeof window !== "undefined";
|
|
5203
|
-
const isString = (val) => typeof val === "string";
|
|
5204
|
-
const noop$1 = () => {
|
|
5205
|
-
};
|
|
5206
|
-
const isIOS = isClient$1 && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
5207
|
-
function resolveUnref(r2) {
|
|
5208
|
-
return typeof r2 === "function" ? r2() : unref(r2);
|
|
5209
|
-
}
|
|
5210
|
-
function identity(arg) {
|
|
5211
|
-
return arg;
|
|
5212
|
-
}
|
|
5213
5201
|
function tryOnScopeDispose$1(fn2) {
|
|
5214
5202
|
if (getCurrentScope()) {
|
|
5215
5203
|
onScopeDispose(fn2);
|
|
@@ -5217,50 +5205,63 @@ function tryOnScopeDispose$1(fn2) {
|
|
|
5217
5205
|
}
|
|
5218
5206
|
return false;
|
|
5219
5207
|
}
|
|
5220
|
-
function
|
|
5221
|
-
return typeof r2 === "function" ?
|
|
5208
|
+
function toValue$1(r2) {
|
|
5209
|
+
return typeof r2 === "function" ? r2() : unref(r2);
|
|
5222
5210
|
}
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5211
|
+
const isClient$1 = typeof window !== "undefined" && typeof document !== "undefined";
|
|
5212
|
+
typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
|
|
5213
|
+
const toString$2 = Object.prototype.toString;
|
|
5214
|
+
const isObject$2 = (val) => toString$2.call(val) === "[object Object]";
|
|
5215
|
+
const noop$1 = () => {
|
|
5216
|
+
};
|
|
5217
|
+
const isIOS = /* @__PURE__ */ getIsIOS();
|
|
5218
|
+
function getIsIOS() {
|
|
5219
|
+
var _a, _b;
|
|
5220
|
+
return isClient$1 && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((_b = window == null ? void 0 : window.navigator) == null ? void 0 : _b.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
|
|
5221
|
+
}
|
|
5222
|
+
function getLifeCycleTarget(target) {
|
|
5223
|
+
return getCurrentInstance();
|
|
5224
|
+
}
|
|
5225
|
+
function toRef(...args) {
|
|
5226
|
+
if (args.length !== 1)
|
|
5227
|
+
return toRef$1(...args);
|
|
5228
|
+
const r2 = args[0];
|
|
5229
|
+
return typeof r2 === "function" ? readonly(customRef(() => ({ get: r2, set: noop$1 }))) : ref(r2);
|
|
5230
|
+
}
|
|
5231
|
+
function tryOnMounted(fn2, sync = true, target) {
|
|
5232
|
+
const instance = getLifeCycleTarget();
|
|
5233
|
+
if (instance)
|
|
5234
|
+
onMounted(fn2, target);
|
|
5226
5235
|
else if (sync)
|
|
5227
5236
|
fn2();
|
|
5228
5237
|
else
|
|
5229
5238
|
nextTick(fn2);
|
|
5230
5239
|
}
|
|
5231
5240
|
function unrefElement$2(elRef) {
|
|
5232
|
-
var
|
|
5233
|
-
const plain =
|
|
5234
|
-
return (
|
|
5241
|
+
var _a;
|
|
5242
|
+
const plain = toValue$1(elRef);
|
|
5243
|
+
return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;
|
|
5235
5244
|
}
|
|
5236
5245
|
const defaultWindow$2 = isClient$1 ? window : void 0;
|
|
5237
|
-
function
|
|
5238
|
-
const
|
|
5239
|
-
const
|
|
5240
|
-
|
|
5241
|
-
|
|
5242
|
-
|
|
5243
|
-
}
|
|
5244
|
-
|
|
5245
|
-
|
|
5246
|
-
|
|
5247
|
-
|
|
5248
|
-
|
|
5249
|
-
|
|
5250
|
-
|
|
5251
|
-
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
target[prop] = source[prop];
|
|
5255
|
-
if (source != null && __getOwnPropSymbols$g)
|
|
5256
|
-
for (var prop of __getOwnPropSymbols$g(source)) {
|
|
5257
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
|
|
5258
|
-
target[prop] = source[prop];
|
|
5259
|
-
}
|
|
5260
|
-
return target;
|
|
5261
|
-
};
|
|
5246
|
+
function useMounted$1() {
|
|
5247
|
+
const isMounted = ref(false);
|
|
5248
|
+
const instance = getCurrentInstance();
|
|
5249
|
+
if (instance) {
|
|
5250
|
+
onMounted(() => {
|
|
5251
|
+
isMounted.value = true;
|
|
5252
|
+
}, instance);
|
|
5253
|
+
}
|
|
5254
|
+
return isMounted;
|
|
5255
|
+
}
|
|
5256
|
+
function useSupported$1(callback) {
|
|
5257
|
+
const isMounted = useMounted$1();
|
|
5258
|
+
return computed(() => {
|
|
5259
|
+
isMounted.value;
|
|
5260
|
+
return Boolean(callback());
|
|
5261
|
+
});
|
|
5262
|
+
}
|
|
5262
5263
|
function useResizeObserver$1(target, callback, options = {}) {
|
|
5263
|
-
const
|
|
5264
|
+
const { window: window2 = defaultWindow$2, ...observerOptions } = options;
|
|
5264
5265
|
let observer;
|
|
5265
5266
|
const isSupported = useSupported$1(() => window2 && "ResizeObserver" in window2);
|
|
5266
5267
|
const cleanup = () => {
|
|
@@ -5269,13 +5270,24 @@ function useResizeObserver$1(target, callback, options = {}) {
|
|
|
5269
5270
|
observer = void 0;
|
|
5270
5271
|
}
|
|
5271
5272
|
};
|
|
5272
|
-
const
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5273
|
+
const targets = computed(() => {
|
|
5274
|
+
const _targets = toValue$1(target);
|
|
5275
|
+
return Array.isArray(_targets) ? _targets.map((el) => unrefElement$2(el)) : [unrefElement$2(_targets)];
|
|
5276
|
+
});
|
|
5277
|
+
const stopWatch = watch(
|
|
5278
|
+
targets,
|
|
5279
|
+
(els) => {
|
|
5280
|
+
cleanup();
|
|
5281
|
+
if (isSupported.value && window2) {
|
|
5282
|
+
observer = new ResizeObserver(callback);
|
|
5283
|
+
for (const _el of els) {
|
|
5284
|
+
if (_el)
|
|
5285
|
+
observer.observe(_el, observerOptions);
|
|
5286
|
+
}
|
|
5287
|
+
}
|
|
5288
|
+
},
|
|
5289
|
+
{ immediate: true, flush: "post" }
|
|
5290
|
+
);
|
|
5279
5291
|
const stop = () => {
|
|
5280
5292
|
cleanup();
|
|
5281
5293
|
stopWatch();
|
|
@@ -5289,93 +5301,59 @@ function useResizeObserver$1(target, callback, options = {}) {
|
|
|
5289
5301
|
function useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {
|
|
5290
5302
|
const { window: window2 = defaultWindow$2, box = "content-box" } = options;
|
|
5291
5303
|
const isSVG = computed(() => {
|
|
5292
|
-
var
|
|
5293
|
-
return (_b = (
|
|
5304
|
+
var _a, _b;
|
|
5305
|
+
return (_b = (_a = unrefElement$2(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes("svg");
|
|
5294
5306
|
});
|
|
5295
5307
|
const width = ref(initialSize.width);
|
|
5296
5308
|
const height = ref(initialSize.height);
|
|
5297
|
-
useResizeObserver$1(
|
|
5298
|
-
|
|
5299
|
-
|
|
5300
|
-
const
|
|
5301
|
-
if (
|
|
5302
|
-
const
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize];
|
|
5309
|
-
width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);
|
|
5310
|
-
height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);
|
|
5309
|
+
const { stop: stop1 } = useResizeObserver$1(
|
|
5310
|
+
target,
|
|
5311
|
+
([entry]) => {
|
|
5312
|
+
const boxSize = box === "border-box" ? entry.borderBoxSize : box === "content-box" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;
|
|
5313
|
+
if (window2 && isSVG.value) {
|
|
5314
|
+
const $elem = unrefElement$2(target);
|
|
5315
|
+
if ($elem) {
|
|
5316
|
+
const rect = $elem.getBoundingClientRect();
|
|
5317
|
+
width.value = rect.width;
|
|
5318
|
+
height.value = rect.height;
|
|
5319
|
+
}
|
|
5311
5320
|
} else {
|
|
5312
|
-
|
|
5313
|
-
|
|
5321
|
+
if (boxSize) {
|
|
5322
|
+
const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize];
|
|
5323
|
+
width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);
|
|
5324
|
+
height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);
|
|
5325
|
+
} else {
|
|
5326
|
+
width.value = entry.contentRect.width;
|
|
5327
|
+
height.value = entry.contentRect.height;
|
|
5328
|
+
}
|
|
5314
5329
|
}
|
|
5330
|
+
},
|
|
5331
|
+
options
|
|
5332
|
+
);
|
|
5333
|
+
tryOnMounted(() => {
|
|
5334
|
+
const ele = unrefElement$2(target);
|
|
5335
|
+
if (ele) {
|
|
5336
|
+
width.value = "offsetWidth" in ele ? ele.offsetWidth : initialSize.width;
|
|
5337
|
+
height.value = "offsetHeight" in ele ? ele.offsetHeight : initialSize.height;
|
|
5315
5338
|
}
|
|
5316
|
-
}, options);
|
|
5317
|
-
watch(() => unrefElement$2(target), (ele) => {
|
|
5318
|
-
width.value = ele ? initialSize.width : 0;
|
|
5319
|
-
height.value = ele ? initialSize.height : 0;
|
|
5320
5339
|
});
|
|
5340
|
+
const stop2 = watch(
|
|
5341
|
+
() => unrefElement$2(target),
|
|
5342
|
+
(ele) => {
|
|
5343
|
+
width.value = ele ? initialSize.width : 0;
|
|
5344
|
+
height.value = ele ? initialSize.height : 0;
|
|
5345
|
+
}
|
|
5346
|
+
);
|
|
5347
|
+
function stop() {
|
|
5348
|
+
stop1();
|
|
5349
|
+
stop2();
|
|
5350
|
+
}
|
|
5321
5351
|
return {
|
|
5322
5352
|
width,
|
|
5323
|
-
height
|
|
5353
|
+
height,
|
|
5354
|
+
stop
|
|
5324
5355
|
};
|
|
5325
5356
|
}
|
|
5326
|
-
var SwipeDirection;
|
|
5327
|
-
(function(SwipeDirection2) {
|
|
5328
|
-
SwipeDirection2["UP"] = "UP";
|
|
5329
|
-
SwipeDirection2["RIGHT"] = "RIGHT";
|
|
5330
|
-
SwipeDirection2["DOWN"] = "DOWN";
|
|
5331
|
-
SwipeDirection2["LEFT"] = "LEFT";
|
|
5332
|
-
SwipeDirection2["NONE"] = "NONE";
|
|
5333
|
-
})(SwipeDirection || (SwipeDirection = {}));
|
|
5334
|
-
var __defProp$1 = Object.defineProperty;
|
|
5335
|
-
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
5336
|
-
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
5337
|
-
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
5338
|
-
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5339
|
-
var __spreadValues$1 = (a2, b2) => {
|
|
5340
|
-
for (var prop in b2 || (b2 = {}))
|
|
5341
|
-
if (__hasOwnProp$1.call(b2, prop))
|
|
5342
|
-
__defNormalProp$1(a2, prop, b2[prop]);
|
|
5343
|
-
if (__getOwnPropSymbols$1)
|
|
5344
|
-
for (var prop of __getOwnPropSymbols$1(b2)) {
|
|
5345
|
-
if (__propIsEnum$1.call(b2, prop))
|
|
5346
|
-
__defNormalProp$1(a2, prop, b2[prop]);
|
|
5347
|
-
}
|
|
5348
|
-
return a2;
|
|
5349
|
-
};
|
|
5350
|
-
const _TransitionPresets = {
|
|
5351
|
-
easeInSine: [0.12, 0, 0.39, 0],
|
|
5352
|
-
easeOutSine: [0.61, 1, 0.88, 1],
|
|
5353
|
-
easeInOutSine: [0.37, 0, 0.63, 1],
|
|
5354
|
-
easeInQuad: [0.11, 0, 0.5, 0],
|
|
5355
|
-
easeOutQuad: [0.5, 1, 0.89, 1],
|
|
5356
|
-
easeInOutQuad: [0.45, 0, 0.55, 1],
|
|
5357
|
-
easeInCubic: [0.32, 0, 0.67, 0],
|
|
5358
|
-
easeOutCubic: [0.33, 1, 0.68, 1],
|
|
5359
|
-
easeInOutCubic: [0.65, 0, 0.35, 1],
|
|
5360
|
-
easeInQuart: [0.5, 0, 0.75, 0],
|
|
5361
|
-
easeOutQuart: [0.25, 1, 0.5, 1],
|
|
5362
|
-
easeInOutQuart: [0.76, 0, 0.24, 1],
|
|
5363
|
-
easeInQuint: [0.64, 0, 0.78, 0],
|
|
5364
|
-
easeOutQuint: [0.22, 1, 0.36, 1],
|
|
5365
|
-
easeInOutQuint: [0.83, 0, 0.17, 1],
|
|
5366
|
-
easeInExpo: [0.7, 0, 0.84, 0],
|
|
5367
|
-
easeOutExpo: [0.16, 1, 0.3, 1],
|
|
5368
|
-
easeInOutExpo: [0.87, 0, 0.13, 1],
|
|
5369
|
-
easeInCirc: [0.55, 0, 1, 0.45],
|
|
5370
|
-
easeOutCirc: [0, 0.55, 0.45, 1],
|
|
5371
|
-
easeInOutCirc: [0.85, 0, 0.15, 1],
|
|
5372
|
-
easeInBack: [0.36, 0, 0.66, -0.56],
|
|
5373
|
-
easeOutBack: [0.34, 1.56, 0.64, 1],
|
|
5374
|
-
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
5375
|
-
};
|
|
5376
|
-
__spreadValues$1({
|
|
5377
|
-
linear: identity
|
|
5378
|
-
}, _TransitionPresets);
|
|
5379
5357
|
function useVirtualList(list, options) {
|
|
5380
5358
|
const { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = "itemHeight" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);
|
|
5381
5359
|
return {
|
|
@@ -5462,8 +5440,8 @@ function createGetDistance(itemSize, source) {
|
|
|
5462
5440
|
return size;
|
|
5463
5441
|
};
|
|
5464
5442
|
}
|
|
5465
|
-
function useWatchForSizes(size, list, calculateRange) {
|
|
5466
|
-
watch([size.width, size.height, list], () => {
|
|
5443
|
+
function useWatchForSizes(size, list, containerRef, calculateRange) {
|
|
5444
|
+
watch([size.width, size.height, list, containerRef], () => {
|
|
5467
5445
|
calculateRange();
|
|
5468
5446
|
});
|
|
5469
5447
|
}
|
|
@@ -5497,7 +5475,7 @@ function useHorizontalVirtualList(options, list) {
|
|
|
5497
5475
|
const getDistanceLeft = createGetDistance(itemWidth, source);
|
|
5498
5476
|
const offsetLeft = computed(() => getDistanceLeft(state.value.start));
|
|
5499
5477
|
const totalWidth = createComputedTotalSize(itemWidth, source);
|
|
5500
|
-
useWatchForSizes(size, list, calculateRange);
|
|
5478
|
+
useWatchForSizes(size, list, containerRef, calculateRange);
|
|
5501
5479
|
const scrollTo = createScrollTo("horizontal", calculateRange, getDistanceLeft, containerRef);
|
|
5502
5480
|
const wrapperProps = computed(() => {
|
|
5503
5481
|
return {
|
|
@@ -5529,7 +5507,7 @@ function useVerticalVirtualList(options, list) {
|
|
|
5529
5507
|
const getDistanceTop = createGetDistance(itemHeight, source);
|
|
5530
5508
|
const offsetTop = computed(() => getDistanceTop(state.value.start));
|
|
5531
5509
|
const totalHeight = createComputedTotalSize(itemHeight, source);
|
|
5532
|
-
useWatchForSizes(size, list, calculateRange);
|
|
5510
|
+
useWatchForSizes(size, list, containerRef, calculateRange);
|
|
5533
5511
|
const scrollTo = createScrollTo("vertical", calculateRange, getDistanceTop, containerRef);
|
|
5534
5512
|
const wrapperProps = computed(() => {
|
|
5535
5513
|
return {
|
|
@@ -5550,9 +5528,9 @@ function useVerticalVirtualList(options, list) {
|
|
|
5550
5528
|
};
|
|
5551
5529
|
}
|
|
5552
5530
|
function unrefElement$1(elRef) {
|
|
5553
|
-
var
|
|
5554
|
-
const plain =
|
|
5555
|
-
return (
|
|
5531
|
+
var _a;
|
|
5532
|
+
const plain = toValue$1(elRef);
|
|
5533
|
+
return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;
|
|
5556
5534
|
}
|
|
5557
5535
|
const defaultWindow$1 = isClient$1 ? window : void 0;
|
|
5558
5536
|
function useEventListener$2(...args) {
|
|
@@ -5560,7 +5538,7 @@ function useEventListener$2(...args) {
|
|
|
5560
5538
|
let events;
|
|
5561
5539
|
let listeners;
|
|
5562
5540
|
let options;
|
|
5563
|
-
if (
|
|
5541
|
+
if (typeof args[0] === "string" || Array.isArray(args[0])) {
|
|
5564
5542
|
[events, listeners, options] = args;
|
|
5565
5543
|
target = defaultWindow$1;
|
|
5566
5544
|
} else {
|
|
@@ -5581,14 +5559,21 @@ function useEventListener$2(...args) {
|
|
|
5581
5559
|
el.addEventListener(event, listener, options2);
|
|
5582
5560
|
return () => el.removeEventListener(event, listener, options2);
|
|
5583
5561
|
};
|
|
5584
|
-
const stopWatch = watch(
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
|
|
5590
|
-
|
|
5591
|
-
|
|
5562
|
+
const stopWatch = watch(
|
|
5563
|
+
() => [unrefElement$1(target), toValue$1(options)],
|
|
5564
|
+
([el, options2]) => {
|
|
5565
|
+
cleanup();
|
|
5566
|
+
if (!el)
|
|
5567
|
+
return;
|
|
5568
|
+
const optionsClone = isObject$2(options2) ? { ...options2 } : options2;
|
|
5569
|
+
cleanups.push(
|
|
5570
|
+
...events.flatMap((event) => {
|
|
5571
|
+
return listeners.map((listener) => register(el, event, listener, optionsClone));
|
|
5572
|
+
})
|
|
5573
|
+
);
|
|
5574
|
+
},
|
|
5575
|
+
{ immediate: true, flush: "post" }
|
|
5576
|
+
);
|
|
5592
5577
|
const stop = () => {
|
|
5593
5578
|
stopWatch();
|
|
5594
5579
|
cleanup();
|
|
@@ -5596,12 +5581,16 @@ function useEventListener$2(...args) {
|
|
|
5596
5581
|
tryOnScopeDispose$1(stop);
|
|
5597
5582
|
return stop;
|
|
5598
5583
|
}
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
|
|
5584
|
+
function resolveElement(el) {
|
|
5585
|
+
if (typeof Window !== "undefined" && el instanceof Window)
|
|
5586
|
+
return el.document.documentElement;
|
|
5587
|
+
if (typeof Document !== "undefined" && el instanceof Document)
|
|
5588
|
+
return el.documentElement;
|
|
5589
|
+
return el;
|
|
5590
|
+
}
|
|
5602
5591
|
function checkOverflowScroll(ele) {
|
|
5603
5592
|
const style = window.getComputedStyle(ele);
|
|
5604
|
-
if (style.overflowX === "scroll" || style.overflowY === "scroll" || style.overflowX === "auto" && ele.
|
|
5593
|
+
if (style.overflowX === "scroll" || style.overflowY === "scroll" || style.overflowX === "auto" && ele.clientWidth < ele.scrollWidth || style.overflowY === "auto" && ele.clientHeight < ele.scrollHeight) {
|
|
5605
5594
|
return true;
|
|
5606
5595
|
} else {
|
|
5607
5596
|
const parent = ele.parentNode;
|
|
@@ -5621,38 +5610,52 @@ function preventDefault(rawEvent) {
|
|
|
5621
5610
|
e2.preventDefault();
|
|
5622
5611
|
return false;
|
|
5623
5612
|
}
|
|
5613
|
+
const elInitialOverflow = /* @__PURE__ */ new WeakMap();
|
|
5624
5614
|
function useScrollLock(element, initialState = false) {
|
|
5625
5615
|
const isLocked = ref(initialState);
|
|
5626
5616
|
let stopTouchMoveListener = null;
|
|
5627
|
-
let initialOverflow;
|
|
5628
|
-
watch(
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
5617
|
+
let initialOverflow = "";
|
|
5618
|
+
watch(toRef(element), (el) => {
|
|
5619
|
+
const target = resolveElement(toValue$1(el));
|
|
5620
|
+
if (target) {
|
|
5621
|
+
const ele = target;
|
|
5622
|
+
if (!elInitialOverflow.get(ele))
|
|
5623
|
+
elInitialOverflow.set(ele, ele.style.overflow);
|
|
5624
|
+
if (ele.style.overflow !== "hidden")
|
|
5625
|
+
initialOverflow = ele.style.overflow;
|
|
5626
|
+
if (ele.style.overflow === "hidden")
|
|
5627
|
+
return isLocked.value = true;
|
|
5632
5628
|
if (isLocked.value)
|
|
5633
|
-
ele.style.overflow = "hidden";
|
|
5629
|
+
return ele.style.overflow = "hidden";
|
|
5634
5630
|
}
|
|
5635
5631
|
}, {
|
|
5636
5632
|
immediate: true
|
|
5637
5633
|
});
|
|
5638
5634
|
const lock = () => {
|
|
5639
|
-
const
|
|
5640
|
-
if (!
|
|
5635
|
+
const el = resolveElement(toValue$1(element));
|
|
5636
|
+
if (!el || isLocked.value)
|
|
5641
5637
|
return;
|
|
5642
5638
|
if (isIOS) {
|
|
5643
|
-
stopTouchMoveListener = useEventListener$2(
|
|
5644
|
-
|
|
5645
|
-
|
|
5639
|
+
stopTouchMoveListener = useEventListener$2(
|
|
5640
|
+
el,
|
|
5641
|
+
"touchmove",
|
|
5642
|
+
(e2) => {
|
|
5643
|
+
preventDefault(e2);
|
|
5644
|
+
},
|
|
5645
|
+
{ passive: false }
|
|
5646
|
+
);
|
|
5646
5647
|
}
|
|
5647
|
-
|
|
5648
|
+
el.style.overflow = "hidden";
|
|
5648
5649
|
isLocked.value = true;
|
|
5649
5650
|
};
|
|
5650
5651
|
const unlock = () => {
|
|
5651
|
-
const
|
|
5652
|
-
if (!
|
|
5652
|
+
const el = resolveElement(toValue$1(element));
|
|
5653
|
+
if (!el || !isLocked.value)
|
|
5653
5654
|
return;
|
|
5654
|
-
|
|
5655
|
-
|
|
5655
|
+
if (isIOS)
|
|
5656
|
+
stopTouchMoveListener == null ? void 0 : stopTouchMoveListener();
|
|
5657
|
+
el.style.overflow = initialOverflow;
|
|
5658
|
+
elInitialOverflow.delete(el);
|
|
5656
5659
|
isLocked.value = false;
|
|
5657
5660
|
};
|
|
5658
5661
|
tryOnScopeDispose$1(unlock);
|
|
@@ -5663,12 +5666,11 @@ function useScrollLock(element, initialState = false) {
|
|
|
5663
5666
|
set(v2) {
|
|
5664
5667
|
if (v2)
|
|
5665
5668
|
lock();
|
|
5666
|
-
else
|
|
5667
|
-
unlock();
|
|
5669
|
+
else unlock();
|
|
5668
5670
|
}
|
|
5669
5671
|
});
|
|
5670
5672
|
}
|
|
5671
|
-
|
|
5673
|
+
function onScrollLock() {
|
|
5672
5674
|
let isMounted = false;
|
|
5673
5675
|
const state = ref(false);
|
|
5674
5676
|
return (el, binding) => {
|
|
@@ -5679,24 +5681,8 @@ const onScrollLock = () => {
|
|
|
5679
5681
|
const isLocked = useScrollLock(el, binding.value);
|
|
5680
5682
|
watch(state, (v2) => isLocked.value = v2);
|
|
5681
5683
|
};
|
|
5682
|
-
}
|
|
5684
|
+
}
|
|
5683
5685
|
onScrollLock();
|
|
5684
|
-
var __defProp = Object.defineProperty;
|
|
5685
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5686
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5687
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5688
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5689
|
-
var __spreadValues = (a2, b2) => {
|
|
5690
|
-
for (var prop in b2 || (b2 = {}))
|
|
5691
|
-
if (__hasOwnProp.call(b2, prop))
|
|
5692
|
-
__defNormalProp(a2, prop, b2[prop]);
|
|
5693
|
-
if (__getOwnPropSymbols)
|
|
5694
|
-
for (var prop of __getOwnPropSymbols(b2)) {
|
|
5695
|
-
if (__propIsEnum.call(b2, prop))
|
|
5696
|
-
__defNormalProp(a2, prop, b2[prop]);
|
|
5697
|
-
}
|
|
5698
|
-
return a2;
|
|
5699
|
-
};
|
|
5700
5686
|
const UseVirtualList = /* @__PURE__ */ defineComponent({
|
|
5701
5687
|
name: "UseVirtualList",
|
|
5702
5688
|
props: [
|
|
@@ -5708,18 +5694,19 @@ const UseVirtualList = /* @__PURE__ */ defineComponent({
|
|
|
5708
5694
|
const { list: listRef } = toRefs(props);
|
|
5709
5695
|
const { list, containerProps, wrapperProps, scrollTo } = useVirtualList(listRef, props.options);
|
|
5710
5696
|
expose({ scrollTo });
|
|
5711
|
-
typeof containerProps.style === "object" && !Array.isArray(containerProps.style)
|
|
5712
|
-
|
|
5713
|
-
|
|
5697
|
+
if (containerProps.style && typeof containerProps.style === "object" && !Array.isArray(containerProps.style))
|
|
5698
|
+
containerProps.style.height = props.height || "300px";
|
|
5699
|
+
return () => h$1("div", { ...containerProps }, [
|
|
5700
|
+
h$1("div", { ...wrapperProps.value }, list.value.map((item) => h$1("div", { style: { overflow: "hidden", height: item.height } }, slots.default ? slots.default(item) : "Please set content!")))
|
|
5714
5701
|
]);
|
|
5715
5702
|
}
|
|
5716
5703
|
});
|
|
5717
5704
|
const _hoisted_1$H = { key: 1 };
|
|
5718
|
-
const _hoisted_2$
|
|
5705
|
+
const _hoisted_2$s = {
|
|
5719
5706
|
class: "lew-cascader-item-padding",
|
|
5720
5707
|
style: { height: "38px" }
|
|
5721
5708
|
};
|
|
5722
|
-
const _hoisted_3$
|
|
5709
|
+
const _hoisted_3$p = ["onClick"];
|
|
5723
5710
|
const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
5724
5711
|
__name: "LewCascader",
|
|
5725
5712
|
props: /* @__PURE__ */ mergeModels(cascaderProps, {
|
|
@@ -5730,7 +5717,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
5730
5717
|
}),
|
|
5731
5718
|
emits: /* @__PURE__ */ mergeModels(["change", "blur", "clear"], ["update:modelValue"]),
|
|
5732
5719
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
5733
|
-
var
|
|
5720
|
+
var _a;
|
|
5734
5721
|
const formatTree2 = (tree, parentValuePaths = [], parentLabelPaths = []) => {
|
|
5735
5722
|
return tree.map((node) => {
|
|
5736
5723
|
const { value, label, children = [] } = node;
|
|
@@ -5754,7 +5741,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
5754
5741
|
return _node;
|
|
5755
5742
|
});
|
|
5756
5743
|
};
|
|
5757
|
-
const app = (
|
|
5744
|
+
const app = (_a = getCurrentInstance()) == null ? void 0 : _a.appContext.app;
|
|
5758
5745
|
if (app && !app.directive("tooltip")) {
|
|
5759
5746
|
app.use(LewTooltip);
|
|
5760
5747
|
}
|
|
@@ -6068,7 +6055,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
6068
6055
|
})
|
|
6069
6056
|
}, {
|
|
6070
6057
|
default: withCtx(({ data: templateProps }) => [
|
|
6071
|
-
createElementVNode("div", _hoisted_2$
|
|
6058
|
+
createElementVNode("div", _hoisted_2$s, [
|
|
6072
6059
|
createElementVNode("div", {
|
|
6073
6060
|
class: normalizeClass(["lew-cascader-item", {
|
|
6074
6061
|
"lew-cascader-item-disabled": templateProps.disabled,
|
|
@@ -6104,7 +6091,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
6104
6091
|
class: "lew-cascader-icon",
|
|
6105
6092
|
type: "chevron-right"
|
|
6106
6093
|
})) : createCommentVNode("", true)
|
|
6107
|
-
], 10, _hoisted_3$
|
|
6094
|
+
], 10, _hoisted_3$p)
|
|
6108
6095
|
])
|
|
6109
6096
|
]),
|
|
6110
6097
|
_: 2
|
|
@@ -6125,9 +6112,9 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
6125
6112
|
size: "small",
|
|
6126
6113
|
onClick: cancel
|
|
6127
6114
|
}, {
|
|
6128
|
-
default: withCtx(() => [
|
|
6115
|
+
default: withCtx(() => _cache[1] || (_cache[1] = [
|
|
6129
6116
|
createTextVNode("取消")
|
|
6130
|
-
]),
|
|
6117
|
+
])),
|
|
6131
6118
|
_: 1
|
|
6132
6119
|
}),
|
|
6133
6120
|
createVNode(unref(LewButton), {
|
|
@@ -6137,9 +6124,9 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
6137
6124
|
size: "small",
|
|
6138
6125
|
onClick: _cache[0] || (_cache[0] = ($event) => ok())
|
|
6139
6126
|
}, {
|
|
6140
|
-
default: withCtx(() => [
|
|
6127
|
+
default: withCtx(() => _cache[2] || (_cache[2] = [
|
|
6141
6128
|
createTextVNode(" 确认 ")
|
|
6142
|
-
]),
|
|
6129
|
+
])),
|
|
6143
6130
|
_: 1
|
|
6144
6131
|
}, 8, ["disabled"])
|
|
6145
6132
|
]),
|
|
@@ -6152,7 +6139,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
6152
6139
|
};
|
|
6153
6140
|
}
|
|
6154
6141
|
});
|
|
6155
|
-
const LewCascader = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["__scopeId", "data-v-
|
|
6142
|
+
const LewCascader = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["__scopeId", "data-v-3786521c"]]);
|
|
6156
6143
|
const treeModel = {
|
|
6157
6144
|
modelValue: {
|
|
6158
6145
|
type: [Array, String],
|
|
@@ -6379,12 +6366,12 @@ const tree2List = async ({
|
|
|
6379
6366
|
};
|
|
6380
6367
|
};
|
|
6381
6368
|
const _hoisted_1$G = ["onClick"];
|
|
6382
|
-
const _hoisted_2$
|
|
6383
|
-
const _hoisted_3$
|
|
6369
|
+
const _hoisted_2$r = ["onClick"];
|
|
6370
|
+
const _hoisted_3$o = {
|
|
6384
6371
|
key: 0,
|
|
6385
6372
|
class: "lew-tree-line"
|
|
6386
6373
|
};
|
|
6387
|
-
const _hoisted_4$
|
|
6374
|
+
const _hoisted_4$f = { key: 3 };
|
|
6388
6375
|
const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
6389
6376
|
__name: "LewTree",
|
|
6390
6377
|
props: /* @__PURE__ */ mergeModels(treeProps, {
|
|
@@ -6399,8 +6386,8 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
6399
6386
|
}),
|
|
6400
6387
|
emits: /* @__PURE__ */ mergeModels(["change", "initStart", "initEnd"], ["update:modelValue", "update:expandedKeys"]),
|
|
6401
6388
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
6402
|
-
var
|
|
6403
|
-
const app = (
|
|
6389
|
+
var _a;
|
|
6390
|
+
const app = (_a = getCurrentInstance()) == null ? void 0 : _a.appContext.app;
|
|
6404
6391
|
if (app && !app.directive("loading")) {
|
|
6405
6392
|
app.use(LewLoading);
|
|
6406
6393
|
}
|
|
@@ -6595,7 +6582,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
6595
6582
|
class: "lew-tree-item-label",
|
|
6596
6583
|
onClick: ($event) => select(item)
|
|
6597
6584
|
}, [
|
|
6598
|
-
item.level > 0 && _ctx.showLine ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
6585
|
+
item.level > 0 && _ctx.showLine ? (openBlock(), createElementBlock("div", _hoisted_3$o)) : createCommentVNode("", true),
|
|
6599
6586
|
_ctx.showCheckbox ? (openBlock(), createBlock(_component_lew_checkbox, {
|
|
6600
6587
|
key: 1,
|
|
6601
6588
|
certain: _ctx.multiple && unref(certainKeys).includes(item.key) && !(modelValue.value || []).includes(item.key),
|
|
@@ -6608,8 +6595,8 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
6608
6595
|
...item,
|
|
6609
6596
|
checked: _ctx.multiple ? (modelValue.value || []).includes(item.key) : modelValue.value === item.key
|
|
6610
6597
|
}
|
|
6611
|
-
}, void 0, true) : (openBlock(), createElementBlock("span", _hoisted_4$
|
|
6612
|
-
], 8, _hoisted_2$
|
|
6598
|
+
}, void 0, true) : (openBlock(), createElementBlock("span", _hoisted_4$f, toDisplayString(item.label), 1))
|
|
6599
|
+
], 8, _hoisted_2$r)
|
|
6613
6600
|
], 6)) : createCommentVNode("", true)
|
|
6614
6601
|
]),
|
|
6615
6602
|
_: 2
|
|
@@ -6894,9 +6881,9 @@ function watchDebounced(source, cb, options = {}) {
|
|
|
6894
6881
|
);
|
|
6895
6882
|
}
|
|
6896
6883
|
function unrefElement(elRef) {
|
|
6897
|
-
var
|
|
6884
|
+
var _a;
|
|
6898
6885
|
const plain = toValue(elRef);
|
|
6899
|
-
return (
|
|
6886
|
+
return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;
|
|
6900
6887
|
}
|
|
6901
6888
|
const defaultWindow = isClient ? window : void 0;
|
|
6902
6889
|
const defaultNavigator = isClient ? window.navigator : void 0;
|
|
@@ -7171,8 +7158,8 @@ function useMagicKeys(options = {}) {
|
|
|
7171
7158
|
setRefs(key, false);
|
|
7172
7159
|
}
|
|
7173
7160
|
function updateRefs(e2, value) {
|
|
7174
|
-
var
|
|
7175
|
-
const key = (
|
|
7161
|
+
var _a, _b;
|
|
7162
|
+
const key = (_a = e2.key) == null ? void 0 : _a.toLowerCase();
|
|
7176
7163
|
const code = (_b = e2.code) == null ? void 0 : _b.toLowerCase();
|
|
7177
7164
|
const values = [code, key].filter(Boolean);
|
|
7178
7165
|
if (key) {
|
|
@@ -7493,12 +7480,12 @@ const treeSelectProps = {
|
|
|
7493
7480
|
}
|
|
7494
7481
|
};
|
|
7495
7482
|
const _hoisted_1$F = ["readonly", "placeholder"];
|
|
7496
|
-
const _hoisted_2$
|
|
7497
|
-
const _hoisted_3$
|
|
7483
|
+
const _hoisted_2$q = { class: "lew-select-options-box" };
|
|
7484
|
+
const _hoisted_3$n = {
|
|
7498
7485
|
key: 0,
|
|
7499
7486
|
class: "result-count"
|
|
7500
7487
|
};
|
|
7501
|
-
const _hoisted_4$
|
|
7488
|
+
const _hoisted_4$e = { class: "tree-select-wrapper lew-scrollbar" };
|
|
7502
7489
|
const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
7503
7490
|
__name: "LewTreeSelect",
|
|
7504
7491
|
props: /* @__PURE__ */ mergeModels(treeSelectProps, {
|
|
@@ -7507,15 +7494,15 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
7507
7494
|
}),
|
|
7508
7495
|
emits: /* @__PURE__ */ mergeModels(["change", "blur", "clear"], ["update:modelValue"]),
|
|
7509
7496
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
7510
|
-
var
|
|
7511
|
-
const app = (
|
|
7497
|
+
var _a;
|
|
7498
|
+
const app = (_a = getCurrentInstance()) == null ? void 0 : _a.appContext.app;
|
|
7512
7499
|
if (app && !app.directive("tooltip")) {
|
|
7513
7500
|
app.use(LewTooltip);
|
|
7514
7501
|
}
|
|
7515
7502
|
const props = __props;
|
|
7516
7503
|
const emit = __emit;
|
|
7517
7504
|
const treeSelectValue = useModel(__props, "modelValue");
|
|
7518
|
-
if (!isString
|
|
7505
|
+
if (!isString(treeSelectValue.value)) {
|
|
7519
7506
|
throw new Error("tree-select modelValue must be a string");
|
|
7520
7507
|
}
|
|
7521
7508
|
const lewSelectRef = ref();
|
|
@@ -7541,8 +7528,8 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
7541
7528
|
// 搜索关键字备份
|
|
7542
7529
|
});
|
|
7543
7530
|
const getSelectWidth = () => {
|
|
7544
|
-
var
|
|
7545
|
-
state.selectWidth = ((
|
|
7531
|
+
var _a2;
|
|
7532
|
+
state.selectWidth = ((_a2 = lewSelectRef.value) == null ? void 0 : _a2.clientWidth) - 12;
|
|
7546
7533
|
};
|
|
7547
7534
|
const show = () => {
|
|
7548
7535
|
lewPopoverRef.value.show();
|
|
@@ -7728,9 +7715,9 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
7728
7715
|
style: normalizeStyle(`width:${unref(state).selectWidth}px`)
|
|
7729
7716
|
}, [
|
|
7730
7717
|
renderSlot(_ctx.$slots, "header", {}, void 0, true),
|
|
7731
|
-
createElementVNode("div", _hoisted_2$
|
|
7732
|
-
_ctx.searchable && (unref(state).treeList || []).length > 0 ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
7733
|
-
createElementVNode("div", _hoisted_4$
|
|
7718
|
+
createElementVNode("div", _hoisted_2$q, [
|
|
7719
|
+
_ctx.searchable && (unref(state).treeList || []).length > 0 ? (openBlock(), createElementBlock("div", _hoisted_3$n, " 共 " + toDisplayString(unref(numFormat)(unref(searchCount))) + " 条结果 ", 1)) : createCommentVNode("", true),
|
|
7720
|
+
createElementVNode("div", _hoisted_4$e, [
|
|
7734
7721
|
createVNode(unref(LewTree), mergeProps({
|
|
7735
7722
|
ref_key: "lewTreeRef",
|
|
7736
7723
|
ref: lewTreeRef,
|
|
@@ -7776,7 +7763,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
7776
7763
|
};
|
|
7777
7764
|
}
|
|
7778
7765
|
});
|
|
7779
|
-
const LewTreeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-
|
|
7766
|
+
const LewTreeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-a5e04f6f"]]);
|
|
7780
7767
|
const tabsModel = {
|
|
7781
7768
|
modelValue: {
|
|
7782
7769
|
type: [String, Number],
|
|
@@ -8034,7 +8021,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
8034
8021
|
style: normalizeStyle(unref(state).activeItemStyle),
|
|
8035
8022
|
class: normalizeClass(["lew-tabs-item-animation-active", { "lew-tabs-item-isInit": unref(state).isInit }])
|
|
8036
8023
|
}, null, 6)) : createCommentVNode("", true),
|
|
8037
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
8024
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(props.options, (item) => {
|
|
8038
8025
|
return openBlock(), createElementBlock("div", {
|
|
8039
8026
|
key: String(item.value),
|
|
8040
8027
|
ref_for: true,
|
|
@@ -8049,7 +8036,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
8049
8036
|
};
|
|
8050
8037
|
}
|
|
8051
8038
|
});
|
|
8052
|
-
const LewTabs = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-
|
|
8039
|
+
const LewTabs = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-170eac3f"]]);
|
|
8053
8040
|
const breadcrumbProps = {
|
|
8054
8041
|
options: {
|
|
8055
8042
|
type: Array,
|
|
@@ -8095,14 +8082,13 @@ const breadcrumbProps = {
|
|
|
8095
8082
|
}
|
|
8096
8083
|
}
|
|
8097
8084
|
};
|
|
8098
|
-
const _withScopeId$2 = (n2) => (pushScopeId("data-v-6bcd43f4"), n2 = n2(), popScopeId(), n2);
|
|
8099
8085
|
const _hoisted_1$D = { class: "lew-breadcrumb" };
|
|
8100
|
-
const _hoisted_2$
|
|
8101
|
-
const _hoisted_3$
|
|
8086
|
+
const _hoisted_2$p = ["onClick"];
|
|
8087
|
+
const _hoisted_3$m = {
|
|
8102
8088
|
key: 0,
|
|
8103
8089
|
class: "lew-breadcrumb-parting"
|
|
8104
8090
|
};
|
|
8105
|
-
const _hoisted_4$
|
|
8091
|
+
const _hoisted_4$d = {
|
|
8106
8092
|
key: 0,
|
|
8107
8093
|
viewBox: "0 0 48 48",
|
|
8108
8094
|
fill: "none",
|
|
@@ -8112,11 +8098,7 @@ const _hoisted_4$e = {
|
|
|
8112
8098
|
"stroke-linecap": "butt",
|
|
8113
8099
|
"stroke-linejoin": "miter"
|
|
8114
8100
|
};
|
|
8115
|
-
const _hoisted_5$a =
|
|
8116
|
-
const _hoisted_6$8 = [
|
|
8117
|
-
_hoisted_5$a
|
|
8118
|
-
];
|
|
8119
|
-
const _hoisted_7$4 = {
|
|
8101
|
+
const _hoisted_5$a = {
|
|
8120
8102
|
key: 1,
|
|
8121
8103
|
viewBox: "0 0 48 48",
|
|
8122
8104
|
fill: "none",
|
|
@@ -8126,10 +8108,6 @@ const _hoisted_7$4 = {
|
|
|
8126
8108
|
"stroke-linecap": "butt",
|
|
8127
8109
|
"stroke-linejoin": "miter"
|
|
8128
8110
|
};
|
|
8129
|
-
const _hoisted_8$4 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("path", { d: "m16 39.513 15.556-15.557L16 8.4" }, null, -1));
|
|
8130
|
-
const _hoisted_9$4 = [
|
|
8131
|
-
_hoisted_8$4
|
|
8132
|
-
];
|
|
8133
8111
|
const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
8134
8112
|
__name: "LewBreadcrumb",
|
|
8135
8113
|
props: breadcrumbProps,
|
|
@@ -8146,10 +8124,14 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
8146
8124
|
createElementVNode("span", {
|
|
8147
8125
|
class: normalizeClass({ "lew-breadcrumb-isPath": !!item.value }),
|
|
8148
8126
|
onClick: ($event) => emit("change", item)
|
|
8149
|
-
}, toDisplayString(item.label), 11, _hoisted_2$
|
|
8150
|
-
index2 != _ctx.options.length - 1 ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
8151
|
-
_ctx.iconType === "sprit" ? (openBlock(), createElementBlock("svg", _hoisted_4$
|
|
8152
|
-
|
|
8127
|
+
}, toDisplayString(item.label), 11, _hoisted_2$p),
|
|
8128
|
+
index2 != _ctx.options.length - 1 ? (openBlock(), createElementBlock("div", _hoisted_3$m, [
|
|
8129
|
+
_ctx.iconType === "sprit" ? (openBlock(), createElementBlock("svg", _hoisted_4$d, _cache[0] || (_cache[0] = [
|
|
8130
|
+
createElementVNode("path", { d: "M29.506 6.502 18.493 41.498" }, null, -1)
|
|
8131
|
+
]))) : createCommentVNode("", true),
|
|
8132
|
+
_ctx.iconType === "shoulder" ? (openBlock(), createElementBlock("svg", _hoisted_5$a, _cache[1] || (_cache[1] = [
|
|
8133
|
+
createElementVNode("path", { d: "m16 39.513 15.556-15.557L16 8.4" }, null, -1)
|
|
8134
|
+
]))) : createCommentVNode("", true)
|
|
8153
8135
|
])) : createCommentVNode("", true)
|
|
8154
8136
|
], 2);
|
|
8155
8137
|
}), 128))
|
|
@@ -8215,6 +8197,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
8215
8197
|
props: dropdownProps,
|
|
8216
8198
|
emits: ["change"],
|
|
8217
8199
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
8200
|
+
const emit = __emit;
|
|
8218
8201
|
const lewPopoverRef = ref();
|
|
8219
8202
|
const show = () => {
|
|
8220
8203
|
lewPopoverRef.value.show();
|
|
@@ -8222,17 +8205,19 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
8222
8205
|
const hide2 = () => {
|
|
8223
8206
|
lewPopoverRef.value.hide();
|
|
8224
8207
|
};
|
|
8225
|
-
const emit = __emit;
|
|
8226
8208
|
const change = (item) => {
|
|
8227
8209
|
emit("change", item);
|
|
8228
8210
|
hide2();
|
|
8229
8211
|
};
|
|
8230
|
-
__expose({
|
|
8212
|
+
__expose({
|
|
8213
|
+
show,
|
|
8214
|
+
hide: hide2
|
|
8215
|
+
});
|
|
8231
8216
|
return (_ctx, _cache) => {
|
|
8232
8217
|
return openBlock(), createBlock(unref(_sfc_main$j), {
|
|
8233
8218
|
ref_key: "lewPopoverRef",
|
|
8234
8219
|
ref: lewPopoverRef,
|
|
8235
|
-
|
|
8220
|
+
"popover-body-class-name": "lew-dropdown-popover-body",
|
|
8236
8221
|
trigger: _ctx.trigger,
|
|
8237
8222
|
placement: _ctx.placement
|
|
8238
8223
|
}, {
|
|
@@ -8296,12 +8281,12 @@ const stepsProps = {
|
|
|
8296
8281
|
}
|
|
8297
8282
|
};
|
|
8298
8283
|
const _hoisted_1$C = { class: "lew-steps lew-scrollbar" };
|
|
8299
|
-
const _hoisted_2$
|
|
8300
|
-
const _hoisted_3$
|
|
8284
|
+
const _hoisted_2$o = { class: "lew-steps-item-index" };
|
|
8285
|
+
const _hoisted_3$l = {
|
|
8301
8286
|
key: 4,
|
|
8302
8287
|
class: "index"
|
|
8303
8288
|
};
|
|
8304
|
-
const _hoisted_4$
|
|
8289
|
+
const _hoisted_4$c = { class: "lew-steps-item-info" };
|
|
8305
8290
|
const _hoisted_5$9 = { class: "lew-steps-item-title" };
|
|
8306
8291
|
const _hoisted_6$7 = { class: "lew-steps-item-description" };
|
|
8307
8292
|
const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
@@ -8328,7 +8313,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
8328
8313
|
"lew-steps-item-done": index2 === (stepsValue.value || 1) - 1 && _ctx.status === "done"
|
|
8329
8314
|
}])
|
|
8330
8315
|
}, [
|
|
8331
|
-
createElementVNode("div", _hoisted_2$
|
|
8316
|
+
createElementVNode("div", _hoisted_2$o, [
|
|
8332
8317
|
index2 === (stepsValue.value || 1) - 1 && _ctx.status === "loading" ? (openBlock(), createBlock(_component_lew_icon, {
|
|
8333
8318
|
key: 0,
|
|
8334
8319
|
size: "16",
|
|
@@ -8352,9 +8337,9 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
8352
8337
|
size: "16",
|
|
8353
8338
|
"stroke-width": "3",
|
|
8354
8339
|
type: "check"
|
|
8355
|
-
})) : (openBlock(), createElementBlock("span", _hoisted_3$
|
|
8340
|
+
})) : (openBlock(), createElementBlock("span", _hoisted_3$l, toDisplayString(index2 + 1), 1))
|
|
8356
8341
|
]),
|
|
8357
|
-
createElementVNode("div", _hoisted_4$
|
|
8342
|
+
createElementVNode("div", _hoisted_4$c, [
|
|
8358
8343
|
createElementVNode("div", _hoisted_5$9, [
|
|
8359
8344
|
createVNode(_component_lew_text_trim, {
|
|
8360
8345
|
placement: "bottom",
|
|
@@ -8554,12 +8539,12 @@ const _hoisted_1$B = {
|
|
|
8554
8539
|
key: 0,
|
|
8555
8540
|
class: "lew-input-prefixes"
|
|
8556
8541
|
};
|
|
8557
|
-
const _hoisted_2$
|
|
8558
|
-
const _hoisted_3$
|
|
8542
|
+
const _hoisted_2$n = { key: 0 };
|
|
8543
|
+
const _hoisted_3$k = {
|
|
8559
8544
|
key: 1,
|
|
8560
8545
|
class: "lew-input-prefixes-icon"
|
|
8561
8546
|
};
|
|
8562
|
-
const _hoisted_4$
|
|
8547
|
+
const _hoisted_4$b = {
|
|
8563
8548
|
key: 2,
|
|
8564
8549
|
class: "lew-input-prefixes-select"
|
|
8565
8550
|
};
|
|
@@ -8601,9 +8586,9 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
8601
8586
|
}),
|
|
8602
8587
|
emits: /* @__PURE__ */ mergeModels(["clear", "blur", "focus", "change", "input", "ok"], ["update:modelValue", "update:prefixesValue", "update:suffixValue"]),
|
|
8603
8588
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
8604
|
-
var
|
|
8589
|
+
var _a;
|
|
8605
8590
|
const { enter } = useMagicKeys();
|
|
8606
|
-
const app = (
|
|
8591
|
+
const app = (_a = getCurrentInstance()) == null ? void 0 : _a.appContext.app;
|
|
8607
8592
|
if (app && !app.directive("tooltip")) {
|
|
8608
8593
|
app.use(LewTooltip);
|
|
8609
8594
|
}
|
|
@@ -8635,16 +8620,16 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
8635
8620
|
emit("clear");
|
|
8636
8621
|
};
|
|
8637
8622
|
const toFocus = () => {
|
|
8638
|
-
var
|
|
8639
|
-
return (
|
|
8623
|
+
var _a2;
|
|
8624
|
+
return (_a2 = lewInputRef.value) == null ? void 0 : _a2.focus();
|
|
8640
8625
|
};
|
|
8641
8626
|
const showPasswordFn = () => {
|
|
8642
8627
|
_type.value = _type.value === "text" ? "password" : "text";
|
|
8643
8628
|
};
|
|
8644
8629
|
const focus = (e2) => {
|
|
8645
|
-
var
|
|
8630
|
+
var _a2;
|
|
8646
8631
|
if (props.selectByFocus) {
|
|
8647
|
-
(
|
|
8632
|
+
(_a2 = e2.currentTarget) == null ? void 0 : _a2.select();
|
|
8648
8633
|
}
|
|
8649
8634
|
emit("focus");
|
|
8650
8635
|
isFocus.value = true;
|
|
@@ -8661,9 +8646,9 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
8661
8646
|
})[props.size]
|
|
8662
8647
|
);
|
|
8663
8648
|
const getInputStyle = computed(() => {
|
|
8664
|
-
var
|
|
8649
|
+
var _a2;
|
|
8665
8650
|
const { clearable, showCount } = props;
|
|
8666
|
-
const countWidth = ((
|
|
8651
|
+
const countWidth = ((_a2 = lewInputCountRef.value) == null ? void 0 : _a2.offsetWidth) || 0;
|
|
8667
8652
|
return {
|
|
8668
8653
|
width: `calc(100% - ${clearable ? 20 + countWidth + (showCount ? 12 : 0) : 0}px)`
|
|
8669
8654
|
};
|
|
@@ -8680,12 +8665,12 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
8680
8665
|
suffixValue.value = item.value;
|
|
8681
8666
|
};
|
|
8682
8667
|
const getPrefixesLabel = computed(() => {
|
|
8683
|
-
var
|
|
8684
|
-
return ((
|
|
8668
|
+
var _a2;
|
|
8669
|
+
return ((_a2 = props.prefixesOptions.find((e2) => e2.value === prefixesValue.value)) == null ? void 0 : _a2.label) || "";
|
|
8685
8670
|
});
|
|
8686
8671
|
const getSuffixLabel = computed(() => {
|
|
8687
|
-
var
|
|
8688
|
-
return ((
|
|
8672
|
+
var _a2;
|
|
8673
|
+
return ((_a2 = props.suffixOptions.find((e2) => e2.value === suffixValue.value)) == null ? void 0 : _a2.label) || "";
|
|
8689
8674
|
});
|
|
8690
8675
|
const copy = () => {
|
|
8691
8676
|
const textarea = document.createElement("textarea");
|
|
@@ -8724,14 +8709,14 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
8724
8709
|
class: normalizeClass(["lew-input-view", unref(getInputClassNames)])
|
|
8725
8710
|
}, [
|
|
8726
8711
|
_ctx.prefixes ? withDirectives((openBlock(), createElementBlock("div", _hoisted_1$B, [
|
|
8727
|
-
_ctx.prefixes === "text" ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
8728
|
-
_ctx.prefixes === "icon" ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
8712
|
+
_ctx.prefixes === "text" ? (openBlock(), createElementBlock("div", _hoisted_2$n, toDisplayString(prefixesValue.value), 1)) : createCommentVNode("", true),
|
|
8713
|
+
_ctx.prefixes === "icon" ? (openBlock(), createElementBlock("div", _hoisted_3$k, [
|
|
8729
8714
|
createVNode(unref(script), {
|
|
8730
8715
|
size: unref(getIconSize),
|
|
8731
8716
|
type: prefixesValue.value
|
|
8732
8717
|
}, null, 8, ["size", "type"])
|
|
8733
8718
|
])) : createCommentVNode("", true),
|
|
8734
|
-
_ctx.prefixes === "select" ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
8719
|
+
_ctx.prefixes === "select" ? (openBlock(), createElementBlock("div", _hoisted_4$b, [
|
|
8735
8720
|
createVNode(unref(_sfc_main$Q), {
|
|
8736
8721
|
placement: "bottom",
|
|
8737
8722
|
trigger: "click",
|
|
@@ -8903,7 +8888,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
8903
8888
|
};
|
|
8904
8889
|
}
|
|
8905
8890
|
});
|
|
8906
|
-
const LewInput = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__scopeId", "data-v-
|
|
8891
|
+
const LewInput = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__scopeId", "data-v-b7634168"]]);
|
|
8907
8892
|
const inputNumberModel = {
|
|
8908
8893
|
modelValue: {
|
|
8909
8894
|
type: Number,
|
|
@@ -9019,8 +9004,8 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
9019
9004
|
}),
|
|
9020
9005
|
emits: /* @__PURE__ */ mergeModels(["blur", "focus", "change", "input"], ["update:modelValue"]),
|
|
9021
9006
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
9022
|
-
var
|
|
9023
|
-
const app = (
|
|
9007
|
+
var _a;
|
|
9008
|
+
const app = (_a = getCurrentInstance()) == null ? void 0 : _a.appContext.app;
|
|
9024
9009
|
if (app && !app.directive("tooltip")) {
|
|
9025
9010
|
app.use(LewTooltip);
|
|
9026
9011
|
}
|
|
@@ -9031,13 +9016,13 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
9031
9016
|
const isFocus = ref(false);
|
|
9032
9017
|
const validationMessage = ref("");
|
|
9033
9018
|
const toFocus = () => {
|
|
9034
|
-
var
|
|
9035
|
-
(
|
|
9019
|
+
var _a2;
|
|
9020
|
+
(_a2 = lewInputRef.value) == null ? void 0 : _a2.focus();
|
|
9036
9021
|
};
|
|
9037
9022
|
const focus = (e2) => {
|
|
9038
|
-
var
|
|
9023
|
+
var _a2;
|
|
9039
9024
|
if (props.selectByFocus) {
|
|
9040
|
-
(
|
|
9025
|
+
(_a2 = e2 == null ? void 0 : e2.currentTarget) == null ? void 0 : _a2.select();
|
|
9041
9026
|
}
|
|
9042
9027
|
emit("focus");
|
|
9043
9028
|
};
|
|
@@ -9191,7 +9176,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
9191
9176
|
};
|
|
9192
9177
|
}
|
|
9193
9178
|
});
|
|
9194
|
-
const LewInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-
|
|
9179
|
+
const LewInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-4d9fff2a"]]);
|
|
9195
9180
|
const textareaModel = {
|
|
9196
9181
|
modelValue: {
|
|
9197
9182
|
type: String,
|
|
@@ -9304,7 +9289,7 @@ const textareaProps = {
|
|
|
9304
9289
|
}
|
|
9305
9290
|
};
|
|
9306
9291
|
const _hoisted_1$z = ["placeholder", "maxlength", "disabled", "readonly"];
|
|
9307
|
-
const _hoisted_2$
|
|
9292
|
+
const _hoisted_2$m = {
|
|
9308
9293
|
key: 0,
|
|
9309
9294
|
class: "lew-textarea-count"
|
|
9310
9295
|
};
|
|
@@ -9325,9 +9310,9 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
9325
9310
|
"ok"
|
|
9326
9311
|
], ["update:modelValue"]),
|
|
9327
9312
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
9328
|
-
var
|
|
9313
|
+
var _a;
|
|
9329
9314
|
const { shift, enter } = useMagicKeys();
|
|
9330
|
-
const app = (
|
|
9315
|
+
const app = (_a = getCurrentInstance()) == null ? void 0 : _a.appContext.app;
|
|
9331
9316
|
if (app && !app.directive("tooltip")) {
|
|
9332
9317
|
app.use(LewTooltip);
|
|
9333
9318
|
}
|
|
@@ -9357,8 +9342,8 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
9357
9342
|
emit("clear");
|
|
9358
9343
|
};
|
|
9359
9344
|
const toFocus = () => {
|
|
9360
|
-
var
|
|
9361
|
-
(
|
|
9345
|
+
var _a2;
|
|
9346
|
+
(_a2 = lewTextareaRef.value) == null ? void 0 : _a2.focus();
|
|
9362
9347
|
};
|
|
9363
9348
|
const getTextareaClassNames = computed(() => {
|
|
9364
9349
|
const { size, readonly: readonly2, disabled } = props;
|
|
@@ -9369,9 +9354,9 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
9369
9354
|
});
|
|
9370
9355
|
});
|
|
9371
9356
|
const focus = (e2) => {
|
|
9372
|
-
var
|
|
9357
|
+
var _a2;
|
|
9373
9358
|
if (props.selectByFocus) {
|
|
9374
|
-
(
|
|
9359
|
+
(_a2 = e2 == null ? void 0 : e2.currentTarget) == null ? void 0 : _a2.select();
|
|
9375
9360
|
}
|
|
9376
9361
|
state.isFocus = true;
|
|
9377
9362
|
emit("focus");
|
|
@@ -9412,11 +9397,11 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
9412
9397
|
});
|
|
9413
9398
|
if (props.okByEnter) {
|
|
9414
9399
|
watchEffect(() => {
|
|
9415
|
-
var
|
|
9400
|
+
var _a2;
|
|
9416
9401
|
if (shift.value && enter.value) {
|
|
9417
9402
|
return;
|
|
9418
9403
|
} else if (enter.value && state.isFocus) {
|
|
9419
|
-
(
|
|
9404
|
+
(_a2 = lewTextareaRef.value) == null ? void 0 : _a2.blur();
|
|
9420
9405
|
ok();
|
|
9421
9406
|
}
|
|
9422
9407
|
});
|
|
@@ -9448,7 +9433,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
9448
9433
|
}, null, 40, _hoisted_1$z), [
|
|
9449
9434
|
[vModelText, modelValue.value]
|
|
9450
9435
|
]),
|
|
9451
|
-
modelValue.value && _ctx.showCount ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
9436
|
+
modelValue.value && _ctx.showCount ? (openBlock(), createElementBlock("div", _hoisted_2$m, toDisplayString(modelValue.value.length) + toDisplayString(_ctx.maxLength ? " / " + _ctx.maxLength : ""), 1)) : createCommentVNode("", true),
|
|
9452
9437
|
createVNode(Transition, { name: "lew-form-icon-ani" }, {
|
|
9453
9438
|
default: withCtx(() => [
|
|
9454
9439
|
_ctx.clearable && modelValue.value && !_ctx.readonly ? (openBlock(), createBlock(unref(script), {
|
|
@@ -9665,14 +9650,6 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
9665
9650
|
});
|
|
9666
9651
|
const LewInputTag = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-e1cc86e4"]]);
|
|
9667
9652
|
const _hoisted_1$y = ["width", "height"];
|
|
9668
|
-
const _hoisted_2$o = /* @__PURE__ */ createElementVNode("path", {
|
|
9669
|
-
d: "M515.824463 1024h-7.648926A79.35761 79.35761 0 0 1 429.774043 945.598506V78.401494A79.35761 79.35761 0 0 1 508.175537 0h7.648926a79.35761 79.35761 0 0 1 79.35761 78.401494v867.197012a79.35761 79.35761 0 0 1-79.35761 78.401494zM61.669468 771.585434L57.845005 764.892624a77.445378 77.445378 0 0 1 28.683473-106.128852l764.892624-434.076564a80.313725 80.313725 0 0 1 108.997199 28.683474v6.69281a77.445378 77.445378 0 0 1-28.683474 106.128852l-764.892623 434.076564a80.313725 80.313725 0 0 1-108.997199-28.683474z m0-511.521942v-6.69281a80.313725 80.313725 0 0 1 108.997199-28.683474l764.892623 434.076564A77.445378 77.445378 0 0 1 965.19888 764.892624v6.69281a80.313725 80.313725 0 0 1-108.997199 28.683474l-764.892624-434.076564a77.445378 77.445378 0 0 1-28.683473-106.128852z",
|
|
9670
|
-
fill: "#DF3F52",
|
|
9671
|
-
"p-id": "10883"
|
|
9672
|
-
}, null, -1);
|
|
9673
|
-
const _hoisted_3$k = [
|
|
9674
|
-
_hoisted_2$o
|
|
9675
|
-
];
|
|
9676
9653
|
const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
9677
9654
|
__name: "RequiredIcon",
|
|
9678
9655
|
props: {
|
|
@@ -9692,7 +9669,13 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
9692
9669
|
"p-id": "10882",
|
|
9693
9670
|
width: __props.size,
|
|
9694
9671
|
height: __props.size
|
|
9695
|
-
},
|
|
9672
|
+
}, _cache[0] || (_cache[0] = [
|
|
9673
|
+
createElementVNode("path", {
|
|
9674
|
+
d: "M515.824463 1024h-7.648926A79.35761 79.35761 0 0 1 429.774043 945.598506V78.401494A79.35761 79.35761 0 0 1 508.175537 0h7.648926a79.35761 79.35761 0 0 1 79.35761 78.401494v867.197012a79.35761 79.35761 0 0 1-79.35761 78.401494zM61.669468 771.585434L57.845005 764.892624a77.445378 77.445378 0 0 1 28.683473-106.128852l764.892624-434.076564a80.313725 80.313725 0 0 1 108.997199 28.683474v6.69281a77.445378 77.445378 0 0 1-28.683474 106.128852l-764.892623 434.076564a80.313725 80.313725 0 0 1-108.997199-28.683474z m0-511.521942v-6.69281a80.313725 80.313725 0 0 1 108.997199-28.683474l764.892623 434.076564A77.445378 77.445378 0 0 1 965.19888 764.892624v6.69281a80.313725 80.313725 0 0 1-108.997199 28.683474l-764.892624-434.076564a77.445378 77.445378 0 0 1-28.683473-106.128852z",
|
|
9675
|
+
fill: "#DF3F52",
|
|
9676
|
+
"p-id": "10883"
|
|
9677
|
+
}, null, -1)
|
|
9678
|
+
]), 8, _hoisted_1$y);
|
|
9696
9679
|
};
|
|
9697
9680
|
}
|
|
9698
9681
|
});
|
|
@@ -9938,8 +9921,8 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
9938
9921
|
setup(__props, { expose: __expose }) {
|
|
9939
9922
|
const formLabelRef = ref();
|
|
9940
9923
|
const getWidth = () => {
|
|
9941
|
-
var
|
|
9942
|
-
return (
|
|
9924
|
+
var _a;
|
|
9925
|
+
return (_a = formLabelRef.value) == null ? void 0 : _a.offsetWidth;
|
|
9943
9926
|
};
|
|
9944
9927
|
__expose({
|
|
9945
9928
|
getWidth
|
|
@@ -10045,7 +10028,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
10045
10028
|
};
|
|
10046
10029
|
__expose({ validate, setError });
|
|
10047
10030
|
return (_ctx, _cache) => {
|
|
10048
|
-
var
|
|
10031
|
+
var _a;
|
|
10049
10032
|
const _component_lew_text_trim = resolveComponent("lew-text-trim");
|
|
10050
10033
|
const _directive_tooltip = resolveDirective("tooltip");
|
|
10051
10034
|
return openBlock(), createElementBlock("div", {
|
|
@@ -10078,7 +10061,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
10078
10061
|
createElementVNode("div", {
|
|
10079
10062
|
class: normalizeClass(["lew-form-item-main", { "lew-form-item-error": unref(errMsg) }]),
|
|
10080
10063
|
style: normalizeStyle({
|
|
10081
|
-
width: _ctx.direction === "x" ? `calc(${(
|
|
10064
|
+
width: _ctx.direction === "x" ? `calc(${(_a = unref(formItemRef)) == null ? void 0 : _a.offsetWidth}px - ${unref(any2px)(_ctx.labelWidth)} - 10px)` : "100%",
|
|
10082
10065
|
justifyContent: _ctx.direction === "x" && _ctx.between ? "flex-end" : "flex-start"
|
|
10083
10066
|
})
|
|
10084
10067
|
}, [
|
|
@@ -11805,12 +11788,12 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
11805
11788
|
const autoLabelWidth = ref(0);
|
|
11806
11789
|
let componentOptions = cloneDeep(props.options) || [];
|
|
11807
11790
|
componentOptions.forEach((item) => {
|
|
11808
|
-
var
|
|
11791
|
+
var _a, _b;
|
|
11809
11792
|
let { rule } = item;
|
|
11810
11793
|
if (item.required) {
|
|
11811
11794
|
if (!rule) {
|
|
11812
|
-
item.rule = create$8().required("此项必填");
|
|
11813
|
-
} else if (((
|
|
11795
|
+
item.rule = create$8().required("此项必填").test("非空", "此项必填", (value) => value !== "");
|
|
11796
|
+
} else if (((_a = rule == null ? void 0 : rule.spec) == null ? void 0 : _a.optional) === true) {
|
|
11814
11797
|
item.rule = merge(rule, create$8().required("此项必填"));
|
|
11815
11798
|
}
|
|
11816
11799
|
} else {
|
|
@@ -11837,19 +11820,19 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
11837
11820
|
const getForm = () => formatFormByMap(cloneDeep(formMap.value));
|
|
11838
11821
|
const setForm = (value = {}) => {
|
|
11839
11822
|
componentOptions.forEach((item) => {
|
|
11840
|
-
var
|
|
11823
|
+
var _a;
|
|
11841
11824
|
const v2 = getNestedFieldValue(value, item.field);
|
|
11842
11825
|
if (value !== void 0 && item.field) {
|
|
11843
|
-
(
|
|
11826
|
+
(_a = formItemRefMap.value[item.field]) == null ? void 0 : _a.setError("");
|
|
11844
11827
|
formMap.value[item.field] = v2;
|
|
11845
11828
|
}
|
|
11846
11829
|
});
|
|
11847
11830
|
};
|
|
11848
11831
|
const resetError = () => {
|
|
11849
11832
|
componentOptions.forEach((item) => {
|
|
11850
|
-
var
|
|
11833
|
+
var _a;
|
|
11851
11834
|
if (item.field) {
|
|
11852
|
-
(
|
|
11835
|
+
(_a = formItemRefMap.value[item.field]) == null ? void 0 : _a.setError("");
|
|
11853
11836
|
}
|
|
11854
11837
|
});
|
|
11855
11838
|
};
|
|
@@ -11890,16 +11873,16 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
11890
11873
|
});
|
|
11891
11874
|
};
|
|
11892
11875
|
onMounted(() => {
|
|
11893
|
-
var
|
|
11894
|
-
autoLabelWidth.value = (
|
|
11876
|
+
var _a;
|
|
11877
|
+
autoLabelWidth.value = (_a = formLabelRef.value) == null ? void 0 : _a.getWidth();
|
|
11895
11878
|
emit("mounted");
|
|
11896
11879
|
});
|
|
11897
11880
|
watch(
|
|
11898
11881
|
() => props.size,
|
|
11899
11882
|
() => {
|
|
11900
11883
|
nextTick(() => {
|
|
11901
|
-
var
|
|
11902
|
-
autoLabelWidth.value = (
|
|
11884
|
+
var _a;
|
|
11885
|
+
autoLabelWidth.value = (_a = formLabelRef.value) == null ? void 0 : _a.getWidth();
|
|
11903
11886
|
});
|
|
11904
11887
|
}
|
|
11905
11888
|
);
|
|
@@ -11939,7 +11922,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
11939
11922
|
};
|
|
11940
11923
|
}
|
|
11941
11924
|
});
|
|
11942
|
-
const LewForm = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-
|
|
11925
|
+
const LewForm = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-4cef472f"]]);
|
|
11943
11926
|
const checkboxModel = {
|
|
11944
11927
|
modelValue: {
|
|
11945
11928
|
type: Boolean,
|
|
@@ -12077,9 +12060,9 @@ const _hoisted_1$x = {
|
|
|
12077
12060
|
key: 0,
|
|
12078
12061
|
class: "icon-checkbox-box"
|
|
12079
12062
|
};
|
|
12080
|
-
const _hoisted_2$
|
|
12063
|
+
const _hoisted_2$l = { class: "icon-certain" };
|
|
12081
12064
|
const _hoisted_3$j = ["checked"];
|
|
12082
|
-
const _hoisted_4$
|
|
12065
|
+
const _hoisted_4$a = {
|
|
12083
12066
|
key: 1,
|
|
12084
12067
|
class: "lew-checkbox-label"
|
|
12085
12068
|
};
|
|
@@ -12135,7 +12118,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
12135
12118
|
class: normalizeClass(["lew-checkbox", unref(getCheckboxClassName)])
|
|
12136
12119
|
}, [
|
|
12137
12120
|
_ctx.iconable || !_ctx.iconable && !_ctx.block ? (openBlock(), createElementBlock("div", _hoisted_1$x, [
|
|
12138
|
-
withDirectives(createElementVNode("i", _hoisted_2$
|
|
12121
|
+
withDirectives(createElementVNode("i", _hoisted_2$l, null, 512), [
|
|
12139
12122
|
[vShow, _ctx.certain]
|
|
12140
12123
|
]),
|
|
12141
12124
|
createVNode(_component_lew_icon, {
|
|
@@ -12152,7 +12135,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
12152
12135
|
}, null, 40, _hoisted_3$j), [
|
|
12153
12136
|
[vShow, false]
|
|
12154
12137
|
]),
|
|
12155
|
-
_ctx.label ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
12138
|
+
_ctx.label ? (openBlock(), createElementBlock("span", _hoisted_4$a, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true)
|
|
12156
12139
|
], 2);
|
|
12157
12140
|
};
|
|
12158
12141
|
}
|
|
@@ -12247,7 +12230,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
12247
12230
|
};
|
|
12248
12231
|
}
|
|
12249
12232
|
});
|
|
12250
|
-
const LewCheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-
|
|
12233
|
+
const LewCheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-ceafad74"]]);
|
|
12251
12234
|
const radioProps = {
|
|
12252
12235
|
checked: {
|
|
12253
12236
|
type: Boolean,
|
|
@@ -12369,7 +12352,7 @@ const _hoisted_1$w = {
|
|
|
12369
12352
|
key: 0,
|
|
12370
12353
|
class: "icon-radio-box"
|
|
12371
12354
|
};
|
|
12372
|
-
const _hoisted_2$
|
|
12355
|
+
const _hoisted_2$k = ["checked"];
|
|
12373
12356
|
const _hoisted_3$i = {
|
|
12374
12357
|
key: 1,
|
|
12375
12358
|
class: "lew-radio-label"
|
|
@@ -12427,7 +12410,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
12427
12410
|
type: "radio",
|
|
12428
12411
|
checked: _ctx.checked,
|
|
12429
12412
|
onChange: setChecked
|
|
12430
|
-
}, null, 40, _hoisted_2$
|
|
12413
|
+
}, null, 40, _hoisted_2$k), [
|
|
12431
12414
|
[vShow, false]
|
|
12432
12415
|
]),
|
|
12433
12416
|
_ctx.label ? (openBlock(), createElementBlock("span", _hoisted_3$i, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true)
|
|
@@ -12522,7 +12505,16 @@ const selectProps = {
|
|
|
12522
12505
|
size: {
|
|
12523
12506
|
type: String,
|
|
12524
12507
|
default: "medium",
|
|
12525
|
-
description:
|
|
12508
|
+
description: "标签的尺寸",
|
|
12509
|
+
validator(value) {
|
|
12510
|
+
if (!validSizes.includes(value)) {
|
|
12511
|
+
console.warn(
|
|
12512
|
+
`[LewSelect] 无效的标签尺寸: ${value}。请使用 ${validSizes.join(", ")} 中的一个。`
|
|
12513
|
+
);
|
|
12514
|
+
return false;
|
|
12515
|
+
}
|
|
12516
|
+
return true;
|
|
12517
|
+
}
|
|
12526
12518
|
},
|
|
12527
12519
|
itemHeight: {
|
|
12528
12520
|
type: Number,
|
|
@@ -12572,12 +12564,12 @@ const selectProps = {
|
|
|
12572
12564
|
}
|
|
12573
12565
|
};
|
|
12574
12566
|
const _hoisted_1$v = ["readonly", "placeholder"];
|
|
12575
|
-
const _hoisted_2$
|
|
12567
|
+
const _hoisted_2$j = { class: "lew-select-options-box" };
|
|
12576
12568
|
const _hoisted_3$h = {
|
|
12577
12569
|
key: 1,
|
|
12578
12570
|
class: "result-count"
|
|
12579
12571
|
};
|
|
12580
|
-
const _hoisted_4$
|
|
12572
|
+
const _hoisted_4$9 = ["onClick"];
|
|
12581
12573
|
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
12582
12574
|
__name: "LewSelect",
|
|
12583
12575
|
props: /* @__PURE__ */ mergeModels(selectProps, {
|
|
@@ -12586,8 +12578,8 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
12586
12578
|
}),
|
|
12587
12579
|
emits: /* @__PURE__ */ mergeModels(["change", "blur", "clear"], ["update:modelValue"]),
|
|
12588
12580
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
12589
|
-
var
|
|
12590
|
-
const app = (
|
|
12581
|
+
var _a;
|
|
12582
|
+
const app = (_a = getCurrentInstance()) == null ? void 0 : _a.appContext.app;
|
|
12591
12583
|
if (app && !app.directive("tooltip")) {
|
|
12592
12584
|
app.use(LewTooltip);
|
|
12593
12585
|
}
|
|
@@ -12608,8 +12600,8 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
12608
12600
|
keywordBackup: props.defaultValue
|
|
12609
12601
|
});
|
|
12610
12602
|
const getSelectWidth = () => {
|
|
12611
|
-
var
|
|
12612
|
-
state.selectWidth = ((
|
|
12603
|
+
var _a2;
|
|
12604
|
+
state.selectWidth = ((_a2 = lewSelectRef.value) == null ? void 0 : _a2.clientWidth) - 12;
|
|
12613
12605
|
};
|
|
12614
12606
|
const show = () => {
|
|
12615
12607
|
lewPopoverRef.value.show();
|
|
@@ -12804,7 +12796,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
12804
12796
|
style: normalizeStyle(`width:${unref(state).selectWidth}px`)
|
|
12805
12797
|
}, [
|
|
12806
12798
|
renderSlot(_ctx.$slots, "header", {}, void 0, true),
|
|
12807
|
-
createElementVNode("div", _hoisted_2$
|
|
12799
|
+
createElementVNode("div", _hoisted_2$j, [
|
|
12808
12800
|
unref(state).options && unref(state).options.length === 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
12809
12801
|
_ctx.$slots.empty ? renderSlot(_ctx.$slots, "empty", { key: 0 }, void 0, true) : (openBlock(), createBlock(unref(LewFlex), {
|
|
12810
12802
|
key: 1,
|
|
@@ -12854,7 +12846,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
12854
12846
|
type: "check"
|
|
12855
12847
|
})) : createCommentVNode("", true)
|
|
12856
12848
|
], 2))
|
|
12857
|
-
], 12, _hoisted_4$
|
|
12849
|
+
], 12, _hoisted_4$9)
|
|
12858
12850
|
]),
|
|
12859
12851
|
_: 3
|
|
12860
12852
|
}, 8, ["list", "options", "height"])) : createCommentVNode("", true)
|
|
@@ -12867,7 +12859,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
12867
12859
|
};
|
|
12868
12860
|
}
|
|
12869
12861
|
});
|
|
12870
|
-
const LewSelect = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-
|
|
12862
|
+
const LewSelect = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-2db2d24f"]]);
|
|
12871
12863
|
const selectMultipleModel = {
|
|
12872
12864
|
modelValue: {
|
|
12873
12865
|
type: Array,
|
|
@@ -12963,12 +12955,12 @@ const selectMultipleProps = {
|
|
|
12963
12955
|
}
|
|
12964
12956
|
};
|
|
12965
12957
|
const _hoisted_1$u = { class: "lew-select-multiple-text-value" };
|
|
12966
|
-
const _hoisted_2$
|
|
12958
|
+
const _hoisted_2$i = {
|
|
12967
12959
|
key: 0,
|
|
12968
12960
|
class: "search-input"
|
|
12969
12961
|
};
|
|
12970
12962
|
const _hoisted_3$g = { class: "lew-select-options-box" };
|
|
12971
|
-
const _hoisted_4$
|
|
12963
|
+
const _hoisted_4$8 = {
|
|
12972
12964
|
key: 1,
|
|
12973
12965
|
class: "result-count"
|
|
12974
12966
|
};
|
|
@@ -12981,8 +12973,8 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
12981
12973
|
}),
|
|
12982
12974
|
emits: /* @__PURE__ */ mergeModels(["change", "select", "clear", "delete", "blur"], ["update:modelValue"]),
|
|
12983
12975
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
12984
|
-
var
|
|
12985
|
-
const app = (
|
|
12976
|
+
var _a;
|
|
12977
|
+
const app = (_a = getCurrentInstance()) == null ? void 0 : _a.appContext.app;
|
|
12986
12978
|
if (app && !app.directive("tooltip")) {
|
|
12987
12979
|
app.use(LewTooltip);
|
|
12988
12980
|
}
|
|
@@ -13001,8 +12993,8 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
13001
12993
|
keyword: ""
|
|
13002
12994
|
});
|
|
13003
12995
|
const getSelectWidth = () => {
|
|
13004
|
-
var
|
|
13005
|
-
state.selectWidth = ((
|
|
12996
|
+
var _a2;
|
|
12997
|
+
state.selectWidth = ((_a2 = lewSelectRef.value) == null ? void 0 : _a2.clientWidth) - 12;
|
|
13006
12998
|
if (props.searchable) {
|
|
13007
12999
|
setTimeout(() => {
|
|
13008
13000
|
searchInputRef.value && searchInputRef.value.focus();
|
|
@@ -13082,8 +13074,8 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
13082
13074
|
const getLabels = computed(() => {
|
|
13083
13075
|
if (state.options.length > 0) {
|
|
13084
13076
|
const labels = selectValue.value && selectValue.value.map((v2) => {
|
|
13085
|
-
var
|
|
13086
|
-
return (
|
|
13077
|
+
var _a2;
|
|
13078
|
+
return (_a2 = state.options.find((e2) => v2 === e2.value)) == null ? void 0 : _a2.label;
|
|
13087
13079
|
});
|
|
13088
13080
|
return labels || [];
|
|
13089
13081
|
}
|
|
@@ -13273,7 +13265,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
13273
13265
|
style: normalizeStyle(`width:${unref(state).selectWidth}px`)
|
|
13274
13266
|
}, [
|
|
13275
13267
|
renderSlot(_ctx.$slots, "header", {}, void 0, true),
|
|
13276
|
-
_ctx.searchable ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
13268
|
+
_ctx.searchable ? (openBlock(), createElementBlock("div", _hoisted_2$i, [
|
|
13277
13269
|
withDirectives(createElementVNode("input", {
|
|
13278
13270
|
ref_key: "searchInputRef",
|
|
13279
13271
|
ref: searchInputRef,
|
|
@@ -13298,7 +13290,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
13298
13290
|
_: 1
|
|
13299
13291
|
}))
|
|
13300
13292
|
], 64)) : createCommentVNode("", true),
|
|
13301
|
-
_ctx.searchable && unref(state).options && unref(state).options.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
13293
|
+
_ctx.searchable && unref(state).options && unref(state).options.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_4$8, " 共 " + toDisplayString(unref(numFormat)(unref(state).options && unref(state).options.length)) + " 条结果 ", 1)) : createCommentVNode("", true),
|
|
13302
13294
|
unref(state).options.length > 0 ? (openBlock(), createBlock(unref(UseVirtualList), {
|
|
13303
13295
|
key: unref(getVirtualHeight),
|
|
13304
13296
|
class: "lew-select-options-list lew-scrollbar",
|
|
@@ -13348,7 +13340,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
13348
13340
|
};
|
|
13349
13341
|
}
|
|
13350
13342
|
});
|
|
13351
|
-
const LewSelectMultiple = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-
|
|
13343
|
+
const LewSelectMultiple = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-3a2027bc"]]);
|
|
13352
13344
|
const switchModel = {
|
|
13353
13345
|
modelValue: {
|
|
13354
13346
|
type: Boolean,
|
|
@@ -13409,9 +13401,7 @@ const switchProps = {
|
|
|
13409
13401
|
description: "是否显示加载状态"
|
|
13410
13402
|
}
|
|
13411
13403
|
};
|
|
13412
|
-
const _withScopeId$1 = (n2) => (pushScopeId("data-v-b57530d9"), n2 = n2(), popScopeId(), n2);
|
|
13413
13404
|
const _hoisted_1$t = ["disabled"];
|
|
13414
|
-
const _hoisted_2$j = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", { class: "lew-switch-dot" }, null, -1));
|
|
13415
13405
|
const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
13416
13406
|
__name: "LewSwitch",
|
|
13417
13407
|
props: /* @__PURE__ */ mergeModels(switchProps, {
|
|
@@ -13514,7 +13504,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
13514
13504
|
[vShow, false],
|
|
13515
13505
|
[vModelCheckbox, modelValue.value]
|
|
13516
13506
|
]),
|
|
13517
|
-
|
|
13507
|
+
_cache[1] || (_cache[1] = createElementVNode("div", { class: "lew-switch-dot" }, null, -1))
|
|
13518
13508
|
], 6);
|
|
13519
13509
|
};
|
|
13520
13510
|
}
|
|
@@ -13904,9 +13894,9 @@ var dayjs_min = { exports: {} };
|
|
|
13904
13894
|
var dayjs_minExports = dayjs_min.exports;
|
|
13905
13895
|
const dayjs = /* @__PURE__ */ getDefaultExportFromCjs(dayjs_minExports);
|
|
13906
13896
|
const _hoisted_1$s = { class: "lew-date" };
|
|
13907
|
-
const _hoisted_2$
|
|
13897
|
+
const _hoisted_2$h = { class: "lew-date-control-left" };
|
|
13908
13898
|
const _hoisted_3$f = { class: "cur-date" };
|
|
13909
|
-
const _hoisted_4$
|
|
13899
|
+
const _hoisted_4$7 = { style: { "width": "22px", "text-align": "center" } };
|
|
13910
13900
|
const _hoisted_5$6 = { class: "lew-date-control-right" };
|
|
13911
13901
|
const _hoisted_6$5 = { class: "lew-date-box" };
|
|
13912
13902
|
const _hoisted_7$2 = { class: "lew-date-num" };
|
|
@@ -13998,7 +13988,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
13998
13988
|
class: "lew-date-control"
|
|
13999
13989
|
}, {
|
|
14000
13990
|
default: withCtx(() => [
|
|
14001
|
-
createElementVNode("div", _hoisted_2$
|
|
13991
|
+
createElementVNode("div", _hoisted_2$h, [
|
|
14002
13992
|
createVNode(unref(LewButton), {
|
|
14003
13993
|
type: "light",
|
|
14004
13994
|
color: "gray",
|
|
@@ -14016,8 +14006,8 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
14016
14006
|
]),
|
|
14017
14007
|
createElementVNode("div", _hoisted_3$f, [
|
|
14018
14008
|
createTextVNode(toDisplayString(unref(dateState).year) + " 年 ", 1),
|
|
14019
|
-
createElementVNode("span", _hoisted_4$
|
|
14020
|
-
createTextVNode(" 月 ")
|
|
14009
|
+
createElementVNode("span", _hoisted_4$7, toDisplayString(unref(dateState).month), 1),
|
|
14010
|
+
_cache[0] || (_cache[0] = createTextVNode(" 月 "))
|
|
14021
14011
|
]),
|
|
14022
14012
|
createElementVNode("div", _hoisted_5$6, [
|
|
14023
14013
|
createVNode(unref(LewButton), {
|
|
@@ -14066,7 +14056,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
14066
14056
|
});
|
|
14067
14057
|
const LewDate = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-6cfd9d20"]]);
|
|
14068
14058
|
const _hoisted_1$r = { class: "lew-date-picker-input" };
|
|
14069
|
-
const _hoisted_2$
|
|
14059
|
+
const _hoisted_2$g = ["onClick"];
|
|
14070
14060
|
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
14071
14061
|
__name: "LewDatePicker",
|
|
14072
14062
|
props: /* @__PURE__ */ mergeModels(datePickerProps, {
|
|
@@ -14075,8 +14065,8 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
14075
14065
|
}),
|
|
14076
14066
|
emits: /* @__PURE__ */ mergeModels(["change", "clear"], ["update:modelValue"]),
|
|
14077
14067
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
14078
|
-
var
|
|
14079
|
-
const app = (
|
|
14068
|
+
var _a;
|
|
14069
|
+
const app = (_a = getCurrentInstance()) == null ? void 0 : _a.appContext.app;
|
|
14080
14070
|
if (app && !app.directive("tooltip")) {
|
|
14081
14071
|
app.use(LewTooltip);
|
|
14082
14072
|
}
|
|
@@ -14197,7 +14187,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
14197
14187
|
class: normalizeClass(["item", [unref(dayjs)(modelValue.value).isSame(item.value, "day") ? "item-active" : ""]])
|
|
14198
14188
|
}, [
|
|
14199
14189
|
createTextVNode(toDisplayString(item.label), 1)
|
|
14200
|
-
], 10, _hoisted_2$
|
|
14190
|
+
], 10, _hoisted_2$g)), [
|
|
14201
14191
|
[_directive_tooltip, {
|
|
14202
14192
|
content: unref(dayjs)(item.value).format(_ctx.valueFormat),
|
|
14203
14193
|
placement: "right",
|
|
@@ -14336,9 +14326,9 @@ const dateRangeProps = {
|
|
|
14336
14326
|
}
|
|
14337
14327
|
};
|
|
14338
14328
|
const _hoisted_1$q = { class: "lew-date-range" };
|
|
14339
|
-
const _hoisted_2$
|
|
14329
|
+
const _hoisted_2$f = { class: "lew-date" };
|
|
14340
14330
|
const _hoisted_3$e = { class: "lew-date-control-left" };
|
|
14341
|
-
const _hoisted_4$
|
|
14331
|
+
const _hoisted_4$6 = { class: "cur-date" };
|
|
14342
14332
|
const _hoisted_5$5 = { style: { "width": "22px", "text-align": "center" } };
|
|
14343
14333
|
const _hoisted_6$4 = { class: "lew-date-control-right" };
|
|
14344
14334
|
const _hoisted_7$1 = { class: "lew-date-box" };
|
|
@@ -14368,10 +14358,10 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
14368
14358
|
}),
|
|
14369
14359
|
emits: /* @__PURE__ */ mergeModels(["change"], ["update:modelValue"]),
|
|
14370
14360
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
14371
|
-
const emit = __emit;
|
|
14372
14361
|
const props = __props;
|
|
14362
|
+
const emit = __emit;
|
|
14373
14363
|
const modelValue = useModel(__props, "modelValue");
|
|
14374
|
-
const hoverValue = ref(
|
|
14364
|
+
const hoverValue = ref({});
|
|
14375
14365
|
const { startKey, endKey } = props;
|
|
14376
14366
|
const today = /* @__PURE__ */ new Date();
|
|
14377
14367
|
const curYear = today.getFullYear();
|
|
@@ -14388,6 +14378,69 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
14388
14378
|
leftPanel: getMonthDate(1),
|
|
14389
14379
|
rightPanel: getMonthDate(2)
|
|
14390
14380
|
});
|
|
14381
|
+
const object2class2 = computed(() => (type, item) => {
|
|
14382
|
+
if (!item.year || !item.month || !item.showDate) {
|
|
14383
|
+
return;
|
|
14384
|
+
}
|
|
14385
|
+
const _date = dayjs(`${item.year}-${item.month}-${item.showDate}`);
|
|
14386
|
+
const hoverStart = dayjs(hoverValue.value[startKey]);
|
|
14387
|
+
const hoverEnd = dayjs(hoverValue.value[endKey]);
|
|
14388
|
+
switch (type) {
|
|
14389
|
+
case "today":
|
|
14390
|
+
if (_curDate.isSame(_date) && item.date === item.showDate) {
|
|
14391
|
+
return true;
|
|
14392
|
+
}
|
|
14393
|
+
break;
|
|
14394
|
+
case "rangeMonth":
|
|
14395
|
+
if (item.date === item.showDate) {
|
|
14396
|
+
return "lew-date-item-curMonth";
|
|
14397
|
+
}
|
|
14398
|
+
break;
|
|
14399
|
+
case "notRangeMonth":
|
|
14400
|
+
if (item.date !== item.showDate) {
|
|
14401
|
+
return "";
|
|
14402
|
+
}
|
|
14403
|
+
break;
|
|
14404
|
+
case "selected":
|
|
14405
|
+
if ((hoverStart.isSame(_date) || hoverEnd.isSame(_date)) && item.date === item.showDate) {
|
|
14406
|
+
return "lew-date-value-selected";
|
|
14407
|
+
}
|
|
14408
|
+
break;
|
|
14409
|
+
case "rangeSelected":
|
|
14410
|
+
if (item.date !== item.showDate) {
|
|
14411
|
+
return;
|
|
14412
|
+
}
|
|
14413
|
+
if (hoverStart.isSame(_date)) {
|
|
14414
|
+
if (hoverStart.isAfter(hoverEnd)) {
|
|
14415
|
+
return "lew-date-label-selected-end";
|
|
14416
|
+
}
|
|
14417
|
+
return "lew-date-label-selected-start";
|
|
14418
|
+
}
|
|
14419
|
+
if (hoverEnd.isSame(_date)) {
|
|
14420
|
+
if (hoverStart.isAfter(hoverEnd)) {
|
|
14421
|
+
return "lew-date-label-selected-start";
|
|
14422
|
+
}
|
|
14423
|
+
return "lew-date-label-selected-end";
|
|
14424
|
+
}
|
|
14425
|
+
if (hoverStart.isBefore(hoverEnd)) {
|
|
14426
|
+
if (hoverStart.isBefore(_date) && hoverEnd.isAfter(_date) && item.date === item.showDate) {
|
|
14427
|
+
return "lew-date-label-selected";
|
|
14428
|
+
}
|
|
14429
|
+
} else if (hoverEnd.isBefore(_date) && hoverStart.isAfter(_date)) {
|
|
14430
|
+
return "lew-date-label-selected";
|
|
14431
|
+
}
|
|
14432
|
+
break;
|
|
14433
|
+
default:
|
|
14434
|
+
return "";
|
|
14435
|
+
}
|
|
14436
|
+
});
|
|
14437
|
+
const setMonthDate = (type) => {
|
|
14438
|
+
if (type === "left") {
|
|
14439
|
+
state.leftPanel = getMonthDate(dateState.year1, dateState.month1);
|
|
14440
|
+
} else {
|
|
14441
|
+
state.rightPanel = getMonthDate(dateState.year2, dateState.month2);
|
|
14442
|
+
}
|
|
14443
|
+
};
|
|
14391
14444
|
const prveMonth1 = () => {
|
|
14392
14445
|
if (dateState.month1 > 1) {
|
|
14393
14446
|
dateState.month1 -= 1;
|
|
@@ -14488,15 +14541,6 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
14488
14541
|
dateState.year2 += 1;
|
|
14489
14542
|
setMonthDate("right");
|
|
14490
14543
|
};
|
|
14491
|
-
const setMonthDate = (type) => {
|
|
14492
|
-
if (type === "left") {
|
|
14493
|
-
state.leftPanel = getMonthDate(dateState.year1, dateState.month1);
|
|
14494
|
-
} else {
|
|
14495
|
-
state.rightPanel = getMonthDate(dateState.year2, dateState.month2);
|
|
14496
|
-
}
|
|
14497
|
-
};
|
|
14498
|
-
setMonthDate("left");
|
|
14499
|
-
setMonthDate("right");
|
|
14500
14544
|
let i2 = 0;
|
|
14501
14545
|
let startBackup = "";
|
|
14502
14546
|
const hoverValueFn = (item) => {
|
|
@@ -14511,9 +14555,6 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
14511
14555
|
};
|
|
14512
14556
|
const setValue = (item) => {
|
|
14513
14557
|
i2 += 1;
|
|
14514
|
-
if (!hoverValue.value) {
|
|
14515
|
-
return;
|
|
14516
|
-
}
|
|
14517
14558
|
if (item.date != item.showDate) {
|
|
14518
14559
|
return;
|
|
14519
14560
|
}
|
|
@@ -14535,76 +14576,19 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
14535
14576
|
startBackup = __dateStr;
|
|
14536
14577
|
}
|
|
14537
14578
|
};
|
|
14538
|
-
const object2class2 = computed(() => (type, item) => {
|
|
14539
|
-
var _a2, _b;
|
|
14540
|
-
if (!item.year || !item.month || !item.showDate) {
|
|
14541
|
-
return;
|
|
14542
|
-
}
|
|
14543
|
-
const _date = dayjs(`${item.year}-${item.month}-${item.showDate}`);
|
|
14544
|
-
const hoverStart = dayjs((_a2 = hoverValue.value) == null ? void 0 : _a2.start);
|
|
14545
|
-
const hoverEnd = dayjs((_b = hoverValue.value) == null ? void 0 : _b.end);
|
|
14546
|
-
switch (type) {
|
|
14547
|
-
case "today":
|
|
14548
|
-
if (_curDate.isSame(_date) && item.date === item.showDate) {
|
|
14549
|
-
return true;
|
|
14550
|
-
}
|
|
14551
|
-
break;
|
|
14552
|
-
case "rangeMonth":
|
|
14553
|
-
if (item.date === item.showDate) {
|
|
14554
|
-
return "lew-date-item-curMonth";
|
|
14555
|
-
}
|
|
14556
|
-
break;
|
|
14557
|
-
case "notRangeMonth":
|
|
14558
|
-
if (item.date !== item.showDate) {
|
|
14559
|
-
return "";
|
|
14560
|
-
}
|
|
14561
|
-
break;
|
|
14562
|
-
case "selected":
|
|
14563
|
-
if ((hoverStart.isSame(_date) || hoverEnd.isSame(_date)) && item.date === item.showDate) {
|
|
14564
|
-
return "lew-date-value-selected";
|
|
14565
|
-
}
|
|
14566
|
-
break;
|
|
14567
|
-
case "rangeSelected":
|
|
14568
|
-
if (item.date !== item.showDate) {
|
|
14569
|
-
return;
|
|
14570
|
-
}
|
|
14571
|
-
if (hoverStart.isSame(_date)) {
|
|
14572
|
-
if (hoverStart.isAfter(hoverEnd)) {
|
|
14573
|
-
return "lew-date-label-selected-end";
|
|
14574
|
-
}
|
|
14575
|
-
return "lew-date-label-selected-start";
|
|
14576
|
-
}
|
|
14577
|
-
if (hoverEnd.isSame(_date)) {
|
|
14578
|
-
if (hoverStart.isAfter(hoverEnd)) {
|
|
14579
|
-
return "lew-date-label-selected-start";
|
|
14580
|
-
}
|
|
14581
|
-
return "lew-date-label-selected-end";
|
|
14582
|
-
}
|
|
14583
|
-
if (hoverStart.isBefore(hoverEnd)) {
|
|
14584
|
-
if (hoverStart.isBefore(_date) && hoverEnd.isAfter(_date) && item.date === item.showDate) {
|
|
14585
|
-
return "lew-date-label-selected";
|
|
14586
|
-
}
|
|
14587
|
-
} else if (hoverEnd.isBefore(_date) && hoverStart.isAfter(_date)) {
|
|
14588
|
-
return "lew-date-label-selected";
|
|
14589
|
-
}
|
|
14590
|
-
break;
|
|
14591
|
-
default:
|
|
14592
|
-
return "";
|
|
14593
|
-
}
|
|
14594
|
-
});
|
|
14595
14579
|
const init = () => {
|
|
14596
14580
|
let _value = cloneDeep(modelValue.value);
|
|
14597
14581
|
if (!_value) {
|
|
14598
14582
|
_value = {
|
|
14599
|
-
[startKey]:
|
|
14600
|
-
[endKey]:
|
|
14583
|
+
[startKey]: "",
|
|
14584
|
+
[endKey]: ""
|
|
14601
14585
|
};
|
|
14602
14586
|
}
|
|
14603
14587
|
hoverValue.value = _value;
|
|
14604
|
-
dateState.year1 = dayjs(_value[startKey]).year();
|
|
14605
|
-
dateState.month1 = dayjs(_value[startKey]).month() + 1;
|
|
14606
|
-
dateState.year2 = dayjs(_value[endKey]).year();
|
|
14607
|
-
dateState.month2 = dayjs(_value[endKey]).month() + 1;
|
|
14588
|
+
dateState.year1 = _value[startKey] ? dayjs(_value[startKey]).year() : curYear;
|
|
14589
|
+
dateState.month1 = _value[startKey] ? dayjs(_value[startKey]).month() + 1 : curMonth;
|
|
14590
|
+
dateState.year2 = _value[endKey] ? dayjs(_value[endKey]).year() : curYear;
|
|
14591
|
+
dateState.month2 = _value[endKey] ? dayjs(_value[endKey]).month() + 1 : curMonth + 1;
|
|
14608
14592
|
if (dateState.year1 === dateState.year2 && dateState.month1 === dateState.month2) {
|
|
14609
14593
|
dateState.month2 += 1;
|
|
14610
14594
|
}
|
|
@@ -14619,7 +14603,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
14619
14603
|
__expose({ init });
|
|
14620
14604
|
return (_ctx, _cache) => {
|
|
14621
14605
|
return openBlock(), createElementBlock("div", _hoisted_1$q, [
|
|
14622
|
-
createElementVNode("div", _hoisted_2$
|
|
14606
|
+
createElementVNode("div", _hoisted_2$f, [
|
|
14623
14607
|
createVNode(unref(LewFlex), {
|
|
14624
14608
|
x: "start",
|
|
14625
14609
|
mode: "between",
|
|
@@ -14642,10 +14626,10 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
14642
14626
|
onClick: prveMonth1
|
|
14643
14627
|
})
|
|
14644
14628
|
]),
|
|
14645
|
-
createElementVNode("div", _hoisted_4$
|
|
14629
|
+
createElementVNode("div", _hoisted_4$6, [
|
|
14646
14630
|
createTextVNode(toDisplayString(unref(dateState).year1) + " 年 ", 1),
|
|
14647
14631
|
createElementVNode("span", _hoisted_5$5, toDisplayString(unref(dateState).month1), 1),
|
|
14648
|
-
createTextVNode(" 月 ")
|
|
14632
|
+
_cache[0] || (_cache[0] = createTextVNode(" 月 "))
|
|
14649
14633
|
]),
|
|
14650
14634
|
createElementVNode("div", _hoisted_6$4, [
|
|
14651
14635
|
createVNode(unref(LewButton), {
|
|
@@ -14720,7 +14704,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
14720
14704
|
createElementVNode("div", _hoisted_13$1, [
|
|
14721
14705
|
createTextVNode(toDisplayString(unref(dateState).year2) + " 年 ", 1),
|
|
14722
14706
|
createElementVNode("span", _hoisted_14, toDisplayString(unref(dateState).month2), 1),
|
|
14723
|
-
createTextVNode(" 月 ")
|
|
14707
|
+
_cache[1] || (_cache[1] = createTextVNode(" 月 "))
|
|
14724
14708
|
]),
|
|
14725
14709
|
createElementVNode("div", _hoisted_15, [
|
|
14726
14710
|
createVNode(unref(LewButton), {
|
|
@@ -14773,9 +14757,9 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
14773
14757
|
};
|
|
14774
14758
|
}
|
|
14775
14759
|
});
|
|
14776
|
-
const LewDateRange = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-
|
|
14760
|
+
const LewDateRange = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-2a3aa580"]]);
|
|
14777
14761
|
const _hoisted_1$p = { class: "lew-date-picker-input" };
|
|
14778
|
-
const _hoisted_2$
|
|
14762
|
+
const _hoisted_2$e = {
|
|
14779
14763
|
key: 0,
|
|
14780
14764
|
class: "lew-date-picker-placeholder"
|
|
14781
14765
|
};
|
|
@@ -14783,7 +14767,7 @@ const _hoisted_3$d = {
|
|
|
14783
14767
|
key: 1,
|
|
14784
14768
|
class: "lew-date-picker-dateValue lew-date-picker-start"
|
|
14785
14769
|
};
|
|
14786
|
-
const _hoisted_4$
|
|
14770
|
+
const _hoisted_4$5 = { class: "lew-date-picker-mid" };
|
|
14787
14771
|
const _hoisted_5$4 = {
|
|
14788
14772
|
key: 2,
|
|
14789
14773
|
class: "lew-date-picker-placeholder"
|
|
@@ -14800,14 +14784,14 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
14800
14784
|
}),
|
|
14801
14785
|
emits: /* @__PURE__ */ mergeModels(["change", "clear"], ["update:modelValue"]),
|
|
14802
14786
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
14803
|
-
var
|
|
14804
|
-
const app = (
|
|
14787
|
+
var _a;
|
|
14788
|
+
const app = (_a = getCurrentInstance()) == null ? void 0 : _a.appContext.app;
|
|
14805
14789
|
if (app && !app.directive("tooltip")) {
|
|
14806
14790
|
app.use(LewTooltip);
|
|
14807
14791
|
}
|
|
14792
|
+
const modelValue = useModel(__props, "modelValue");
|
|
14808
14793
|
const props = __props;
|
|
14809
14794
|
const emit = __emit;
|
|
14810
|
-
const modelValue = useModel(__props, "modelValue");
|
|
14811
14795
|
const visible = ref(false);
|
|
14812
14796
|
const lewPopoverRef = ref();
|
|
14813
14797
|
const { startKey, endKey } = props;
|
|
@@ -14868,8 +14852,8 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
14868
14852
|
class: normalizeClass(["lew-date-picker-view", unref(lewDateRangeClassNames)])
|
|
14869
14853
|
}, [
|
|
14870
14854
|
createElementVNode("div", _hoisted_1$p, [
|
|
14871
|
-
!modelValue.value || !modelValue.value[unref(startKey)] ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
14872
|
-
createElementVNode("div", _hoisted_4$
|
|
14855
|
+
!modelValue.value || !modelValue.value[unref(startKey)] ? (openBlock(), createElementBlock("div", _hoisted_2$e, toDisplayString(_ctx.placeholderStart), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$d, toDisplayString(modelValue.value[unref(startKey)]), 1)),
|
|
14856
|
+
createElementVNode("div", _hoisted_4$5, [
|
|
14873
14857
|
createVNode(unref(script), {
|
|
14874
14858
|
size: "14",
|
|
14875
14859
|
type: "minus"
|
|
@@ -14915,7 +14899,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
14915
14899
|
};
|
|
14916
14900
|
}
|
|
14917
14901
|
});
|
|
14918
|
-
const LewDateRangePicker = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-
|
|
14902
|
+
const LewDateRangePicker = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-f1e4dbef"]]);
|
|
14919
14903
|
const tableModel = {
|
|
14920
14904
|
selectedKeys: {
|
|
14921
14905
|
type: [Array, String, Number, void 0],
|
|
@@ -14931,13 +14915,13 @@ const tableModel = {
|
|
|
14931
14915
|
}
|
|
14932
14916
|
};
|
|
14933
14917
|
const tableProps = {
|
|
14934
|
-
|
|
14935
|
-
type:
|
|
14936
|
-
default:
|
|
14937
|
-
description: "
|
|
14918
|
+
columns: {
|
|
14919
|
+
type: Array,
|
|
14920
|
+
default: () => [],
|
|
14921
|
+
description: "表格列的配置描述",
|
|
14938
14922
|
validator: (value) => {
|
|
14939
|
-
if (!value) {
|
|
14940
|
-
console.warn("[LewTable]
|
|
14923
|
+
if (!Array.isArray(value)) {
|
|
14924
|
+
console.warn("[LewTable] columns 必须是一个数组");
|
|
14941
14925
|
return false;
|
|
14942
14926
|
}
|
|
14943
14927
|
return true;
|
|
@@ -14955,18 +14939,25 @@ const tableProps = {
|
|
|
14955
14939
|
return true;
|
|
14956
14940
|
}
|
|
14957
14941
|
},
|
|
14958
|
-
|
|
14959
|
-
type:
|
|
14960
|
-
default:
|
|
14961
|
-
description: "
|
|
14962
|
-
validator
|
|
14963
|
-
if (!
|
|
14964
|
-
console.warn(
|
|
14942
|
+
size: {
|
|
14943
|
+
type: String,
|
|
14944
|
+
default: "medium",
|
|
14945
|
+
description: "标签的尺寸",
|
|
14946
|
+
validator(value) {
|
|
14947
|
+
if (!validSizes.includes(value)) {
|
|
14948
|
+
console.warn(
|
|
14949
|
+
`[LewTable] 无效的标签尺寸: ${value}。请使用 ${validSizes.join(", ")} 中的一个。`
|
|
14950
|
+
);
|
|
14965
14951
|
return false;
|
|
14966
14952
|
}
|
|
14967
14953
|
return true;
|
|
14968
14954
|
}
|
|
14969
14955
|
},
|
|
14956
|
+
checkable: {
|
|
14957
|
+
type: Boolean,
|
|
14958
|
+
default: false,
|
|
14959
|
+
description: "是否显示复选框列"
|
|
14960
|
+
},
|
|
14970
14961
|
maxHeight: {
|
|
14971
14962
|
type: [Number, String],
|
|
14972
14963
|
default: "",
|
|
@@ -14979,21 +14970,28 @@ const tableProps = {
|
|
|
14979
14970
|
return true;
|
|
14980
14971
|
}
|
|
14981
14972
|
},
|
|
14982
|
-
checkable: {
|
|
14983
|
-
type: Boolean,
|
|
14984
|
-
default: false,
|
|
14985
|
-
description: "是否显示复选框列"
|
|
14986
|
-
},
|
|
14987
14973
|
multiple: {
|
|
14988
14974
|
type: Boolean,
|
|
14989
14975
|
default: false,
|
|
14990
14976
|
description: "是否允许多选"
|
|
14977
|
+
},
|
|
14978
|
+
rowKey: {
|
|
14979
|
+
type: String,
|
|
14980
|
+
default: "id",
|
|
14981
|
+
description: "用于标识每一行数据的唯一键",
|
|
14982
|
+
validator: (value) => {
|
|
14983
|
+
if (!value) {
|
|
14984
|
+
console.warn("[LewTable] rowKey 不能为空");
|
|
14985
|
+
return false;
|
|
14986
|
+
}
|
|
14987
|
+
return true;
|
|
14988
|
+
}
|
|
14991
14989
|
}
|
|
14992
14990
|
};
|
|
14993
|
-
const _hoisted_1$o = { class: "lew-table-
|
|
14994
|
-
const _hoisted_2$
|
|
14995
|
-
const _hoisted_3$c = {
|
|
14996
|
-
const _hoisted_4$
|
|
14991
|
+
const _hoisted_1$o = { class: "lew-table-wrapper" };
|
|
14992
|
+
const _hoisted_2$d = { class: "lew-table-header" };
|
|
14993
|
+
const _hoisted_3$c = { class: "lew-table-tr" };
|
|
14994
|
+
const _hoisted_4$4 = { class: "lew-table-main" };
|
|
14997
14995
|
const _hoisted_5$3 = { class: "lew-table-tr" };
|
|
14998
14996
|
const _hoisted_6$2 = { class: "lew-table-tr" };
|
|
14999
14997
|
const _hoisted_7 = {
|
|
@@ -15018,78 +15016,106 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
15018
15016
|
emits: ["update:selectedKeys"],
|
|
15019
15017
|
setup(__props) {
|
|
15020
15018
|
const props = __props;
|
|
15019
|
+
const selectedKeys = useModel(__props, "selectedKeys");
|
|
15021
15020
|
const tableRef = ref();
|
|
15022
15021
|
const fixedLeftRef = ref();
|
|
15023
15022
|
const fixedRightRef = ref();
|
|
15024
|
-
const
|
|
15025
|
-
|
|
15023
|
+
const trRefArr = ref([]);
|
|
15024
|
+
const trHeightArr = ref([]);
|
|
15025
|
+
let resizeObserver;
|
|
15026
15026
|
const state = reactive({
|
|
15027
|
-
|
|
15027
|
+
isInitialized: false,
|
|
15028
15028
|
columns: [],
|
|
15029
|
-
|
|
15030
|
-
|
|
15029
|
+
hoverRowIndex: -1,
|
|
15030
|
+
isAllChecked: false,
|
|
15031
|
+
isScrollbarVisible: false,
|
|
15031
15032
|
scrollClientWidth: 0,
|
|
15032
|
-
|
|
15033
|
-
hidScrollLine: "all",
|
|
15034
|
-
checkAll: false,
|
|
15033
|
+
hiddenScrollLine: "all",
|
|
15035
15034
|
fixedLeftWidth: 0,
|
|
15036
15035
|
fixedRightWidth: 0,
|
|
15037
|
-
|
|
15038
|
-
|
|
15036
|
+
selectedRowsMap: {}
|
|
15037
|
+
});
|
|
15038
|
+
const totalColumnWidth = computed(() => {
|
|
15039
|
+
let width = sumBy(props.columns, "width");
|
|
15040
|
+
if (props.checkable) width += getCheckableWidth.value;
|
|
15041
|
+
return width;
|
|
15042
|
+
});
|
|
15043
|
+
const nonFixedColumns = computed(() => {
|
|
15044
|
+
return props.columns.filter((col) => !col.fixed);
|
|
15045
|
+
});
|
|
15046
|
+
const getFixedColumns = computed(() => (direction) => {
|
|
15047
|
+
return props.columns.filter((col) => col.fixed === direction);
|
|
15048
|
+
});
|
|
15049
|
+
const hasPartialSelection = computed(() => {
|
|
15050
|
+
const selectedRowsMap = state.selectedRowsMap;
|
|
15051
|
+
return props.dataSource.some((row) => selectedRowsMap[row[props.rowKey]]);
|
|
15052
|
+
});
|
|
15053
|
+
const getColumnStyle = computed(() => (column, row) => {
|
|
15054
|
+
var _a;
|
|
15055
|
+
const width = column.width;
|
|
15056
|
+
const customStyle = row && ((_a = row.tdStyle) == null ? void 0 : _a[column.field]);
|
|
15057
|
+
const sizeStyle = `padding:${getPadding.value};fontSize:${getFontSize.value}px;`;
|
|
15058
|
+
if (state.isScrollbarVisible || column.fixed) {
|
|
15059
|
+
return `${sizeStyle};width: ${width}px;${customStyle}`;
|
|
15060
|
+
}
|
|
15061
|
+
const fixedWidth = sumBy(
|
|
15062
|
+
props.columns.filter((col) => col.fixed),
|
|
15063
|
+
"width"
|
|
15064
|
+
) + (props.checkable ? getCheckableWidth.value : 0);
|
|
15065
|
+
const tdWidth = width / (totalColumnWidth.value - fixedWidth) * (state.scrollClientWidth - fixedWidth);
|
|
15066
|
+
return `${sizeStyle};width: ${tdWidth}px;${customStyle}`;
|
|
15039
15067
|
});
|
|
15040
15068
|
watch(
|
|
15041
15069
|
() => props.dataSource,
|
|
15042
15070
|
() => {
|
|
15043
|
-
state.
|
|
15044
|
-
|
|
15071
|
+
state.selectedRowsMap = mapValues(keyBy(props.dataSource, props.rowKey), () => false);
|
|
15072
|
+
updateAllCheckedState();
|
|
15045
15073
|
},
|
|
15046
15074
|
{ deep: true }
|
|
15047
15075
|
);
|
|
15048
|
-
|
|
15049
|
-
|
|
15050
|
-
|
|
15051
|
-
if (props.checkable && !props.rowKey) {
|
|
15052
|
-
throw new Error("LewTable error: 当checkable开启的时候,必须设置rowKey!");
|
|
15053
|
-
}
|
|
15054
|
-
if (props.columns.findIndex((e2) => !e2.width) > -1) {
|
|
15055
|
-
throw new Error("LewTable error: 必须设置每一列的宽度");
|
|
15076
|
+
watch(selectedKeys, (newVal) => {
|
|
15077
|
+
if (props.checkable) {
|
|
15078
|
+
updateSelectedKeys(newVal);
|
|
15056
15079
|
}
|
|
15057
15080
|
});
|
|
15058
|
-
const
|
|
15059
|
-
|
|
15060
|
-
state.
|
|
15061
|
-
|
|
15081
|
+
const initTableObserver = () => {
|
|
15082
|
+
resizeObserver = new ResizeObserver(() => {
|
|
15083
|
+
state.isInitialized = false;
|
|
15084
|
+
handleTableResize();
|
|
15062
15085
|
});
|
|
15063
|
-
|
|
15086
|
+
resizeObserver.observe(tableRef.value);
|
|
15064
15087
|
};
|
|
15065
|
-
const
|
|
15088
|
+
const updateScrollState = () => {
|
|
15066
15089
|
const element = tableRef.value;
|
|
15067
|
-
const { clientWidth } = element;
|
|
15068
|
-
const
|
|
15069
|
-
const { scrollLeft } = element;
|
|
15090
|
+
const { clientWidth, scrollWidth, scrollLeft } = element;
|
|
15091
|
+
const scrollThreshold = 10;
|
|
15070
15092
|
if (scrollWidth === clientWidth) {
|
|
15071
|
-
state.
|
|
15093
|
+
state.hiddenScrollLine = "all";
|
|
15072
15094
|
return;
|
|
15073
15095
|
}
|
|
15074
|
-
if (scrollLeft <
|
|
15075
|
-
state.
|
|
15096
|
+
if (scrollLeft < scrollThreshold) {
|
|
15097
|
+
state.hiddenScrollLine = "left";
|
|
15076
15098
|
return;
|
|
15077
15099
|
}
|
|
15078
|
-
if (scrollLeft + clientWidth > scrollWidth -
|
|
15079
|
-
state.
|
|
15100
|
+
if (scrollLeft + clientWidth > scrollWidth - scrollThreshold) {
|
|
15101
|
+
state.hiddenScrollLine = "right";
|
|
15080
15102
|
return;
|
|
15081
15103
|
}
|
|
15082
|
-
state.
|
|
15104
|
+
state.hiddenScrollLine = "";
|
|
15083
15105
|
};
|
|
15084
|
-
const
|
|
15106
|
+
const handleTableResize = throttle(() => {
|
|
15085
15107
|
const table = tableRef.value;
|
|
15086
15108
|
if (!table) return;
|
|
15087
|
-
|
|
15088
|
-
|
|
15089
|
-
|
|
15109
|
+
nextTick(() => {
|
|
15110
|
+
trRefArr.value.forEach((element, index2) => {
|
|
15111
|
+
if (element) {
|
|
15112
|
+
trHeightArr.value[index2] = element.getBoundingClientRect().height;
|
|
15113
|
+
}
|
|
15114
|
+
});
|
|
15090
15115
|
});
|
|
15116
|
+
let totalWidth = props.columns.reduce((sum, col) => sum + Number(col.width), 0);
|
|
15091
15117
|
if (props.checkable) {
|
|
15092
|
-
|
|
15118
|
+
totalWidth += getCheckableWidth.value;
|
|
15093
15119
|
}
|
|
15094
15120
|
if (fixedLeftRef.value) {
|
|
15095
15121
|
state.fixedLeftWidth = fixedLeftRef.value.clientWidth || 0;
|
|
@@ -15101,124 +15127,175 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
15101
15127
|
}
|
|
15102
15128
|
}
|
|
15103
15129
|
state.scrollClientWidth = table.clientWidth;
|
|
15104
|
-
state.
|
|
15105
|
-
state.
|
|
15106
|
-
|
|
15107
|
-
},
|
|
15108
|
-
const
|
|
15109
|
-
|
|
15110
|
-
const width = column.width;
|
|
15111
|
-
const tdStyle = row && ((_a2 = row.tdStyle) == null ? void 0 : _a2[column.field]);
|
|
15112
|
-
if (state.scrollbarVisible || column.fixed) {
|
|
15113
|
-
return `width: ${width}px;${tdStyle}`;
|
|
15114
|
-
}
|
|
15115
|
-
const fixedWidth = sumBy(
|
|
15116
|
-
props.columns.filter((e2) => e2.fixed),
|
|
15117
|
-
"width"
|
|
15118
|
-
) + (props.checkable ? 50 : 0);
|
|
15119
|
-
const tdWidth = width / (getTdTotalWidth.value - fixedWidth) * (state.scrollClientWidth - fixedWidth);
|
|
15120
|
-
return `width: ${tdWidth}px;${tdStyle}`;
|
|
15121
|
-
});
|
|
15122
|
-
const getTdTotalWidth = computed(() => {
|
|
15123
|
-
let width = sumBy(props.columns, "width");
|
|
15124
|
-
if (props.checkable) width += 50;
|
|
15125
|
-
return width;
|
|
15126
|
-
});
|
|
15127
|
-
const newColumns = computed(() => {
|
|
15128
|
-
return props.columns.filter((e2) => !e2.fixed);
|
|
15129
|
-
});
|
|
15130
|
-
const fixedColumns = computed(() => (direction) => {
|
|
15131
|
-
return props.columns.filter((e2) => e2.fixed === direction);
|
|
15132
|
-
});
|
|
15133
|
-
const setAllChecked = (checked) => {
|
|
15134
|
-
if (checked) {
|
|
15135
|
-
state.selectedKeysMap = mapValues(keyBy(props.dataSource, props.rowKey), () => true);
|
|
15136
|
-
} else {
|
|
15137
|
-
state.selectedKeysMap = mapValues(keyBy(props.dataSource, props.rowKey), () => false);
|
|
15138
|
-
}
|
|
15130
|
+
state.isScrollbarVisible = totalWidth > state.scrollClientWidth;
|
|
15131
|
+
state.isInitialized = true;
|
|
15132
|
+
updateScrollState();
|
|
15133
|
+
}, 250);
|
|
15134
|
+
const setAllRowsChecked = (checked) => {
|
|
15135
|
+
state.selectedRowsMap = mapValues(keyBy(props.dataSource, props.rowKey), () => checked);
|
|
15139
15136
|
if (props.multiple) {
|
|
15140
|
-
selectedKeys.value = keys(
|
|
15137
|
+
selectedKeys.value = checked ? keys(state.selectedRowsMap) : [];
|
|
15141
15138
|
}
|
|
15142
15139
|
};
|
|
15143
|
-
const
|
|
15144
|
-
const
|
|
15145
|
-
const
|
|
15146
|
-
const
|
|
15147
|
-
state.
|
|
15140
|
+
const updateAllCheckedState = () => {
|
|
15141
|
+
const checkedKeys = keys(pickBy(state.selectedRowsMap, Boolean));
|
|
15142
|
+
const allDataKeys = props.dataSource.map((row) => String(row[props.rowKey]));
|
|
15143
|
+
const uncheckedKeys = difference(allDataKeys, checkedKeys);
|
|
15144
|
+
state.isAllChecked = isEmpty(uncheckedKeys) && props.multiple && props.checkable && checkedKeys.length > 0;
|
|
15148
15145
|
};
|
|
15149
|
-
const
|
|
15146
|
+
const toggleRowSelection = (row) => {
|
|
15150
15147
|
if (!props.checkable) return;
|
|
15151
15148
|
const rowKey = row[props.rowKey];
|
|
15152
|
-
const
|
|
15149
|
+
const isChecked = state.selectedRowsMap[rowKey];
|
|
15153
15150
|
if (props.multiple) {
|
|
15154
|
-
state.
|
|
15155
|
-
selectedKeys.value = keys(pickBy(state.
|
|
15151
|
+
state.selectedRowsMap[rowKey] = !isChecked;
|
|
15152
|
+
selectedKeys.value = keys(pickBy(state.selectedRowsMap, Boolean));
|
|
15156
15153
|
} else {
|
|
15157
|
-
state.
|
|
15158
|
-
selectedKeys.value =
|
|
15154
|
+
state.selectedRowsMap = { [rowKey]: !isChecked };
|
|
15155
|
+
selectedKeys.value = isChecked ? void 0 : rowKey;
|
|
15159
15156
|
}
|
|
15160
|
-
|
|
15157
|
+
updateAllCheckedState();
|
|
15161
15158
|
};
|
|
15162
|
-
const
|
|
15163
|
-
const selectedKeysMap = state.selectedKeysMap;
|
|
15164
|
-
const i2 = props.dataSource.findIndex((e2) => {
|
|
15165
|
-
if (e2[props.rowKey] in selectedKeysMap && selectedKeysMap[e2[props.rowKey]]) {
|
|
15166
|
-
return true;
|
|
15167
|
-
}
|
|
15168
|
-
return false;
|
|
15169
|
-
});
|
|
15170
|
-
return i2 >= 0;
|
|
15171
|
-
});
|
|
15172
|
-
onMounted(() => {
|
|
15173
|
-
tableObserve();
|
|
15174
|
-
checkScroll();
|
|
15175
|
-
resizeTableHandle();
|
|
15176
|
-
if (props.checkable) {
|
|
15177
|
-
setSelectedKeys(selectedKeys.value);
|
|
15178
|
-
}
|
|
15179
|
-
});
|
|
15180
|
-
watch(selectedKeys, (newVal) => {
|
|
15181
|
-
if (props.checkable) {
|
|
15182
|
-
setSelectedKeys(newVal);
|
|
15183
|
-
}
|
|
15184
|
-
});
|
|
15185
|
-
const setSelectedKeys = (keys2) => {
|
|
15159
|
+
const updateSelectedKeys = (keys2) => {
|
|
15186
15160
|
if (props.multiple) {
|
|
15187
|
-
state.
|
|
15161
|
+
state.selectedRowsMap = mapValues(keyBy(props.dataSource, props.rowKey), () => false);
|
|
15188
15162
|
keys2.forEach((key) => {
|
|
15189
|
-
state.
|
|
15163
|
+
state.selectedRowsMap[key] = true;
|
|
15190
15164
|
});
|
|
15191
15165
|
} else {
|
|
15192
|
-
state.
|
|
15193
|
-
|
|
15166
|
+
state.selectedRowsMap = { [keys2]: true };
|
|
15167
|
+
}
|
|
15168
|
+
};
|
|
15169
|
+
const renderCell = ({ column, row, index: index2 }) => {
|
|
15170
|
+
if (column.customRender) {
|
|
15171
|
+
return column.customRender({ row, column, index: index2, text: row[column.field] });
|
|
15172
|
+
}
|
|
15173
|
+
return column.type === "text-trim" ? h$1(LewTextTrim, {
|
|
15174
|
+
x: column.x,
|
|
15175
|
+
style: "width: 100%",
|
|
15176
|
+
text: row[column.field]
|
|
15177
|
+
}) : showTextAndEmpty(row[column.field]);
|
|
15178
|
+
};
|
|
15179
|
+
const showTextAndEmpty = (text) => {
|
|
15180
|
+
if (text === null || text === void 0 || text === "") {
|
|
15181
|
+
return "--";
|
|
15182
|
+
} else {
|
|
15183
|
+
return isString(text) ? text : JSON.stringify(text);
|
|
15184
|
+
}
|
|
15185
|
+
};
|
|
15186
|
+
const getCheckableWidth = computed(() => {
|
|
15187
|
+
const sizeMap = {
|
|
15188
|
+
small: 50,
|
|
15189
|
+
medium: 60,
|
|
15190
|
+
large: 70
|
|
15191
|
+
};
|
|
15192
|
+
return sizeMap[props.size];
|
|
15193
|
+
});
|
|
15194
|
+
const getHeadHeight = computed(() => {
|
|
15195
|
+
const sizeMap = {
|
|
15196
|
+
small: 34,
|
|
15197
|
+
medium: 42,
|
|
15198
|
+
large: 50
|
|
15199
|
+
};
|
|
15200
|
+
return sizeMap[props.size];
|
|
15201
|
+
});
|
|
15202
|
+
const getFontSize = computed(() => {
|
|
15203
|
+
const sizeMap = {
|
|
15204
|
+
small: 13,
|
|
15205
|
+
medium: 14,
|
|
15206
|
+
large: 16
|
|
15207
|
+
};
|
|
15208
|
+
return sizeMap[props.size];
|
|
15209
|
+
});
|
|
15210
|
+
const getPadding = computed(() => {
|
|
15211
|
+
const paddingMap = {
|
|
15212
|
+
small: "8px 10px",
|
|
15213
|
+
medium: "10px 14px",
|
|
15214
|
+
large: "12px 18px"
|
|
15215
|
+
};
|
|
15216
|
+
return paddingMap[props.size];
|
|
15217
|
+
});
|
|
15218
|
+
const getEmptyPadding = computed(() => {
|
|
15219
|
+
const paddingMap = {
|
|
15220
|
+
small: 20,
|
|
15221
|
+
medium: 30,
|
|
15222
|
+
large: 40
|
|
15223
|
+
};
|
|
15224
|
+
return paddingMap[props.size];
|
|
15225
|
+
});
|
|
15226
|
+
const getEmptyProps = computed(() => {
|
|
15227
|
+
const widthMap = {
|
|
15228
|
+
small: 150,
|
|
15229
|
+
medium: 200,
|
|
15230
|
+
large: 250
|
|
15231
|
+
};
|
|
15232
|
+
const fontSizeMap = {
|
|
15233
|
+
small: 13,
|
|
15234
|
+
medium: 14,
|
|
15235
|
+
large: 16
|
|
15236
|
+
};
|
|
15237
|
+
return {
|
|
15238
|
+
width: widthMap[props.size],
|
|
15239
|
+
fontSize: fontSizeMap[props.size]
|
|
15240
|
+
};
|
|
15241
|
+
});
|
|
15242
|
+
watch(
|
|
15243
|
+
() => props.size,
|
|
15244
|
+
() => {
|
|
15245
|
+
nextTick(() => {
|
|
15246
|
+
initTableObserver();
|
|
15247
|
+
updateScrollState();
|
|
15248
|
+
handleTableResize();
|
|
15249
|
+
if (props.checkable) {
|
|
15250
|
+
updateSelectedKeys(selectedKeys.value);
|
|
15251
|
+
}
|
|
15252
|
+
});
|
|
15194
15253
|
}
|
|
15254
|
+
);
|
|
15255
|
+
const init = () => {
|
|
15256
|
+
nextTick(() => {
|
|
15257
|
+
initTableObserver();
|
|
15258
|
+
updateScrollState();
|
|
15259
|
+
handleTableResize();
|
|
15260
|
+
if (props.checkable) {
|
|
15261
|
+
updateSelectedKeys(selectedKeys.value);
|
|
15262
|
+
}
|
|
15263
|
+
});
|
|
15195
15264
|
};
|
|
15265
|
+
onMounted(() => {
|
|
15266
|
+
init();
|
|
15267
|
+
});
|
|
15268
|
+
onActivated(() => {
|
|
15269
|
+
updateScrollState();
|
|
15270
|
+
handleTableResize();
|
|
15271
|
+
if (props.checkable && !props.rowKey) {
|
|
15272
|
+
throw new Error("LewTable error: rowKey is required when checkable is enabled!");
|
|
15273
|
+
}
|
|
15274
|
+
if (props.columns.some((col) => !col.width)) {
|
|
15275
|
+
throw new Error("LewTable error: width must be set for every column");
|
|
15276
|
+
}
|
|
15277
|
+
});
|
|
15196
15278
|
onUnmounted(() => {
|
|
15197
|
-
if (
|
|
15198
|
-
|
|
15199
|
-
|
|
15279
|
+
if (resizeObserver) {
|
|
15280
|
+
resizeObserver.disconnect();
|
|
15281
|
+
resizeObserver = null;
|
|
15200
15282
|
}
|
|
15201
15283
|
});
|
|
15202
15284
|
return (_ctx, _cache) => {
|
|
15203
|
-
|
|
15204
|
-
|
|
15205
|
-
class: normalizeClass(["lew-table-wrapper", {
|
|
15206
|
-
"lew-table-checkable": props.checkable
|
|
15207
|
-
}])
|
|
15208
|
-
}, [
|
|
15209
|
-
createElementVNode("div", {
|
|
15285
|
+
return openBlock(), createElementBlock("div", _hoisted_1$o, [
|
|
15286
|
+
createElementVNode("i", {
|
|
15210
15287
|
style: normalizeStyle({ left: unref(any2px)(unref(state).fixedLeftWidth) }),
|
|
15211
15288
|
class: normalizeClass([{
|
|
15212
|
-
"hide-line-left": !unref(state).
|
|
15289
|
+
"hide-line-left": !unref(state).isScrollbarVisible || !unref(state).isInitialized || ["all", "left"].includes(unref(state).hiddenScrollLine)
|
|
15213
15290
|
}, "lew-table-scroll-line-left"])
|
|
15214
15291
|
}, null, 6),
|
|
15215
|
-
createElementVNode("
|
|
15292
|
+
createElementVNode("i", {
|
|
15216
15293
|
style: normalizeStyle({ right: unref(any2px)(unref(state).fixedRightWidth) }),
|
|
15217
15294
|
class: normalizeClass([{
|
|
15218
|
-
"hide-line-right": !unref(state).
|
|
15295
|
+
"hide-line-right": !unref(state).isScrollbarVisible || !unref(state).isInitialized || ["all", "right"].includes(unref(state).hiddenScrollLine)
|
|
15219
15296
|
}, "lew-table-scroll-line-right"])
|
|
15220
15297
|
}, null, 6),
|
|
15221
|
-
createElementVNode("div",
|
|
15298
|
+
createElementVNode("div", _hoisted_2$d, [
|
|
15222
15299
|
renderSlot(_ctx.$slots, "table-header")
|
|
15223
15300
|
]),
|
|
15224
15301
|
createElementVNode("div", {
|
|
@@ -15226,46 +15303,49 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
15226
15303
|
ref: tableRef,
|
|
15227
15304
|
class: "lew-table lew-scrollbar",
|
|
15228
15305
|
style: normalizeStyle(`max-height: ${unref(any2px)(_ctx.maxHeight)}`),
|
|
15229
|
-
onScroll:
|
|
15230
|
-
onMouseleave: _cache[3] || (_cache[3] = ($event) => unref(state).
|
|
15306
|
+
onScroll: updateScrollState,
|
|
15307
|
+
onMouseleave: _cache[3] || (_cache[3] = ($event) => unref(state).hoverRowIndex = -1)
|
|
15231
15308
|
}, [
|
|
15232
15309
|
createElementVNode("div", {
|
|
15233
15310
|
class: "lew-table-head",
|
|
15234
|
-
style: normalizeStyle(
|
|
15235
|
-
onMouseenter: _cache[2] || (_cache[2] = ($event) => unref(state).
|
|
15311
|
+
style: normalizeStyle({ width: unref(totalColumnWidth) + "px", height: unref(getHeadHeight) + "px" }),
|
|
15312
|
+
onMouseenter: _cache[2] || (_cache[2] = ($event) => unref(state).hoverRowIndex = -1)
|
|
15236
15313
|
}, [
|
|
15237
|
-
unref(
|
|
15314
|
+
unref(getFixedColumns)("left").length > 0 || _ctx.checkable ? (openBlock(), createElementBlock("div", {
|
|
15238
15315
|
key: 0,
|
|
15239
15316
|
ref_key: "fixedLeftRef",
|
|
15240
15317
|
ref: fixedLeftRef,
|
|
15241
15318
|
class: "lew-table-fixed-left"
|
|
15242
15319
|
}, [
|
|
15243
|
-
createElementVNode("div",
|
|
15320
|
+
createElementVNode("div", _hoisted_3$c, [
|
|
15244
15321
|
_ctx.checkable ? (openBlock(), createBlock(unref(LewFlex), {
|
|
15245
15322
|
key: 0,
|
|
15246
|
-
style: { "width": "50px" },
|
|
15247
15323
|
class: "lew-table-td",
|
|
15324
|
+
style: normalizeStyle({ width: unref(getCheckableWidth) + "px", padding: unref(getPadding) }),
|
|
15248
15325
|
x: "center"
|
|
15249
15326
|
}, {
|
|
15250
15327
|
default: withCtx(() => [
|
|
15251
15328
|
_ctx.multiple ? (openBlock(), createBlock(unref(LewCheckbox), {
|
|
15252
15329
|
key: 0,
|
|
15253
|
-
|
|
15254
|
-
|
|
15330
|
+
size: _ctx.size,
|
|
15331
|
+
modelValue: unref(state).isAllChecked,
|
|
15332
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(state).isAllChecked = $event),
|
|
15255
15333
|
disabled: _ctx.dataSource.length === 0,
|
|
15256
|
-
certain: unref(
|
|
15257
|
-
onChange: _cache[1] || (_cache[1] = ($event) =>
|
|
15258
|
-
}, null, 8, ["modelValue", "disabled", "certain"])) : (openBlock(), createElementBlock(
|
|
15334
|
+
certain: unref(hasPartialSelection) && !unref(state).isAllChecked,
|
|
15335
|
+
onChange: _cache[1] || (_cache[1] = ($event) => setAllRowsChecked($event))
|
|
15336
|
+
}, null, 8, ["size", "modelValue", "disabled", "certain"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
15337
|
+
createTextVNode("单选")
|
|
15338
|
+
], 64))
|
|
15259
15339
|
]),
|
|
15260
15340
|
_: 1
|
|
15261
|
-
})) : createCommentVNode("", true),
|
|
15262
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(
|
|
15341
|
+
}, 8, ["style"])) : createCommentVNode("", true),
|
|
15342
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(getFixedColumns)("left"), (column, index2) => {
|
|
15263
15343
|
return openBlock(), createBlock(unref(LewFlex), {
|
|
15264
15344
|
key: `columns${index2}`,
|
|
15265
15345
|
class: "lew-table-td",
|
|
15266
15346
|
x: column.x || "start",
|
|
15267
15347
|
y: column.y,
|
|
15268
|
-
style: normalizeStyle(unref(
|
|
15348
|
+
style: normalizeStyle(unref(getColumnStyle)(column))
|
|
15269
15349
|
}, {
|
|
15270
15350
|
default: withCtx(() => [
|
|
15271
15351
|
createTextVNode(toDisplayString(column.title), 1)
|
|
@@ -15275,15 +15355,15 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
15275
15355
|
}), 128))
|
|
15276
15356
|
])
|
|
15277
15357
|
], 512)) : createCommentVNode("", true),
|
|
15278
|
-
createElementVNode("div", _hoisted_4$
|
|
15358
|
+
createElementVNode("div", _hoisted_4$4, [
|
|
15279
15359
|
createElementVNode("div", _hoisted_5$3, [
|
|
15280
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(
|
|
15360
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(nonFixedColumns), (column, index2) => {
|
|
15281
15361
|
return openBlock(), createBlock(unref(LewFlex), {
|
|
15282
15362
|
key: `columns${index2}`,
|
|
15283
15363
|
class: "lew-table-td",
|
|
15284
15364
|
x: column.x || "start",
|
|
15285
15365
|
y: column.y,
|
|
15286
|
-
style: normalizeStyle(unref(
|
|
15366
|
+
style: normalizeStyle(unref(getColumnStyle)(column))
|
|
15287
15367
|
}, {
|
|
15288
15368
|
default: withCtx(() => [
|
|
15289
15369
|
createTextVNode(toDisplayString(column.title), 1)
|
|
@@ -15293,20 +15373,20 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
15293
15373
|
}), 128))
|
|
15294
15374
|
])
|
|
15295
15375
|
]),
|
|
15296
|
-
unref(
|
|
15376
|
+
unref(getFixedColumns)("right").length > 0 ? (openBlock(), createElementBlock("div", {
|
|
15297
15377
|
key: 1,
|
|
15298
15378
|
ref_key: "fixedRightRef",
|
|
15299
15379
|
ref: fixedRightRef,
|
|
15300
15380
|
class: "lew-table-fixed-right"
|
|
15301
15381
|
}, [
|
|
15302
15382
|
createElementVNode("div", _hoisted_6$2, [
|
|
15303
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(
|
|
15383
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(getFixedColumns)("right"), (column, index2) => {
|
|
15304
15384
|
return openBlock(), createBlock(unref(LewFlex), {
|
|
15305
15385
|
key: `columns${index2}`,
|
|
15306
15386
|
class: "lew-table-td",
|
|
15307
15387
|
x: column.x || "start",
|
|
15308
15388
|
y: column.y,
|
|
15309
|
-
style: normalizeStyle(unref(
|
|
15389
|
+
style: normalizeStyle(unref(getColumnStyle)(column))
|
|
15310
15390
|
}, {
|
|
15311
15391
|
default: withCtx(() => [
|
|
15312
15392
|
createTextVNode(toDisplayString(column.title), 1)
|
|
@@ -15320,40 +15400,44 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
15320
15400
|
_ctx.dataSource.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
15321
15401
|
key: 0,
|
|
15322
15402
|
class: "lew-table-body",
|
|
15323
|
-
style: normalizeStyle(`width: ${unref(
|
|
15403
|
+
style: normalizeStyle(`width: ${unref(totalColumnWidth)}px`)
|
|
15324
15404
|
}, [
|
|
15325
|
-
unref(
|
|
15405
|
+
unref(getFixedColumns)("left").length > 0 || _ctx.checkable ? (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
15326
15406
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.dataSource, (row, i2) => {
|
|
15327
15407
|
return openBlock(), createElementBlock("div", {
|
|
15328
15408
|
key: `data${i2}`,
|
|
15329
15409
|
class: normalizeClass(["lew-table-tr", {
|
|
15330
|
-
"lew-table-tr-hover": unref(state).
|
|
15331
|
-
"lew-table-tr-selected": unref(state).
|
|
15410
|
+
"lew-table-tr-hover": unref(state).hoverRowIndex === i2,
|
|
15411
|
+
"lew-table-tr-selected": unref(state).selectedRowsMap[row[_ctx.rowKey]]
|
|
15332
15412
|
}]),
|
|
15333
|
-
|
|
15334
|
-
|
|
15413
|
+
style: normalizeStyle({
|
|
15414
|
+
height: unref(trHeightArr)[i2] + "px"
|
|
15415
|
+
}),
|
|
15416
|
+
onClick: ($event) => toggleRowSelection(row),
|
|
15417
|
+
onMouseenter: ($event) => unref(state).hoverRowIndex = i2
|
|
15335
15418
|
}, [
|
|
15336
15419
|
_ctx.checkable ? (openBlock(), createBlock(unref(LewFlex), {
|
|
15337
15420
|
key: 0,
|
|
15338
|
-
style: {
|
|
15421
|
+
style: normalizeStyle({ width: unref(getCheckableWidth) + "px" }),
|
|
15339
15422
|
x: "center",
|
|
15340
15423
|
class: "lew-table-checkbox-wrapper"
|
|
15341
15424
|
}, {
|
|
15342
15425
|
default: withCtx(() => [
|
|
15343
15426
|
createVNode(unref(LewCheckbox), {
|
|
15427
|
+
size: _ctx.size,
|
|
15344
15428
|
class: "lew-table-checkbox",
|
|
15345
|
-
checked: unref(state).
|
|
15346
|
-
}, null, 8, ["checked"])
|
|
15429
|
+
checked: unref(state).selectedRowsMap[row[_ctx.rowKey]]
|
|
15430
|
+
}, null, 8, ["size", "checked"])
|
|
15347
15431
|
]),
|
|
15348
15432
|
_: 2
|
|
15349
|
-
},
|
|
15350
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(
|
|
15433
|
+
}, 1032, ["style"])) : createCommentVNode("", true),
|
|
15434
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(getFixedColumns)("left"), (column, j2) => {
|
|
15351
15435
|
return openBlock(), createBlock(unref(LewFlex), {
|
|
15352
15436
|
key: `col${j2}`,
|
|
15353
15437
|
class: "lew-table-td",
|
|
15354
15438
|
x: column.x || "start",
|
|
15355
15439
|
y: column.y,
|
|
15356
|
-
style: normalizeStyle(unref(
|
|
15440
|
+
style: normalizeStyle(unref(getColumnStyle)(column, row))
|
|
15357
15441
|
}, {
|
|
15358
15442
|
default: withCtx(() => [
|
|
15359
15443
|
_ctx.$slots[column.field] ? renderSlot(_ctx.$slots, column.field, {
|
|
@@ -15361,17 +15445,17 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
15361
15445
|
row,
|
|
15362
15446
|
column,
|
|
15363
15447
|
index: i2
|
|
15364
|
-
}) : (openBlock(), createBlock(
|
|
15448
|
+
}) : (openBlock(), createBlock(renderCell, {
|
|
15365
15449
|
key: 1,
|
|
15366
|
-
|
|
15367
|
-
|
|
15368
|
-
|
|
15369
|
-
}, null, 8, ["
|
|
15450
|
+
column,
|
|
15451
|
+
row,
|
|
15452
|
+
index: i2
|
|
15453
|
+
}, null, 8, ["column", "row", "index"]))
|
|
15370
15454
|
]),
|
|
15371
15455
|
_: 2
|
|
15372
15456
|
}, 1032, ["x", "y", "style"]);
|
|
15373
15457
|
}), 128))
|
|
15374
|
-
],
|
|
15458
|
+
], 46, _hoisted_8);
|
|
15375
15459
|
}), 128))
|
|
15376
15460
|
])) : createCommentVNode("", true),
|
|
15377
15461
|
createElementVNode("div", _hoisted_9, [
|
|
@@ -15379,19 +15463,21 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
15379
15463
|
return openBlock(), createElementBlock("div", {
|
|
15380
15464
|
key: `data${i2}`,
|
|
15381
15465
|
class: normalizeClass(["lew-table-tr", {
|
|
15382
|
-
"lew-table-tr-hover": unref(state).
|
|
15383
|
-
"lew-table-tr-selected": unref(state).
|
|
15466
|
+
"lew-table-tr-hover": unref(state).hoverRowIndex === i2,
|
|
15467
|
+
"lew-table-tr-selected": unref(state).selectedRowsMap[row[_ctx.rowKey]]
|
|
15384
15468
|
}]),
|
|
15385
|
-
|
|
15386
|
-
|
|
15469
|
+
ref_for: true,
|
|
15470
|
+
ref: (e2) => unref(trRefArr)[i2] = e2,
|
|
15471
|
+
onClick: ($event) => toggleRowSelection(row),
|
|
15472
|
+
onMouseenter: ($event) => unref(state).hoverRowIndex = i2
|
|
15387
15473
|
}, [
|
|
15388
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(
|
|
15474
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(nonFixedColumns), (column, j2) => {
|
|
15389
15475
|
return openBlock(), createBlock(unref(LewFlex), {
|
|
15390
15476
|
key: `col${j2}`,
|
|
15391
15477
|
class: "lew-table-td",
|
|
15392
15478
|
x: column.x || "start",
|
|
15393
15479
|
y: column.y,
|
|
15394
|
-
style: normalizeStyle(unref(
|
|
15480
|
+
style: normalizeStyle(unref(getColumnStyle)(column, row))
|
|
15395
15481
|
}, {
|
|
15396
15482
|
default: withCtx(() => [
|
|
15397
15483
|
_ctx.$slots[column.field] ? renderSlot(_ctx.$slots, column.field, {
|
|
@@ -15399,12 +15485,12 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
15399
15485
|
row,
|
|
15400
15486
|
column,
|
|
15401
15487
|
index: i2
|
|
15402
|
-
}) : (openBlock(), createBlock(
|
|
15488
|
+
}) : (openBlock(), createBlock(renderCell, {
|
|
15403
15489
|
key: 1,
|
|
15404
|
-
|
|
15405
|
-
|
|
15406
|
-
|
|
15407
|
-
}, null, 8, ["
|
|
15490
|
+
column,
|
|
15491
|
+
row,
|
|
15492
|
+
index: i2
|
|
15493
|
+
}, null, 8, ["column", "row", "index"]))
|
|
15408
15494
|
]),
|
|
15409
15495
|
_: 2
|
|
15410
15496
|
}, 1032, ["x", "y", "style"]);
|
|
@@ -15412,23 +15498,26 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
15412
15498
|
], 42, _hoisted_10);
|
|
15413
15499
|
}), 128))
|
|
15414
15500
|
]),
|
|
15415
|
-
unref(
|
|
15501
|
+
unref(getFixedColumns)("right").length > 0 ? (openBlock(), createElementBlock("div", _hoisted_11, [
|
|
15416
15502
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.dataSource, (row, i2) => {
|
|
15417
15503
|
return openBlock(), createElementBlock("div", {
|
|
15418
15504
|
key: `data${i2}`,
|
|
15419
15505
|
class: normalizeClass(["lew-table-tr", {
|
|
15420
|
-
"lew-table-tr-hover": unref(state).
|
|
15421
|
-
"lew-table-tr-selected": unref(state).
|
|
15506
|
+
"lew-table-tr-hover": unref(state).hoverRowIndex === i2,
|
|
15507
|
+
"lew-table-tr-selected": unref(state).selectedRowsMap[row[_ctx.rowKey]]
|
|
15422
15508
|
}]),
|
|
15423
|
-
|
|
15509
|
+
style: normalizeStyle({
|
|
15510
|
+
height: unref(trHeightArr)[i2] + "px"
|
|
15511
|
+
}),
|
|
15512
|
+
onMouseenter: ($event) => unref(state).hoverRowIndex = i2
|
|
15424
15513
|
}, [
|
|
15425
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(
|
|
15514
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(getFixedColumns)("right"), (column, j2) => {
|
|
15426
15515
|
return openBlock(), createBlock(unref(LewFlex), {
|
|
15427
15516
|
key: `col${j2}`,
|
|
15428
15517
|
class: "lew-table-td",
|
|
15429
15518
|
x: column.x || "start",
|
|
15430
15519
|
y: column.y,
|
|
15431
|
-
style: normalizeStyle(unref(
|
|
15520
|
+
style: normalizeStyle(unref(getColumnStyle)(column, row))
|
|
15432
15521
|
}, {
|
|
15433
15522
|
default: withCtx(() => [
|
|
15434
15523
|
_ctx.$slots[column.field] ? renderSlot(_ctx.$slots, column.field, {
|
|
@@ -15436,17 +15525,17 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
15436
15525
|
row,
|
|
15437
15526
|
column,
|
|
15438
15527
|
index: i2
|
|
15439
|
-
}) : (openBlock(), createBlock(
|
|
15528
|
+
}) : (openBlock(), createBlock(renderCell, {
|
|
15440
15529
|
key: 1,
|
|
15441
|
-
|
|
15442
|
-
|
|
15443
|
-
|
|
15444
|
-
}, null, 8, ["
|
|
15530
|
+
column,
|
|
15531
|
+
row,
|
|
15532
|
+
index: i2
|
|
15533
|
+
}, null, 8, ["column", "row", "index"]))
|
|
15445
15534
|
]),
|
|
15446
15535
|
_: 2
|
|
15447
15536
|
}, 1032, ["x", "y", "style"]);
|
|
15448
15537
|
}), 128))
|
|
15449
|
-
],
|
|
15538
|
+
], 46, _hoisted_12);
|
|
15450
15539
|
}), 128))
|
|
15451
15540
|
])) : createCommentVNode("", true)
|
|
15452
15541
|
], 4)) : createCommentVNode("", true)
|
|
@@ -15457,15 +15546,15 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
15457
15546
|
_ctx.dataSource.length === 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
15458
15547
|
_ctx.$slots.empty ? renderSlot(_ctx.$slots, "empty", { key: 0 }) : (openBlock(), createBlock(unref(LewFlex), {
|
|
15459
15548
|
key: 1,
|
|
15460
|
-
style: {
|
|
15549
|
+
style: normalizeStyle({ padding: unref(getEmptyPadding) + "px" })
|
|
15461
15550
|
}, {
|
|
15462
15551
|
default: withCtx(() => [
|
|
15463
|
-
createVNode(
|
|
15552
|
+
createVNode(unref(_sfc_main$d), normalizeProps(guardReactiveProps(unref(getEmptyProps))), null, 16)
|
|
15464
15553
|
]),
|
|
15465
15554
|
_: 1
|
|
15466
|
-
}))
|
|
15555
|
+
}, 8, ["style"]))
|
|
15467
15556
|
], 64)) : createCommentVNode("", true)
|
|
15468
|
-
]
|
|
15557
|
+
]);
|
|
15469
15558
|
};
|
|
15470
15559
|
}
|
|
15471
15560
|
});
|
|
@@ -15924,7 +16013,7 @@ const _hoisted_1$l = {
|
|
|
15924
16013
|
key: 0,
|
|
15925
16014
|
class: "skeletons"
|
|
15926
16015
|
};
|
|
15927
|
-
const _hoisted_2$
|
|
16016
|
+
const _hoisted_2$c = ["src", "alt"];
|
|
15928
16017
|
const errorSrc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAABopJREFUeAHtnd9rG0cQx+ckxVFbt7VBgSS07o84BCJaAoW8NFDogyH/R176mj+kbyUv+T8KfggU0pdAi/tDTapIiWPHsZzY8S/JliWfrjtnH1JUWb7dO61nVrNg9Gtmd/b78dzezZ5lD/raw0cLRb/l31FvzwUAMwDBZJ+JvCSlgFf3AJZUSPPZiez9WzdvlHrDU58dtVKpNLG+2fwRPPghCIJM9L488lHA87wOBHCvMJ2/WywWWxh5CDiEu9X8WYH9ns90JNKTFFCgHxSm8rcRcpipmLkC9yS5+L2PLMOjsQrdC9fctv+nHJb5gRwWMR6us+eyX+fwhCoAWXOHicXxM0xYZIuH6DmOE5CYYykwlzm6FIplLEbMFEC2KoPlOpcZN41wg8nwLFrDQ0yZKSCAmQHTDVcA6yrGzF4AMwOmG64A1lWMmb0AZgZMN1wBrKsYM3sBzAyYbrgCWFcxZvYCmBkw3XAFsK5izOwFMDNguuEKYF3FmNkLYGbAdMMVwLqKMbMXwMyA6YYrgHUVY2YvgJkB0w1XAOsqxsxeADMDphuuANZVjJm9AGYGTDdcAayrGDP7nO14v/v2G9tDkhrvl19/sxqPZLBVue0PJoDta251RAFsVW77gwlg+5pbHVEAW5Xb/mAC2L7mVkcUwFbltj+Y9etg0yk29vZhtbYOm1s70DwIvyEI8ucnYHrqI7h0sQAfvP+eaddO+5EH3Ol0oPr8JbyqvfkfiL39JuDPyupruHzxAlz54hPIZOSg1CsUaTUQ7l//VAbC7Z0EPsdfALRFH2ldBUgDxszd2t7tRnvKM7RFH2ldBcgCxjV30GG5G/rgZ+iDvtKOFCALGE+oTFsSX9MxqfqRBYxny6Ytia/pmFT9yAKOLoVMhEviazIeZR+ygCmLxik2soCxiGHakviajknVjyxgrFCZtiS+pmNS9SMLGMuPpi2Jr+mYVP3IAsbaMpYfdRv6SF26qxpZwBgi1panPv6wG+0pz9AWfaR1FSANGDcOvro+GyuTMXPRNo3NBiyUvNnY7KrE+Bn53SQEdvXKDFy+dMHKduFuvQFPny3BuVwOptURIaceOTc20eO6OvvlpyPVut0+hNKTZ6C+Dh9a7TZUF1fg2uxnIx1z1J2TPkSPevK9/SPUx+XncHB8MwF+Vltb19rN6u2PynMBfEzixfJqeLdIP5h/Ky/A9/nuMQtgRXRjcxsQ8KDWbB6oz14N+ojFe2MPGAE+UYfmYW15ZQ1263vDTMh+NtaA8fYePKk6PPRPBVSuLIYnX6caEjMYa8BPq0tQb8TLzHpjHzCTubWxBbyqzpBrrze0eOFavK/u4uTUWALGSlNZnd2a3kGJ6ylmr27rdAIoKz+8pOLS2AGOKk2YgX/8XYaDVltL66NiRtUYEt65WVvTy3ytAFM2ZgW4t9KEOuzsNuD3hcewvVOPJQtmHp4x9xYzYjn2GVUXX2r/YvV1Ye0lG8CDKk2oEpYUMZPj3GKL17pvE9zMF1HxfR8qBof4yN/mIxvAJ1WaUCyEj2vqsHV5WDHDRPD1t1ssdpxYAI4L56R1OU4xwwRypbqsrqEPTVyt+ZAHrAunf13WKWboqh7tOOn62bQnDdgUTu+6rFPMMBGe+o4TacBJ4ETrsm4xwwQy5R0nsoBNKk0mcNLwobzjRBKwaaUpDVimfVDdcSIHOGmlyRRQGn4Ud5xIAU6r0pQGLJM+KO44kQKcVqXJBE5aPtR2nMgAjlvMSAvEqPqhtuNEArBuMWNUcNLql9KO05kDNi1mpAVjVP1Q2XE6c8BJihmjgpNGv1R2nM78LxuuXf0c8EfaaBQ48wwezbSk10gBARwp4eijAHYUbDQtARwp4eijAHYUbDQt62fRtv9vUDTRcX2UDHacvAAWwI4r4Pj0JIMFsOMKOD49yWAB7LgCjk9PMlgAO66A49OTDBbAjivg+PQkgwWw4wo4Pj3JYAHsuAKOT08yWAA7roDj05MMFsCOK+D49CSDBbDjCjg+PclgAey4Ao5PT2WwF++rWh0Xws3pefWMB7Dk5uRkVsgW1+B5kcJZBeYz2Ynsfc/z+P7nJ2fZJJsYMkW2mVs3b5QggHvJuhNvcgoopsg2vEwqTOfvKuIPyAUpARkpgCyRKTqHgIvFYqswlb/tgfeTHK6NNCXhhOyQIbJEphiUOtF6tz18tFD0W/4d9e6c+ucxM+oL8yfftZBXtBTw6sdXQvO45oZLbk+A/wFCn6eLV03nkQAAAABJRU5ErkJggg==";
|
|
15929
16018
|
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
15930
16019
|
__name: "LewAvatar",
|
|
@@ -15967,7 +16056,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
15967
16056
|
src: _ctx.src,
|
|
15968
16057
|
alt: _ctx.alt,
|
|
15969
16058
|
lazy: ""
|
|
15970
|
-
}, null, 8, _hoisted_2$
|
|
16059
|
+
}, null, 8, _hoisted_2$c))
|
|
15971
16060
|
], 2),
|
|
15972
16061
|
_ctx.status ? (openBlock(), createElementBlock("span", {
|
|
15973
16062
|
key: 0,
|
|
@@ -16172,7 +16261,7 @@ const buttonProps = {
|
|
|
16172
16261
|
}
|
|
16173
16262
|
};
|
|
16174
16263
|
const _hoisted_1$k = ["disabled"];
|
|
16175
|
-
const _hoisted_2$
|
|
16264
|
+
const _hoisted_2$b = {
|
|
16176
16265
|
key: 1,
|
|
16177
16266
|
class: "lew-button-content"
|
|
16178
16267
|
};
|
|
@@ -16187,8 +16276,8 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
16187
16276
|
const _loading = ref(false);
|
|
16188
16277
|
const buttonRef = ref();
|
|
16189
16278
|
const focus = () => {
|
|
16190
|
-
var
|
|
16191
|
-
(
|
|
16279
|
+
var _a;
|
|
16280
|
+
(_a = buttonRef.value) == null ? void 0 : _a.focus();
|
|
16192
16281
|
};
|
|
16193
16282
|
const handleClick = async (e2) => {
|
|
16194
16283
|
if (props.disabled || _loading.value || props.loading) return;
|
|
@@ -16297,7 +16386,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
16297
16386
|
type: _ctx.icon
|
|
16298
16387
|
}, null, 8, ["size", "type"])) : createCommentVNode("", true)
|
|
16299
16388
|
], 64)) : createCommentVNode("", true),
|
|
16300
|
-
_ctx.$slots.default || _ctx.text ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
16389
|
+
_ctx.$slots.default || _ctx.text ? (openBlock(), createElementBlock("div", _hoisted_2$b, [
|
|
16301
16390
|
createElementVNode("span", _hoisted_3$b, [
|
|
16302
16391
|
_ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 0 }, void 0, true) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
16303
16392
|
createTextVNode(toDisplayString(_ctx.text), 1)
|
|
@@ -16317,7 +16406,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
16317
16406
|
};
|
|
16318
16407
|
}
|
|
16319
16408
|
});
|
|
16320
|
-
const LewButton = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-
|
|
16409
|
+
const LewButton = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-583f0831"]]);
|
|
16321
16410
|
const badgeProps = {
|
|
16322
16411
|
color: {
|
|
16323
16412
|
type: String,
|
|
@@ -16433,7 +16522,7 @@ const tagProps = {
|
|
|
16433
16522
|
}
|
|
16434
16523
|
};
|
|
16435
16524
|
const _hoisted_1$i = { class: "lew-tag-left" };
|
|
16436
|
-
const _hoisted_2$
|
|
16525
|
+
const _hoisted_2$a = { class: "lew-tag-value" };
|
|
16437
16526
|
const _hoisted_3$a = { class: "lew-tag-right" };
|
|
16438
16527
|
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
16439
16528
|
__name: "LewTag",
|
|
@@ -16499,7 +16588,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
16499
16588
|
createElementVNode("div", _hoisted_1$i, [
|
|
16500
16589
|
renderSlot(_ctx.$slots, "left")
|
|
16501
16590
|
]),
|
|
16502
|
-
createElementVNode("div", _hoisted_2$
|
|
16591
|
+
createElementVNode("div", _hoisted_2$a, [
|
|
16503
16592
|
renderSlot(_ctx.$slots, "default")
|
|
16504
16593
|
]),
|
|
16505
16594
|
createElementVNode("div", _hoisted_3$a, [
|
|
@@ -16558,9 +16647,9 @@ const alertProps = {
|
|
|
16558
16647
|
}
|
|
16559
16648
|
};
|
|
16560
16649
|
const _hoisted_1$h = { class: "lew-alert-group" };
|
|
16561
|
-
const _hoisted_2$
|
|
16650
|
+
const _hoisted_2$9 = ["innerHTML"];
|
|
16562
16651
|
const _hoisted_3$9 = { class: "message" };
|
|
16563
|
-
const _hoisted_4$
|
|
16652
|
+
const _hoisted_4$3 = { class: "title" };
|
|
16564
16653
|
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
16565
16654
|
__name: "LewAlert",
|
|
16566
16655
|
props: alertProps,
|
|
@@ -16580,9 +16669,9 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
16580
16669
|
createElementVNode("div", {
|
|
16581
16670
|
class: "alert-icon",
|
|
16582
16671
|
innerHTML: unref(getStatusIcon)(item.type)
|
|
16583
|
-
}, null, 8, _hoisted_2$
|
|
16672
|
+
}, null, 8, _hoisted_2$9),
|
|
16584
16673
|
createElementVNode("div", _hoisted_3$9, [
|
|
16585
|
-
createElementVNode("div", _hoisted_4$
|
|
16674
|
+
createElementVNode("div", _hoisted_4$3, toDisplayString(item.title), 1),
|
|
16586
16675
|
withDirectives(createElementVNode("div", { class: "content" }, toDisplayString(item.content), 513), [
|
|
16587
16676
|
[vShow, item.content]
|
|
16588
16677
|
])
|
|
@@ -19422,9 +19511,11 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
19422
19511
|
if (isEllipsis) {
|
|
19423
19512
|
element.style.cursor = "pointer";
|
|
19424
19513
|
instance.enable();
|
|
19514
|
+
instance.show();
|
|
19425
19515
|
} else {
|
|
19426
19516
|
element.style.cursor = "text";
|
|
19427
19517
|
instance.disable();
|
|
19518
|
+
instance.hide();
|
|
19428
19519
|
}
|
|
19429
19520
|
width = element.offsetWidth;
|
|
19430
19521
|
};
|
|
@@ -19445,7 +19536,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
19445
19536
|
};
|
|
19446
19537
|
}
|
|
19447
19538
|
});
|
|
19448
|
-
const LewTextTrim = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-
|
|
19539
|
+
const LewTextTrim = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-111dfce6"]]);
|
|
19449
19540
|
const modalModel = {
|
|
19450
19541
|
visible: {
|
|
19451
19542
|
type: Boolean,
|
|
@@ -19537,7 +19628,7 @@ const _hoisted_1$f = {
|
|
|
19537
19628
|
key: 0,
|
|
19538
19629
|
class: "lew-modal-mask"
|
|
19539
19630
|
};
|
|
19540
|
-
const _hoisted_2$
|
|
19631
|
+
const _hoisted_2$8 = {
|
|
19541
19632
|
key: 0,
|
|
19542
19633
|
class: "header-slot"
|
|
19543
19634
|
};
|
|
@@ -19625,7 +19716,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
19625
19716
|
onClick: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
19626
19717
|
}, ["stop"]))
|
|
19627
19718
|
}, [
|
|
19628
|
-
_ctx.$slots.header ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
19719
|
+
_ctx.$slots.header ? (openBlock(), createElementBlock("div", _hoisted_2$8, [
|
|
19629
19720
|
renderSlot(_ctx.$slots, "header", {}, void 0, true)
|
|
19630
19721
|
])) : _ctx.title ? (openBlock(), createBlock(unref(LewFlex), {
|
|
19631
19722
|
key: 1,
|
|
@@ -19778,9 +19869,9 @@ const popokProps = {
|
|
|
19778
19869
|
}
|
|
19779
19870
|
};
|
|
19780
19871
|
const _hoisted_1$e = { class: "left" };
|
|
19781
|
-
const _hoisted_2$
|
|
19872
|
+
const _hoisted_2$7 = ["innerHTML"];
|
|
19782
19873
|
const _hoisted_3$7 = { class: "right" };
|
|
19783
|
-
const _hoisted_4$
|
|
19874
|
+
const _hoisted_4$2 = {
|
|
19784
19875
|
key: 0,
|
|
19785
19876
|
class: "title"
|
|
19786
19877
|
};
|
|
@@ -19836,10 +19927,10 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
19836
19927
|
createElementVNode("div", {
|
|
19837
19928
|
class: normalizeClass(`lew-popok-icon lew-popok-icon-${_ctx.type}`),
|
|
19838
19929
|
innerHTML: unref(getStatusIcon)(_ctx.type)
|
|
19839
|
-
}, null, 10, _hoisted_2$
|
|
19930
|
+
}, null, 10, _hoisted_2$7)
|
|
19840
19931
|
]),
|
|
19841
19932
|
createElementVNode("div", _hoisted_3$7, [
|
|
19842
|
-
_ctx.title ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
19933
|
+
_ctx.title ? (openBlock(), createElementBlock("div", _hoisted_4$2, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
|
|
19843
19934
|
_ctx.content ? (openBlock(), createElementBlock("div", _hoisted_5$2, toDisplayString(_ctx.content), 1)) : createCommentVNode("", true),
|
|
19844
19935
|
createElementVNode("div", _hoisted_6$1, [
|
|
19845
19936
|
createVNode(unref(LewButton), mergeProps({
|
|
@@ -19957,8 +20048,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
19957
20048
|
props: popoverProps,
|
|
19958
20049
|
emits: ["show", "hide"],
|
|
19959
20050
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
19960
|
-
var
|
|
19961
|
-
const app = (
|
|
20051
|
+
var _a;
|
|
20052
|
+
const app = (_a = getCurrentInstance()) == null ? void 0 : _a.appContext.app;
|
|
19962
20053
|
if (app && !app.directive("loading")) {
|
|
19963
20054
|
app.use(LewLoading);
|
|
19964
20055
|
}
|
|
@@ -20181,7 +20272,7 @@ const _hoisted_1$c = {
|
|
|
20181
20272
|
key: 0,
|
|
20182
20273
|
class: "header-slot"
|
|
20183
20274
|
};
|
|
20184
|
-
const _hoisted_2$
|
|
20275
|
+
const _hoisted_2$6 = { class: "main-slot" };
|
|
20185
20276
|
const _hoisted_3$6 = {
|
|
20186
20277
|
key: 2,
|
|
20187
20278
|
class: "footer-slot"
|
|
@@ -20286,7 +20377,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
20286
20377
|
]),
|
|
20287
20378
|
_: 1
|
|
20288
20379
|
})) : createCommentVNode("", true),
|
|
20289
|
-
createElementVNode("div", _hoisted_2$
|
|
20380
|
+
createElementVNode("div", _hoisted_2$6, [
|
|
20290
20381
|
renderSlot(_ctx.$slots, "default")
|
|
20291
20382
|
]),
|
|
20292
20383
|
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_3$6, [
|
|
@@ -20558,7 +20649,7 @@ const menuProps = {
|
|
|
20558
20649
|
}
|
|
20559
20650
|
};
|
|
20560
20651
|
const _hoisted_1$a = { class: "lew-menu" };
|
|
20561
|
-
const _hoisted_2$
|
|
20652
|
+
const _hoisted_2$5 = { class: "lew-menu-item" };
|
|
20562
20653
|
const _hoisted_3$5 = ["onClick"];
|
|
20563
20654
|
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
20564
20655
|
__name: "LewMenu",
|
|
@@ -20598,7 +20689,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
20598
20689
|
return openBlock(), createElementBlock(Fragment, {
|
|
20599
20690
|
key: item.label
|
|
20600
20691
|
}, [
|
|
20601
|
-
createElementVNode("div", _hoisted_2$
|
|
20692
|
+
createElementVNode("div", _hoisted_2$5, [
|
|
20602
20693
|
createVNode(unref(LewTextTrim), {
|
|
20603
20694
|
text: item.label
|
|
20604
20695
|
}, null, 8, ["text"]),
|
|
@@ -20668,7 +20759,7 @@ const menuTreeProps = {
|
|
|
20668
20759
|
}
|
|
20669
20760
|
};
|
|
20670
20761
|
const _hoisted_1$9 = { class: "lew-menu" };
|
|
20671
|
-
const _hoisted_2$
|
|
20762
|
+
const _hoisted_2$4 = { class: "lew-menu-item" };
|
|
20672
20763
|
const _hoisted_3$4 = ["onClick"];
|
|
20673
20764
|
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
20674
20765
|
__name: "LewMenuTree",
|
|
@@ -20708,7 +20799,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
20708
20799
|
return openBlock(), createElementBlock(Fragment, {
|
|
20709
20800
|
key: item.label
|
|
20710
20801
|
}, [
|
|
20711
|
-
createElementVNode("div", _hoisted_2$
|
|
20802
|
+
createElementVNode("div", _hoisted_2$4, [
|
|
20712
20803
|
createVNode(unref(LewTextTrim), {
|
|
20713
20804
|
text: item.label
|
|
20714
20805
|
}, null, 8, ["text"]),
|
|
@@ -20979,11 +21070,9 @@ const uploadProps = {
|
|
|
20979
21070
|
}
|
|
20980
21071
|
}
|
|
20981
21072
|
};
|
|
20982
|
-
const _withScopeId = (n2) => (pushScopeId("data-v-cc901352"), n2 = n2(), popScopeId(), n2);
|
|
20983
21073
|
const _hoisted_1$7 = ["multiple", "accept"];
|
|
20984
|
-
const _hoisted_2$
|
|
20985
|
-
const _hoisted_3$3 =
|
|
20986
|
-
const _hoisted_4$2 = { key: 1 };
|
|
21074
|
+
const _hoisted_2$3 = ["src"];
|
|
21075
|
+
const _hoisted_3$3 = { key: 1 };
|
|
20987
21076
|
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
20988
21077
|
__name: "LewUpload",
|
|
20989
21078
|
props: /* @__PURE__ */ mergeModels(uploadProps, {
|
|
@@ -21278,12 +21367,12 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
21278
21367
|
default: withCtx(() => [
|
|
21279
21368
|
withDirectives(createElementVNode("label", {
|
|
21280
21369
|
onMouseenter: _cache[2] || (_cache[2] = ($event) => {
|
|
21281
|
-
var
|
|
21282
|
-
return (
|
|
21370
|
+
var _a;
|
|
21371
|
+
return (_a = unref(inputPasteRef)) == null ? void 0 : _a.focus();
|
|
21283
21372
|
}),
|
|
21284
21373
|
onMouseleave: _cache[3] || (_cache[3] = ($event) => {
|
|
21285
|
-
var
|
|
21286
|
-
return (
|
|
21374
|
+
var _a;
|
|
21375
|
+
return (_a = unref(inputPasteRef)) == null ? void 0 : _a.blur();
|
|
21287
21376
|
}),
|
|
21288
21377
|
class: normalizeClass(["lew-upload-label", unref(getUploadLabelClass)]),
|
|
21289
21378
|
style: { "width": "100%" }
|
|
@@ -21384,7 +21473,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
21384
21473
|
key: 1,
|
|
21385
21474
|
class: "lew-upload-file-icon",
|
|
21386
21475
|
src: unref(getFileIcon)(item.name)
|
|
21387
|
-
}, null, 8, _hoisted_2$
|
|
21476
|
+
}, null, 8, _hoisted_2$3))
|
|
21388
21477
|
]),
|
|
21389
21478
|
_: 2
|
|
21390
21479
|
}, 1032, ["style"]),
|
|
@@ -21480,7 +21569,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
21480
21569
|
class: "lew-upload-progress-box"
|
|
21481
21570
|
}, {
|
|
21482
21571
|
default: withCtx(() => [
|
|
21483
|
-
|
|
21572
|
+
_cache[4] || (_cache[4] = createElementVNode("span", { class: "lew-upload-progress-bar" }, null, -1)),
|
|
21484
21573
|
createElementVNode("span", {
|
|
21485
21574
|
style: normalizeStyle({ width: `${item.percent > 100 ? 100 : item.percent}%` }),
|
|
21486
21575
|
class: "lew-upload-progress-bar-upload"
|
|
@@ -21505,7 +21594,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
21505
21594
|
item.status === "uploading" && item.percent && item.size ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
21506
21595
|
createTextVNode(toDisplayString(unref(formatBytes)(item.percent / 100 * item.size) + " / "), 1)
|
|
21507
21596
|
], 64)) : createCommentVNode("", true),
|
|
21508
|
-
item.size ? (openBlock(), createElementBlock("span",
|
|
21597
|
+
item.size ? (openBlock(), createElementBlock("span", _hoisted_3$3, toDisplayString(unref(formatBytes)(item.size)), 1)) : createCommentVNode("", true)
|
|
21509
21598
|
], 4),
|
|
21510
21599
|
createVNode(_component_lew_flex, {
|
|
21511
21600
|
style: { "max-width": "200px" },
|
|
@@ -21557,7 +21646,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
21557
21646
|
};
|
|
21558
21647
|
}
|
|
21559
21648
|
});
|
|
21560
|
-
const LewUpload = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-
|
|
21649
|
+
const LewUpload = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-c007e418"]]);
|
|
21561
21650
|
const collapseModel = {
|
|
21562
21651
|
modelValue: {
|
|
21563
21652
|
type: [Array, String],
|
|
@@ -21662,11 +21751,16 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
21662
21751
|
}),
|
|
21663
21752
|
emits: ["update:modelValue"],
|
|
21664
21753
|
setup(__props) {
|
|
21754
|
+
const props = __props;
|
|
21665
21755
|
const modelValue = useModel(__props, "modelValue");
|
|
21666
21756
|
provide("expandKeys", modelValue);
|
|
21757
|
+
const collapseStyle = computed(() => ({
|
|
21758
|
+
width: any2px(props.width),
|
|
21759
|
+
gap: any2px(props.gap)
|
|
21760
|
+
}));
|
|
21667
21761
|
return (_ctx, _cache) => {
|
|
21668
21762
|
return openBlock(), createElementBlock("div", {
|
|
21669
|
-
style: normalizeStyle(
|
|
21763
|
+
style: normalizeStyle(collapseStyle.value),
|
|
21670
21764
|
class: "lew-collapse"
|
|
21671
21765
|
}, [
|
|
21672
21766
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
@@ -21674,7 +21768,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
21674
21768
|
};
|
|
21675
21769
|
}
|
|
21676
21770
|
});
|
|
21677
|
-
const LewCollapse = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-
|
|
21771
|
+
const LewCollapse = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-2e866a79"]]);
|
|
21678
21772
|
const _sfc_main$a = {
|
|
21679
21773
|
props: {
|
|
21680
21774
|
name: {
|
|
@@ -21883,7 +21977,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
21883
21977
|
}
|
|
21884
21978
|
const LewCollapseTransition = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render]]);
|
|
21885
21979
|
const _hoisted_1$6 = { class: "lew-collapse-box" };
|
|
21886
|
-
const _hoisted_2$3 = { key: 0 };
|
|
21887
21980
|
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
21888
21981
|
__name: "LewCollapseItem",
|
|
21889
21982
|
props: /* @__PURE__ */ mergeModels(collapseItemProps, {
|
|
@@ -21896,34 +21989,16 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
21896
21989
|
const modelValue = useModel(__props, "modelValue");
|
|
21897
21990
|
const expandKeys = inject("expandKeys");
|
|
21898
21991
|
const setModelValue = () => {
|
|
21899
|
-
|
|
21900
|
-
modelValue.value = expandKeys.value.includes(props.collapseKey);
|
|
21901
|
-
} else {
|
|
21902
|
-
modelValue.value = props.collapseKey === expandKeys.value;
|
|
21903
|
-
}
|
|
21992
|
+
modelValue.value = isArray(expandKeys.value) ? expandKeys.value.includes(props.collapseKey) : props.collapseKey === expandKeys.value;
|
|
21904
21993
|
};
|
|
21905
|
-
watch(
|
|
21906
|
-
() => expandKeys.value,
|
|
21907
|
-
() => {
|
|
21908
|
-
setModelValue();
|
|
21909
|
-
},
|
|
21910
|
-
{
|
|
21911
|
-
deep: true
|
|
21912
|
-
}
|
|
21913
|
-
);
|
|
21994
|
+
watch(() => expandKeys.value, setModelValue, { deep: true });
|
|
21914
21995
|
setModelValue();
|
|
21915
21996
|
const change = () => {
|
|
21916
21997
|
modelValue.value = !modelValue.value;
|
|
21917
21998
|
if (isArray(expandKeys.value)) {
|
|
21918
|
-
|
|
21919
|
-
expandKeys.value = expandKeys.value.filter((item) => item !== props.collapseKey);
|
|
21920
|
-
} else {
|
|
21921
|
-
expandKeys.value.push(props.collapseKey);
|
|
21922
|
-
}
|
|
21999
|
+
expandKeys.value = modelValue.value ? [...expandKeys.value, props.collapseKey] : expandKeys.value.filter((item) => item !== props.collapseKey);
|
|
21923
22000
|
} else {
|
|
21924
|
-
|
|
21925
|
-
expandKeys.value = props.collapseKey;
|
|
21926
|
-
}
|
|
22001
|
+
expandKeys.value = modelValue.value ? props.collapseKey : null;
|
|
21927
22002
|
}
|
|
21928
22003
|
};
|
|
21929
22004
|
return (_ctx, _cache) => {
|
|
@@ -21952,7 +22027,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
21952
22027
|
type: "chevron-right"
|
|
21953
22028
|
}, null, 8, ["style"]),
|
|
21954
22029
|
createVNode(_component_lew_text_trim, {
|
|
21955
|
-
style: { width:
|
|
22030
|
+
style: { width: "calc(100% - 50px)" },
|
|
21956
22031
|
text: _ctx.title
|
|
21957
22032
|
}, null, 8, ["text"])
|
|
21958
22033
|
], 64))
|
|
@@ -21961,14 +22036,13 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
21961
22036
|
}, 8, ["class", "style"]),
|
|
21962
22037
|
createVNode(LewCollapseTransition, null, {
|
|
21963
22038
|
default: withCtx(() => [
|
|
21964
|
-
modelValue.value ? (openBlock(), createElementBlock("div",
|
|
21965
|
-
|
|
21966
|
-
|
|
21967
|
-
|
|
21968
|
-
|
|
21969
|
-
|
|
21970
|
-
|
|
21971
|
-
])) : createCommentVNode("", true)
|
|
22039
|
+
modelValue.value ? (openBlock(), createElementBlock("div", {
|
|
22040
|
+
key: 0,
|
|
22041
|
+
class: "lew-collapse-main",
|
|
22042
|
+
style: normalizeStyle({ padding: _ctx.padding })
|
|
22043
|
+
}, [
|
|
22044
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
22045
|
+
], 4)) : createCommentVNode("", true)
|
|
21972
22046
|
]),
|
|
21973
22047
|
_: 3
|
|
21974
22048
|
})
|
|
@@ -21976,7 +22050,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
21976
22050
|
};
|
|
21977
22051
|
}
|
|
21978
22052
|
});
|
|
21979
|
-
const LewCollapseItem = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-
|
|
22053
|
+
const LewCollapseItem = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-e377e3ff"]]);
|
|
21980
22054
|
const sliderProps = {};
|
|
21981
22055
|
const _hoisted_1$5 = { class: "lew-flex" };
|
|
21982
22056
|
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
@@ -25252,6 +25326,14 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
25252
25326
|
props: {
|
|
25253
25327
|
options: {
|
|
25254
25328
|
type: Object
|
|
25329
|
+
},
|
|
25330
|
+
size: {
|
|
25331
|
+
type: String,
|
|
25332
|
+
default: ""
|
|
25333
|
+
},
|
|
25334
|
+
checkUniqueFieldFn: {
|
|
25335
|
+
type: Function,
|
|
25336
|
+
default: () => true
|
|
25255
25337
|
}
|
|
25256
25338
|
},
|
|
25257
25339
|
emits: ["addSuccess", "editSuccess"],
|
|
@@ -25261,17 +25343,14 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
25261
25343
|
const form = ref({});
|
|
25262
25344
|
const editIndex = ref(-1);
|
|
25263
25345
|
const id = ref("");
|
|
25346
|
+
const props = __props;
|
|
25347
|
+
const emit = __emit;
|
|
25264
25348
|
const open = ({ row = {}, index: index2 = -1 }) => {
|
|
25265
25349
|
visible.value = true;
|
|
25266
25350
|
editIndex.value = index2;
|
|
25267
25351
|
id.value = row.id;
|
|
25268
|
-
|
|
25269
|
-
form.value = cloneDeep(row);
|
|
25270
|
-
} else {
|
|
25271
|
-
form.value = {};
|
|
25272
|
-
}
|
|
25352
|
+
form.value = cloneDeep(row);
|
|
25273
25353
|
};
|
|
25274
|
-
const emit = __emit;
|
|
25275
25354
|
const ok = () => {
|
|
25276
25355
|
formRef.value.validate().then((res) => {
|
|
25277
25356
|
if (res) {
|
|
@@ -25281,11 +25360,15 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
25281
25360
|
index: editIndex.value
|
|
25282
25361
|
});
|
|
25283
25362
|
} else {
|
|
25284
|
-
|
|
25363
|
+
const _form = formRef.value.getForm();
|
|
25364
|
+
if (!props.checkUniqueFieldFn(_form)) {
|
|
25365
|
+
return;
|
|
25366
|
+
}
|
|
25367
|
+
emit("addSuccess", { row: { ..._form, id: id.value } });
|
|
25285
25368
|
}
|
|
25286
25369
|
visible.value = false;
|
|
25287
25370
|
} else {
|
|
25288
|
-
LewMessage.
|
|
25371
|
+
LewMessage.warning("请根据提示填写表单");
|
|
25289
25372
|
}
|
|
25290
25373
|
});
|
|
25291
25374
|
};
|
|
@@ -25312,12 +25395,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
25312
25395
|
default: withCtx(() => [
|
|
25313
25396
|
createElementVNode("div", _hoisted_1$2, [
|
|
25314
25397
|
createVNode(_component_lew_form, {
|
|
25398
|
+
size: __props.size,
|
|
25315
25399
|
onMounted: formMounted,
|
|
25316
25400
|
ref_key: "formRef",
|
|
25317
25401
|
ref: formRef,
|
|
25318
25402
|
width: "350",
|
|
25319
25403
|
options: __props.options
|
|
25320
|
-
}, null, 8, ["options"])
|
|
25404
|
+
}, null, 8, ["size", "options"])
|
|
25321
25405
|
])
|
|
25322
25406
|
]),
|
|
25323
25407
|
_: 1
|
|
@@ -25325,7 +25409,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
25325
25409
|
};
|
|
25326
25410
|
}
|
|
25327
25411
|
});
|
|
25328
|
-
const FormModal = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
25412
|
+
const FormModal = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-0129ab8a"]]);
|
|
25329
25413
|
const inputTableModel = {
|
|
25330
25414
|
modelValue: {
|
|
25331
25415
|
type: Array,
|
|
@@ -25338,14 +25422,14 @@ const inputTableProps = {
|
|
|
25338
25422
|
type: Array,
|
|
25339
25423
|
default: () => [
|
|
25340
25424
|
{
|
|
25341
|
-
title: "
|
|
25342
|
-
width:
|
|
25425
|
+
title: "标签",
|
|
25426
|
+
width: 100,
|
|
25343
25427
|
field: "label",
|
|
25344
25428
|
as: "input"
|
|
25345
25429
|
},
|
|
25346
25430
|
{
|
|
25347
25431
|
title: "值",
|
|
25348
|
-
width:
|
|
25432
|
+
width: 100,
|
|
25349
25433
|
field: "value",
|
|
25350
25434
|
as: "input"
|
|
25351
25435
|
}
|
|
@@ -25397,7 +25481,7 @@ const inputTableProps = {
|
|
|
25397
25481
|
},
|
|
25398
25482
|
batchDeletable: {
|
|
25399
25483
|
type: Boolean,
|
|
25400
|
-
default:
|
|
25484
|
+
default: true,
|
|
25401
25485
|
description: "是否显示批量删除功能"
|
|
25402
25486
|
},
|
|
25403
25487
|
// 添加新行
|
|
@@ -25406,6 +25490,7 @@ const inputTableProps = {
|
|
|
25406
25490
|
default: true,
|
|
25407
25491
|
description: "是否允许添加新行"
|
|
25408
25492
|
},
|
|
25493
|
+
defaultForm: { type: Object, default: {}, description: "默认表单值" },
|
|
25409
25494
|
// 删除行
|
|
25410
25495
|
deletable: {
|
|
25411
25496
|
type: Boolean,
|
|
@@ -25425,7 +25510,7 @@ const inputTableProps = {
|
|
|
25425
25510
|
return true;
|
|
25426
25511
|
}
|
|
25427
25512
|
},
|
|
25428
|
-
// 最小行数
|
|
25513
|
+
// 最小行数
|
|
25429
25514
|
minRows: {
|
|
25430
25515
|
type: Number,
|
|
25431
25516
|
default: 0,
|
|
@@ -25440,19 +25525,24 @@ const inputTableProps = {
|
|
|
25440
25525
|
},
|
|
25441
25526
|
clearable: {
|
|
25442
25527
|
type: Boolean,
|
|
25443
|
-
default:
|
|
25528
|
+
default: true,
|
|
25444
25529
|
description: "是否显示清空按钮"
|
|
25445
25530
|
},
|
|
25446
25531
|
// 排序
|
|
25447
25532
|
sortable: {
|
|
25448
25533
|
type: Boolean,
|
|
25449
|
-
default:
|
|
25534
|
+
default: true,
|
|
25450
25535
|
description: "是否启用排序功能"
|
|
25451
25536
|
},
|
|
25452
25537
|
autoUniqueId: {
|
|
25453
25538
|
type: Boolean,
|
|
25454
25539
|
default: true,
|
|
25455
25540
|
description: "是否自动生成行数据唯一标识"
|
|
25541
|
+
},
|
|
25542
|
+
uniqueField: {
|
|
25543
|
+
type: String,
|
|
25544
|
+
default: "",
|
|
25545
|
+
description: "指定一个不可重复的字段,用于添加数据时检查重复"
|
|
25456
25546
|
}
|
|
25457
25547
|
};
|
|
25458
25548
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
@@ -25464,6 +25554,17 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
25464
25554
|
emits: ["update:modelValue"],
|
|
25465
25555
|
setup(__props) {
|
|
25466
25556
|
const modelValue = useModel(__props, "modelValue");
|
|
25557
|
+
const setUseId = () => {
|
|
25558
|
+
modelValue.value.forEach((e2) => {
|
|
25559
|
+
if (!e2.id) {
|
|
25560
|
+
e2.id = getUniqueId();
|
|
25561
|
+
}
|
|
25562
|
+
});
|
|
25563
|
+
};
|
|
25564
|
+
setUseId();
|
|
25565
|
+
watch(modelValue.value, () => {
|
|
25566
|
+
setUseId();
|
|
25567
|
+
});
|
|
25467
25568
|
const props = __props;
|
|
25468
25569
|
const inputTableColumns = computed(() => {
|
|
25469
25570
|
return [
|
|
@@ -25471,7 +25572,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
25471
25572
|
...props.deletable || props.addable ? [
|
|
25472
25573
|
{
|
|
25473
25574
|
title: "操作",
|
|
25474
|
-
width:
|
|
25575
|
+
width: 90,
|
|
25475
25576
|
field: "action",
|
|
25476
25577
|
x: "center",
|
|
25477
25578
|
fixed: "right"
|
|
@@ -25480,12 +25581,13 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
25480
25581
|
];
|
|
25481
25582
|
});
|
|
25482
25583
|
const formOptions = computed(() => {
|
|
25483
|
-
return props.columns.map((e2) => {
|
|
25484
|
-
const { as, title, field, props: props2 } = e2;
|
|
25584
|
+
return (props.columns || []).map((e2) => {
|
|
25585
|
+
const { as, title, field, props: props2, required } = e2;
|
|
25485
25586
|
return {
|
|
25486
25587
|
label: title,
|
|
25487
25588
|
field,
|
|
25488
25589
|
as: as || "input",
|
|
25590
|
+
required,
|
|
25489
25591
|
props: props2
|
|
25490
25592
|
};
|
|
25491
25593
|
});
|
|
@@ -25515,7 +25617,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
25515
25617
|
LewMessage.warning("已达到最大行数限制,无法添加");
|
|
25516
25618
|
return;
|
|
25517
25619
|
}
|
|
25518
|
-
let row =
|
|
25620
|
+
let row = cloneDeep(props.defaultForm);
|
|
25519
25621
|
if (props.autoUniqueId) {
|
|
25520
25622
|
row["id"] = getUniqueId();
|
|
25521
25623
|
}
|
|
@@ -25557,11 +25659,41 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
25557
25659
|
}
|
|
25558
25660
|
});
|
|
25559
25661
|
};
|
|
25662
|
+
const checkUniqueFieldFn = (form) => {
|
|
25663
|
+
var _a;
|
|
25664
|
+
if (!props.uniqueField) {
|
|
25665
|
+
return true;
|
|
25666
|
+
}
|
|
25667
|
+
const fieldValue = form[props.uniqueField];
|
|
25668
|
+
const vail = !modelValue.value.some((item) => item[props.uniqueField] === fieldValue);
|
|
25669
|
+
if (!vail) {
|
|
25670
|
+
const label = (_a = formOptions.value.find((e2) => e2.field === props.uniqueField)) == null ? void 0 : _a.label;
|
|
25671
|
+
LewMessage.warning(`该${label}已存在。请输入一个不重复的${label}。`);
|
|
25672
|
+
return false;
|
|
25673
|
+
}
|
|
25674
|
+
return true;
|
|
25675
|
+
};
|
|
25560
25676
|
const sortRows = () => {
|
|
25561
25677
|
LewMessage.info("该功能正在开发中,敬请期待");
|
|
25562
25678
|
};
|
|
25563
25679
|
const isMaxRowsReached = computed(() => modelValue.value.length >= props.maxRows);
|
|
25564
25680
|
const showHeaderAction = computed(() => props.batchDeletable || props.clearable || props.sortable);
|
|
25681
|
+
const getAddButtonStyle = computed(() => {
|
|
25682
|
+
const paddingMap = {
|
|
25683
|
+
small: "8px",
|
|
25684
|
+
medium: "10px",
|
|
25685
|
+
large: "12px"
|
|
25686
|
+
};
|
|
25687
|
+
const fontSizeMap = {
|
|
25688
|
+
small: 13,
|
|
25689
|
+
medium: 14,
|
|
25690
|
+
large: 16
|
|
25691
|
+
};
|
|
25692
|
+
return {
|
|
25693
|
+
padding: paddingMap[props.size],
|
|
25694
|
+
fontSize: fontSizeMap[props.size] + "px"
|
|
25695
|
+
};
|
|
25696
|
+
});
|
|
25565
25697
|
return (_ctx, _cache) => {
|
|
25566
25698
|
const _component_lew_button = resolveComponent("lew-button");
|
|
25567
25699
|
const _component_lew_flex = resolveComponent("lew-flex");
|
|
@@ -25579,6 +25711,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
25579
25711
|
}, {
|
|
25580
25712
|
default: withCtx(() => [
|
|
25581
25713
|
createVNode(_component_lew_table, {
|
|
25714
|
+
size: _ctx.size,
|
|
25582
25715
|
checkable: _ctx.batchDeletable,
|
|
25583
25716
|
"row-key": _ctx.rowKey,
|
|
25584
25717
|
multiple: "",
|
|
@@ -25598,16 +25731,16 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
25598
25731
|
_ctx.batchDeletable ? (openBlock(), createBlock(_component_lew_button, {
|
|
25599
25732
|
key: 0,
|
|
25600
25733
|
disabled: unref(selectedKeys).length === 0,
|
|
25601
|
-
size:
|
|
25734
|
+
size: _ctx.size,
|
|
25602
25735
|
type: "text",
|
|
25603
25736
|
color: "gray",
|
|
25604
25737
|
onClick: batchDelete
|
|
25605
25738
|
}, {
|
|
25606
|
-
default: withCtx(() => [
|
|
25739
|
+
default: withCtx(() => _cache[1] || (_cache[1] = [
|
|
25607
25740
|
createTextVNode("批量删除")
|
|
25608
|
-
]),
|
|
25741
|
+
])),
|
|
25609
25742
|
_: 1
|
|
25610
|
-
}, 8, ["disabled"])) : createCommentVNode("", true)
|
|
25743
|
+
}, 8, ["disabled", "size"])) : createCommentVNode("", true)
|
|
25611
25744
|
]),
|
|
25612
25745
|
_: 1
|
|
25613
25746
|
}),
|
|
@@ -25616,29 +25749,29 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
25616
25749
|
_ctx.clearable && !_ctx.minRows ? (openBlock(), createBlock(_component_lew_button, {
|
|
25617
25750
|
key: 0,
|
|
25618
25751
|
disabled: modelValue.value.length === 0,
|
|
25619
|
-
size:
|
|
25752
|
+
size: _ctx.size,
|
|
25620
25753
|
type: "text",
|
|
25621
25754
|
color: "gray",
|
|
25622
25755
|
onClick: clearAll
|
|
25623
25756
|
}, {
|
|
25624
|
-
default: withCtx(() => [
|
|
25757
|
+
default: withCtx(() => _cache[2] || (_cache[2] = [
|
|
25625
25758
|
createTextVNode("清空")
|
|
25626
|
-
]),
|
|
25759
|
+
])),
|
|
25627
25760
|
_: 1
|
|
25628
|
-
}, 8, ["disabled"])) : createCommentVNode("", true),
|
|
25761
|
+
}, 8, ["disabled", "size"])) : createCommentVNode("", true),
|
|
25629
25762
|
_ctx.sortable ? (openBlock(), createBlock(_component_lew_button, {
|
|
25630
25763
|
key: 1,
|
|
25631
25764
|
disabled: modelValue.value.length === 0,
|
|
25632
|
-
size:
|
|
25765
|
+
size: _ctx.size,
|
|
25633
25766
|
type: "text",
|
|
25634
25767
|
color: "gray",
|
|
25635
25768
|
onClick: sortRows
|
|
25636
25769
|
}, {
|
|
25637
|
-
default: withCtx(() => [
|
|
25770
|
+
default: withCtx(() => _cache[3] || (_cache[3] = [
|
|
25638
25771
|
createTextVNode("排序")
|
|
25639
|
-
]),
|
|
25772
|
+
])),
|
|
25640
25773
|
_: 1
|
|
25641
|
-
}, 8, ["disabled"])) : createCommentVNode("", true)
|
|
25774
|
+
}, 8, ["disabled", "size"])) : createCommentVNode("", true)
|
|
25642
25775
|
]),
|
|
25643
25776
|
_: 1
|
|
25644
25777
|
})
|
|
@@ -25656,31 +25789,32 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
25656
25789
|
_ctx.addable ? (openBlock(), createBlock(_component_lew_flex, {
|
|
25657
25790
|
key: 1,
|
|
25658
25791
|
onClick: add2,
|
|
25659
|
-
class: normalizeClass(["add-btn", { disabled: unref(isMaxRowsReached) }])
|
|
25792
|
+
class: normalizeClass(["add-btn", { disabled: unref(isMaxRowsReached) }]),
|
|
25793
|
+
style: normalizeStyle(unref(getAddButtonStyle))
|
|
25660
25794
|
}, {
|
|
25661
25795
|
default: withCtx(() => [
|
|
25662
25796
|
createVNode(_component_lew_icon, {
|
|
25663
25797
|
size: "16",
|
|
25664
25798
|
type: "plus"
|
|
25665
25799
|
}),
|
|
25666
|
-
createTextVNode(" 添加一条 ")
|
|
25800
|
+
_cache[4] || (_cache[4] = createTextVNode(" 添加一条 "))
|
|
25667
25801
|
]),
|
|
25668
25802
|
_: 1
|
|
25669
|
-
}, 8, ["class"])) : createCommentVNode("", true)
|
|
25803
|
+
}, 8, ["class", "style"])) : createCommentVNode("", true)
|
|
25670
25804
|
]),
|
|
25671
25805
|
_: 1
|
|
25672
25806
|
})
|
|
25673
25807
|
]),
|
|
25674
|
-
empty: withCtx(() => []),
|
|
25808
|
+
empty: withCtx(() => _cache[5] || (_cache[5] = [])),
|
|
25675
25809
|
action: withCtx(({ row, index: index2 }) => [
|
|
25676
25810
|
_ctx.addable ? withDirectives((openBlock(), createBlock(_component_lew_button, {
|
|
25677
25811
|
key: 0,
|
|
25678
25812
|
icon: "edit-3",
|
|
25679
25813
|
round: "",
|
|
25680
|
-
size:
|
|
25814
|
+
size: _ctx.size,
|
|
25681
25815
|
type: "text",
|
|
25682
25816
|
onClick: ($event) => edit({ row, index: index2 })
|
|
25683
|
-
}, null, 8, ["onClick"])), [
|
|
25817
|
+
}, null, 8, ["size", "onClick"])), [
|
|
25684
25818
|
[_directive_tooltip, {
|
|
25685
25819
|
content: "编辑数据",
|
|
25686
25820
|
trigger: "mouseenter",
|
|
@@ -25691,11 +25825,11 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
25691
25825
|
key: 1,
|
|
25692
25826
|
icon: "trash",
|
|
25693
25827
|
round: "",
|
|
25694
|
-
size:
|
|
25828
|
+
size: _ctx.size,
|
|
25695
25829
|
color: "red",
|
|
25696
25830
|
type: "text",
|
|
25697
25831
|
onClick: ($event) => del({ index: index2 })
|
|
25698
|
-
}, null, 8, ["onClick"])), [
|
|
25832
|
+
}, null, 8, ["size", "onClick"])), [
|
|
25699
25833
|
[_directive_tooltip, {
|
|
25700
25834
|
content: "删除数据",
|
|
25701
25835
|
trigger: "mouseenter",
|
|
@@ -25704,21 +25838,23 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
25704
25838
|
]) : createCommentVNode("", true)
|
|
25705
25839
|
]),
|
|
25706
25840
|
_: 1
|
|
25707
|
-
}, 8, ["checkable", "row-key", "columns", "data-source", "selectedKeys"]),
|
|
25841
|
+
}, 8, ["size", "checkable", "row-key", "columns", "data-source", "selectedKeys"]),
|
|
25708
25842
|
createVNode(FormModal, {
|
|
25709
|
-
options: unref(formOptions),
|
|
25710
25843
|
ref_key: "formModalRef",
|
|
25711
25844
|
ref: formModalRef,
|
|
25845
|
+
options: unref(formOptions),
|
|
25846
|
+
size: _ctx.size,
|
|
25847
|
+
checkUniqueFieldFn,
|
|
25712
25848
|
onAddSuccess: addSuccess,
|
|
25713
25849
|
onEditSuccess: editSuccess
|
|
25714
|
-
}, null, 8, ["options"])
|
|
25850
|
+
}, null, 8, ["options", "size"])
|
|
25715
25851
|
]),
|
|
25716
25852
|
_: 1
|
|
25717
25853
|
}, 8, ["style"]);
|
|
25718
25854
|
};
|
|
25719
25855
|
}
|
|
25720
25856
|
});
|
|
25721
|
-
const LewInputTable = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
25857
|
+
const LewInputTable = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-f8257b82"]]);
|
|
25722
25858
|
const inputTreeProps = {
|
|
25723
25859
|
type: {
|
|
25724
25860
|
type: String,
|
|
@@ -25745,15 +25881,15 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
25745
25881
|
direction: "y",
|
|
25746
25882
|
class: "lew-result"
|
|
25747
25883
|
}, {
|
|
25748
|
-
default: withCtx(() => [
|
|
25884
|
+
default: withCtx(() => _cache[0] || (_cache[0] = [
|
|
25749
25885
|
createTextVNode(" 123 ")
|
|
25750
|
-
]),
|
|
25886
|
+
])),
|
|
25751
25887
|
_: 1
|
|
25752
25888
|
});
|
|
25753
25889
|
};
|
|
25754
25890
|
}
|
|
25755
25891
|
});
|
|
25756
|
-
const LewInputTree = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
25892
|
+
const LewInputTree = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-abdd1e91"]]);
|
|
25757
25893
|
const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
25758
25894
|
__proto__: null,
|
|
25759
25895
|
LewAlert,
|
|
@@ -26045,7 +26181,7 @@ const dialogProps = {
|
|
|
26045
26181
|
default: "normal",
|
|
26046
26182
|
description: "对话框布局方式",
|
|
26047
26183
|
validator: (value) => {
|
|
26048
|
-
const validLayouts = ["normal", "
|
|
26184
|
+
const validLayouts = ["normal", "mini"];
|
|
26049
26185
|
if (!validLayouts.includes(value)) {
|
|
26050
26186
|
console.warn(
|
|
26051
26187
|
`[LewDialog] 无效的布局: ${value}。请使用 ${validLayouts.join(", ")} 中的一个。`
|
|
@@ -26095,47 +26231,36 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
26095
26231
|
const okRef1 = ref();
|
|
26096
26232
|
const okRef2 = ref();
|
|
26097
26233
|
const maskClick = () => {
|
|
26098
|
-
if (props
|
|
26234
|
+
if (props.closeOnClickOverlay) {
|
|
26099
26235
|
visible.value = false;
|
|
26100
26236
|
}
|
|
26101
26237
|
};
|
|
26102
26238
|
onMounted(() => {
|
|
26103
26239
|
visible.value = true;
|
|
26104
26240
|
nextTick(() => {
|
|
26105
|
-
okRef1.value
|
|
26106
|
-
okRef2.value
|
|
26241
|
+
if (okRef1.value) okRef1.value.focus();
|
|
26242
|
+
if (okRef2.value) okRef2.value.focus();
|
|
26107
26243
|
});
|
|
26108
26244
|
});
|
|
26109
|
-
watch(
|
|
26110
|
-
()
|
|
26111
|
-
|
|
26112
|
-
if (!newVal) {
|
|
26113
|
-
setTimeout(() => {
|
|
26114
|
-
emit("close");
|
|
26115
|
-
}, 500);
|
|
26116
|
-
}
|
|
26117
|
-
}
|
|
26118
|
-
);
|
|
26119
|
-
const ok = async () => {
|
|
26120
|
-
if (typeof props.ok === "function") {
|
|
26121
|
-
okLoading.value = true;
|
|
26122
|
-
const isOk = await props.ok();
|
|
26123
|
-
if (isOk !== false) {
|
|
26124
|
-
visible.value = false;
|
|
26125
|
-
}
|
|
26126
|
-
okLoading.value = false;
|
|
26245
|
+
watch(visible, (newVal) => {
|
|
26246
|
+
if (!newVal) {
|
|
26247
|
+
setTimeout(() => emit("close"), 500);
|
|
26127
26248
|
}
|
|
26128
|
-
};
|
|
26129
|
-
const
|
|
26130
|
-
|
|
26131
|
-
|
|
26132
|
-
|
|
26133
|
-
|
|
26249
|
+
});
|
|
26250
|
+
const handleAction = async (action) => {
|
|
26251
|
+
const actionFunction = props[action];
|
|
26252
|
+
const loadingRef = action === "ok" ? okLoading : cancelLoading;
|
|
26253
|
+
if (typeof actionFunction === "function") {
|
|
26254
|
+
loadingRef.value = true;
|
|
26255
|
+
const result = await actionFunction();
|
|
26256
|
+
if (result !== false) {
|
|
26134
26257
|
visible.value = false;
|
|
26135
26258
|
}
|
|
26136
|
-
|
|
26259
|
+
loadingRef.value = false;
|
|
26137
26260
|
}
|
|
26138
26261
|
};
|
|
26262
|
+
const ok = () => handleAction("ok");
|
|
26263
|
+
const cancel = () => handleAction("cancel");
|
|
26139
26264
|
if (props.closeByEsc) {
|
|
26140
26265
|
watch(Escape, (v2) => {
|
|
26141
26266
|
if (v2 && visible.value) {
|
|
@@ -26153,13 +26278,13 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
26153
26278
|
}, [
|
|
26154
26279
|
createVNode(Transition, { name: "lew-dialog-mask" }, {
|
|
26155
26280
|
default: withCtx(() => [
|
|
26156
|
-
|
|
26281
|
+
visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$1)) : createCommentVNode("", true)
|
|
26157
26282
|
]),
|
|
26158
26283
|
_: 1
|
|
26159
26284
|
}),
|
|
26160
26285
|
createVNode(Transition, { name: "lew-dialog" }, {
|
|
26161
26286
|
default: withCtx(() => [
|
|
26162
|
-
|
|
26287
|
+
visible.value ? (openBlock(), createElementBlock("div", {
|
|
26163
26288
|
key: 0,
|
|
26164
26289
|
class: "lew-dialog",
|
|
26165
26290
|
onClick: maskClick
|
|
@@ -26197,8 +26322,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
26197
26322
|
key: 0,
|
|
26198
26323
|
text: _ctx.cancelText,
|
|
26199
26324
|
color: "gray",
|
|
26200
|
-
type: "
|
|
26201
|
-
loading:
|
|
26325
|
+
type: "text",
|
|
26326
|
+
loading: cancelLoading.value,
|
|
26202
26327
|
onClick: withModifiers(cancel, ["stop"])
|
|
26203
26328
|
}, null, 8, ["text", "loading"])) : createCommentVNode("", true),
|
|
26204
26329
|
_ctx.okText ? (openBlock(), createBlock(unref(LewButton), {
|
|
@@ -26208,7 +26333,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
26208
26333
|
text: _ctx.okText,
|
|
26209
26334
|
type: "fill",
|
|
26210
26335
|
color: _ctx.type,
|
|
26211
|
-
loading:
|
|
26336
|
+
loading: okLoading.value,
|
|
26212
26337
|
onClick: withModifiers(ok, ["stop"])
|
|
26213
26338
|
}, null, 8, ["text", "color", "loading"])) : createCommentVNode("", true)
|
|
26214
26339
|
])
|
|
@@ -26244,7 +26369,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
26244
26369
|
size: "small",
|
|
26245
26370
|
color: "gray",
|
|
26246
26371
|
round: "",
|
|
26247
|
-
loading:
|
|
26372
|
+
loading: cancelLoading.value,
|
|
26248
26373
|
onClick: withModifiers(cancel, ["stop"])
|
|
26249
26374
|
}, null, 8, ["text", "loading"])) : createCommentVNode("", true),
|
|
26250
26375
|
_ctx.okText ? (openBlock(), createBlock(unref(LewButton), {
|
|
@@ -26256,7 +26381,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
26256
26381
|
size: "small",
|
|
26257
26382
|
round: "",
|
|
26258
26383
|
color: _ctx.type,
|
|
26259
|
-
loading:
|
|
26384
|
+
loading: okLoading.value,
|
|
26260
26385
|
onClick: withModifiers(ok, ["stop"])
|
|
26261
26386
|
}, null, 8, ["text", "color", "loading"])) : createCommentVNode("", true)
|
|
26262
26387
|
]),
|
|
@@ -26275,20 +26400,22 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
26275
26400
|
};
|
|
26276
26401
|
}
|
|
26277
26402
|
});
|
|
26278
|
-
const _LewDialog = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
26403
|
+
const _LewDialog = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-b0619764"]]);
|
|
26279
26404
|
const { x, y } = useMouse();
|
|
26280
26405
|
const createDialog = (type) => (options) => dialog(type, options);
|
|
26281
|
-
const
|
|
26282
|
-
|
|
26283
|
-
|
|
26284
|
-
|
|
26285
|
-
|
|
26406
|
+
const dialogTypes = {
|
|
26407
|
+
warning: createDialog("warning"),
|
|
26408
|
+
error: createDialog("error"),
|
|
26409
|
+
info: createDialog("info"),
|
|
26410
|
+
normal: createDialog("normal"),
|
|
26411
|
+
success: createDialog("success")
|
|
26412
|
+
};
|
|
26286
26413
|
const dialog = (type, options) => {
|
|
26287
26414
|
const {
|
|
26288
26415
|
title,
|
|
26289
26416
|
content,
|
|
26290
|
-
ok,
|
|
26291
|
-
cancel,
|
|
26417
|
+
ok = () => true,
|
|
26418
|
+
cancel = () => true,
|
|
26292
26419
|
okText,
|
|
26293
26420
|
cancelText,
|
|
26294
26421
|
layout,
|
|
@@ -26310,12 +26437,12 @@ const dialog = (type, options) => {
|
|
|
26310
26437
|
okText,
|
|
26311
26438
|
cancelText,
|
|
26312
26439
|
transformOrigin,
|
|
26313
|
-
ok
|
|
26440
|
+
ok,
|
|
26314
26441
|
onClose: () => {
|
|
26315
26442
|
app.unmount();
|
|
26316
26443
|
div2.remove();
|
|
26317
26444
|
},
|
|
26318
|
-
cancel
|
|
26445
|
+
cancel
|
|
26319
26446
|
},
|
|
26320
26447
|
{
|
|
26321
26448
|
title: () => title,
|
|
@@ -26328,17 +26455,13 @@ const dialog = (type, options) => {
|
|
|
26328
26455
|
};
|
|
26329
26456
|
const LewDialog$1 = {
|
|
26330
26457
|
name: "LewDialog",
|
|
26331
|
-
|
|
26332
|
-
info: info$1,
|
|
26333
|
-
normal: normal$1,
|
|
26334
|
-
success: success$1,
|
|
26335
|
-
error: error$1
|
|
26458
|
+
...dialogTypes
|
|
26336
26459
|
};
|
|
26337
26460
|
const LewTooltip = {
|
|
26338
26461
|
install(app) {
|
|
26339
26462
|
app.directive("tooltip", {
|
|
26340
26463
|
mounted(el, binding) {
|
|
26341
|
-
var
|
|
26464
|
+
var _a;
|
|
26342
26465
|
const { trigger, content, placement, allowHTML, delay } = binding.value;
|
|
26343
26466
|
let _trigger = trigger;
|
|
26344
26467
|
if (trigger === "hover") {
|
|
@@ -26362,7 +26485,7 @@ const LewTooltip = {
|
|
|
26362
26485
|
delay: trigger === "mouseenter" ? delay || [80, 80] : void 0
|
|
26363
26486
|
});
|
|
26364
26487
|
el.instance.popper.children[0].setAttribute("data-lew", "tooltip");
|
|
26365
|
-
if (!((
|
|
26488
|
+
if (!((_a = binding == null ? void 0 : binding.value) == null ? void 0 : _a.content)) {
|
|
26366
26489
|
el.instance.disable();
|
|
26367
26490
|
}
|
|
26368
26491
|
},
|
|
@@ -26502,7 +26625,10 @@ const add = (type, title, content, delay) => {
|
|
|
26502
26625
|
newMessage.addEventListener("mouseleave", startTimer);
|
|
26503
26626
|
setTimeout(() => {
|
|
26504
26627
|
lock = false;
|
|
26505
|
-
newMessage.setAttribute(
|
|
26628
|
+
newMessage.setAttribute(
|
|
26629
|
+
"class",
|
|
26630
|
+
`lew-notification lew-notification-${type} lew-notification-show`
|
|
26631
|
+
);
|
|
26506
26632
|
delay > 0 && startTimer();
|
|
26507
26633
|
}, 10);
|
|
26508
26634
|
};
|
|
@@ -26571,6 +26697,15 @@ const initLewContextMenu = () => {
|
|
|
26571
26697
|
};
|
|
26572
26698
|
window.LewContextMenu.instance.popper.children[0].setAttribute("data-lew", "popover");
|
|
26573
26699
|
};
|
|
26700
|
+
const findContextMenuId = (el) => {
|
|
26701
|
+
try {
|
|
26702
|
+
const id = el.getAttribute("lew-context-menu-id");
|
|
26703
|
+
if (id) return id;
|
|
26704
|
+
return el.parentNode ? findContextMenuId(el.parentNode) : "";
|
|
26705
|
+
} catch {
|
|
26706
|
+
return "";
|
|
26707
|
+
}
|
|
26708
|
+
};
|
|
26574
26709
|
const LewVContextMenu = {
|
|
26575
26710
|
install(app) {
|
|
26576
26711
|
app.directive("context-menu", {
|
|
@@ -26579,17 +26714,17 @@ const LewVContextMenu = {
|
|
|
26579
26714
|
initLewContextMenu();
|
|
26580
26715
|
}
|
|
26581
26716
|
if (!el.id) {
|
|
26582
|
-
const
|
|
26583
|
-
el.setAttribute("lew-context-menu-id",
|
|
26717
|
+
const id = getUniqueId();
|
|
26718
|
+
el.setAttribute("lew-context-menu-id", id);
|
|
26584
26719
|
const { options } = binding.value;
|
|
26585
|
-
window.LewContextMenu.menu[
|
|
26720
|
+
window.LewContextMenu.menu[id] = options || [];
|
|
26586
26721
|
}
|
|
26587
26722
|
if (!window.LewContextMenu.contextMenu) {
|
|
26588
26723
|
window.LewContextMenu.contextMenu = (e2) => {
|
|
26589
|
-
const
|
|
26590
|
-
if (!
|
|
26724
|
+
const id = findContextMenuId(e2.target);
|
|
26725
|
+
if (!id) return;
|
|
26591
26726
|
e2.preventDefault();
|
|
26592
|
-
const options = window.LewContextMenu.menu[
|
|
26727
|
+
const options = window.LewContextMenu.menu[id];
|
|
26593
26728
|
const { instance } = window.LewContextMenu;
|
|
26594
26729
|
instance.hide();
|
|
26595
26730
|
const menuDom = document.createElement("div");
|
|
@@ -26606,7 +26741,7 @@ const LewVContextMenu = {
|
|
|
26606
26741
|
if (isFunction(selectHandler)) {
|
|
26607
26742
|
selectHandler(item);
|
|
26608
26743
|
}
|
|
26609
|
-
if ((item.children || []).length
|
|
26744
|
+
if (!(item.children || []).length) {
|
|
26610
26745
|
instance.hide();
|
|
26611
26746
|
}
|
|
26612
26747
|
}
|
|
@@ -26632,10 +26767,10 @@ const LewVContextMenu = {
|
|
|
26632
26767
|
}
|
|
26633
26768
|
},
|
|
26634
26769
|
updated(el, binding) {
|
|
26635
|
-
const
|
|
26636
|
-
if (
|
|
26770
|
+
const id = findContextMenuId(el);
|
|
26771
|
+
if (id) {
|
|
26637
26772
|
const { options } = binding.value;
|
|
26638
|
-
window.LewContextMenu.menu[
|
|
26773
|
+
window.LewContextMenu.menu[id] = options || [];
|
|
26639
26774
|
} else {
|
|
26640
26775
|
console.error("发生未知错误!找不到 lew-context-menu-id。");
|
|
26641
26776
|
}
|
|
@@ -26643,24 +26778,10 @@ const LewVContextMenu = {
|
|
|
26643
26778
|
});
|
|
26644
26779
|
}
|
|
26645
26780
|
};
|
|
26646
|
-
const findContextMenuId = (el) => {
|
|
26647
|
-
try {
|
|
26648
|
-
const _id = el.getAttribute("lew-context-menu-id");
|
|
26649
|
-
if (_id) {
|
|
26650
|
-
return _id;
|
|
26651
|
-
}
|
|
26652
|
-
if (el.parentNode) {
|
|
26653
|
-
return findContextMenuId(el.parentNode);
|
|
26654
|
-
}
|
|
26655
|
-
return "";
|
|
26656
|
-
} catch {
|
|
26657
|
-
return "";
|
|
26658
|
-
}
|
|
26659
|
-
};
|
|
26660
26781
|
const contextMenuProps = {
|
|
26661
26782
|
options: {
|
|
26662
26783
|
type: Array,
|
|
26663
|
-
default: [],
|
|
26784
|
+
default: () => [],
|
|
26664
26785
|
description: "右键菜单配置"
|
|
26665
26786
|
}
|
|
26666
26787
|
};
|
|
@@ -26778,7 +26899,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
26778
26899
|
};
|
|
26779
26900
|
}
|
|
26780
26901
|
});
|
|
26781
|
-
const LewContextMenu = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
26902
|
+
const LewContextMenu = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b96e2412"]]);
|
|
26782
26903
|
const directives = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
26783
26904
|
__proto__: null,
|
|
26784
26905
|
LewBacktop: index$1,
|
|
@@ -26793,19 +26914,19 @@ const directives = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
26793
26914
|
dialogProps,
|
|
26794
26915
|
initLewContextMenu
|
|
26795
26916
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
26796
|
-
const install =
|
|
26797
|
-
const
|
|
26917
|
+
const install = (Vue) => {
|
|
26918
|
+
const componentList = Object.keys(components).map(
|
|
26798
26919
|
(key) => components[key]
|
|
26799
26920
|
);
|
|
26800
|
-
const
|
|
26921
|
+
const directiveList = Object.keys(directives).map(
|
|
26801
26922
|
(key) => directives[key]
|
|
26802
26923
|
);
|
|
26803
|
-
|
|
26924
|
+
componentList.forEach((component) => {
|
|
26804
26925
|
if (Object.prototype.hasOwnProperty.call(component, "name") || Object.prototype.hasOwnProperty.call(component, "__name")) {
|
|
26805
26926
|
Vue.component(`${component.name || component.__name}`, component);
|
|
26806
26927
|
}
|
|
26807
26928
|
});
|
|
26808
|
-
|
|
26929
|
+
directiveList.forEach((directive) => {
|
|
26809
26930
|
if (Object.prototype.hasOwnProperty.call(directive, "install")) {
|
|
26810
26931
|
Vue.use(directive);
|
|
26811
26932
|
} else if (Object.prototype.hasOwnProperty.call(directive, "name")) {
|