zartui 3.1.8 → 3.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -25
- package/es/action-sheet/index.css +1 -1
- package/es/action-sheet/index.d.ts +1 -0
- package/es/action-sheet/types.d.ts +14 -0
- package/es/action-sheet/types.mjs +0 -0
- package/es/avatar/index.css +1 -1
- package/es/avatar/index.d.ts +1 -1
- package/es/avatar/types.d.ts +10 -0
- package/es/badge/index.css +1 -1
- package/es/badge/index.d.ts +1 -0
- package/es/badge/types.d.ts +15 -0
- package/es/badge/types.mjs +0 -0
- package/es/button/index.css +1 -1
- package/es/button/index.d.ts +1 -1
- package/es/button/types.d.ts +35 -0
- package/es/calendar/CalendarDay.mjs +8 -1
- package/es/calendar/CalendarHeader.mjs +2 -2
- package/es/calendar/index.css +1 -1
- package/es/calendar/index.d.ts +1 -1
- package/es/calendar/types.d.ts +25 -0
- package/es/cascader/index.css +1 -1
- package/es/cascader/index.d.ts +1 -1
- package/es/cascader/types.d.ts +21 -0
- package/es/cell/index.css +1 -1
- package/es/cell/index.d.ts +1 -1
- package/es/cell/types.d.ts +24 -0
- package/es/cell-group/index.css +1 -1
- package/es/checkbox/Checker.mjs +6 -0
- package/es/checkbox/index.css +1 -1
- package/es/checkbox/index.d.ts +1 -1
- package/es/checkbox/types.d.ts +19 -0
- package/es/checkbox-group/index.css +1 -1
- package/es/collapse-item/index.css +1 -1
- package/es/collapse-item/index.d.ts +1 -1
- package/es/collapse-item/types.d.ts +8 -0
- package/es/config-provider/index.d.ts +2 -1
- package/es/config-provider/types.d.ts +138 -0
- package/es/config-provider/types.mjs +0 -0
- package/es/date-time-picker/DateTimePicker.d.ts +2 -2
- package/es/date-time-picker/DateTimePickerWrapper.d.ts +2 -2
- package/es/date-time-picker/index.css +1 -1
- package/es/date-time-picker/index.d.ts +2 -2
- package/es/date-time-picker/utils.d.ts +1 -1
- package/es/dialog/Dialog.d.ts +1 -1
- package/es/dialog/index.css +1 -1
- package/es/dialog/index.d.ts +2 -2
- package/es/dialog/types.d.ts +18 -0
- package/es/divider/index.css +1 -1
- package/es/divider/index.d.ts +1 -0
- package/es/divider/types.d.ts +8 -0
- package/es/divider/types.mjs +0 -0
- package/es/dropdown-item/DropdownItem.mjs +1 -0
- package/es/dropdown-item/index.css +1 -1
- package/es/dropdown-item/index.d.ts +1 -1
- package/es/dropdown-item/types.d.ts +3 -0
- package/es/dropdown-menu/index.css +1 -1
- package/es/dropdown-menu/index.d.ts +1 -1
- package/es/dropdown-menu/types.d.ts +12 -0
- package/es/empty/Empty.mjs +5 -3
- package/es/empty/Images.d.ts +20 -9
- package/es/empty/Images.mjs +755 -563
- package/es/empty/index.css +1 -1
- package/es/empty/index.d.ts +1 -0
- package/es/empty/types.d.ts +8 -0
- package/es/empty/types.mjs +0 -0
- package/es/field/Field.mjs +2 -0
- package/es/field/index.css +1 -1
- package/es/field/index.d.ts +1 -1
- package/es/field/types.d.ts +22 -0
- package/es/grid-item/index.css +1 -1
- package/es/grid-item/index.d.ts +1 -0
- package/es/grid-item/types.d.ts +7 -0
- package/es/grid-item/types.mjs +0 -0
- package/es/hierarchy-select/Breadcrumb.mjs +1 -1
- package/es/hierarchy-select/HierarchySelect.d.ts +29 -1
- package/es/hierarchy-select/HierarchySelect.mjs +140 -26
- package/es/hierarchy-select/index.css +1 -1
- package/es/hierarchy-select/index.d.ts +21 -2
- package/es/hierarchy-select/svg/SubIcon.d.ts +2 -1
- package/es/hierarchy-select/svg/SubIcon.mjs +10 -29
- package/es/hierarchy-select/types.d.ts +21 -0
- package/es/image/index.css +1 -1
- package/es/image/index.d.ts +1 -0
- package/es/image/types.d.ts +5 -0
- package/es/image/types.mjs +0 -0
- package/es/image-preview/ImagePreview.d.ts +1 -1
- package/es/image-preview/index.css +1 -1
- package/es/image-preview/index.d.ts +2 -2
- package/es/image-preview/types.d.ts +10 -0
- package/es/index-anchor/index.css +1 -1
- package/es/index-anchor/types.d.ts +1 -3
- package/es/index-bar/IndexBar.d.ts +42 -1
- package/es/index-bar/IndexBar.mjs +189 -52
- package/es/index-bar/index.css +1 -1
- package/es/index-bar/index.d.ts +30 -1
- package/es/index-bar/types.d.ts +4 -3
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/lazyload/vue-lazyload/index.d.ts +55 -55
- package/es/list/index.css +1 -1
- package/es/list/index.d.ts +1 -1
- package/es/list/types.d.ts +5 -0
- package/es/loading/index.css +1 -1
- package/es/loading/index.d.ts +1 -0
- package/es/loading/types.d.ts +6 -0
- package/es/loading/types.mjs +0 -0
- package/es/media-picker/index.css +1 -1
- package/es/media-picker/index.d.ts +1 -1
- package/es/media-picker/type.d.ts +12 -0
- package/es/media-player/index.css +1 -1
- package/es/multiple-picker/MultiplePicker.d.ts +3 -3
- package/es/multiple-picker/index.css +1 -1
- package/es/multiple-picker/index.d.ts +4 -3
- package/es/multiple-picker/types.d.ts +17 -0
- package/es/nav-bar/index.css +1 -1
- package/es/nav-bar/index.d.ts +1 -0
- package/es/nav-bar/types.d.ts +16 -0
- package/es/nav-bar/types.mjs +0 -0
- package/es/notice-bar/index.css +1 -1
- package/es/notice-bar/index.d.ts +1 -1
- package/es/notice-bar/types.d.ts +10 -0
- package/es/notify/index.css +1 -1
- package/es/notify/index.d.ts +1 -1
- package/es/notify/types.d.ts +8 -0
- package/es/number-keyboard/NumberKeyboard.mjs +5 -20
- package/es/number-keyboard/index.css +1 -1
- package/es/number-keyboard/index.d.ts +1 -0
- package/es/number-keyboard/style/index.mjs +0 -1
- package/es/number-keyboard/types.d.ts +14 -0
- package/es/number-keyboard/types.mjs +0 -0
- package/es/overlay/index.d.ts +1 -0
- package/es/overlay/types.d.ts +4 -0
- package/es/overlay/types.mjs +0 -0
- package/es/password-input/index.css +1 -1
- package/es/password-input/index.d.ts +1 -0
- package/es/password-input/types.d.ts +15 -0
- package/es/password-input/types.mjs +0 -0
- package/es/picker/Picker.d.ts +6 -6
- package/es/picker/index.css +1 -1
- package/es/picker/index.d.ts +7 -7
- package/es/picker/types.d.ts +17 -0
- package/es/popover/Popover.mjs +1 -1
- package/es/popover/index.css +1 -1
- package/es/popover/index.d.ts +1 -1
- package/es/popover/types.d.ts +12 -0
- package/es/popup/index.css +1 -1
- package/es/popup/index.d.ts +1 -1
- package/es/popup/types.d.ts +8 -0
- package/es/pull-refresh/index.css +1 -1
- package/es/pull-refresh/index.d.ts +1 -0
- package/es/pull-refresh/types.d.ts +6 -0
- package/es/pull-refresh/types.mjs +0 -0
- package/es/radio/index.css +1 -1
- package/es/radio/index.d.ts +1 -0
- package/es/radio/types.d.ts +18 -0
- package/es/radio/types.mjs +0 -0
- package/es/radio-group/index.css +1 -1
- package/es/radio-picker/RadioPicker.d.ts +3 -3
- package/es/radio-picker/index.css +1 -1
- package/es/radio-picker/index.d.ts +4 -4
- package/es/radio-picker/types.d.ts +24 -0
- package/es/rate/index.css +1 -1
- package/es/rate/index.d.ts +1 -0
- package/es/rate/types.d.ts +6 -0
- package/es/rate/types.mjs +0 -0
- package/es/search/index.css +1 -1
- package/es/search/index.d.ts +1 -1
- package/es/search/types.d.ts +12 -0
- package/es/signature/index.css +1 -1
- package/es/signature/index.d.ts +1 -1
- package/es/signature/types.d.ts +9 -0
- package/es/skeleton/index.d.ts +1 -0
- package/es/skeleton/types.d.ts +9 -0
- package/es/skeleton/types.mjs +0 -0
- package/es/step/Step.mjs +2 -2
- package/es/step/index.css +1 -1
- package/es/step/index.d.ts +1 -0
- package/es/step/types.d.ts +6 -0
- package/es/step/types.mjs +0 -0
- package/es/stepper/index.css +1 -1
- package/es/stepper/index.d.ts +1 -0
- package/es/stepper/types.d.ts +17 -0
- package/es/stepper/types.mjs +0 -0
- package/es/steps/index.css +1 -1
- package/es/steps/index.d.ts +1 -0
- package/es/steps/types.d.ts +5 -0
- package/es/steps/types.mjs +0 -0
- package/es/sticky/index.d.ts +1 -0
- package/es/sticky/types.d.ts +3 -0
- package/es/sticky/types.mjs +0 -0
- package/es/style/base.css +1 -1
- package/es/style/css-variables.css +1 -1
- package/es/swipe/index.css +1 -1
- package/es/swipe/index.d.ts +1 -1
- package/es/swipe/types.d.ts +10 -0
- package/es/switch/index.css +1 -1
- package/es/switch/index.d.ts +1 -0
- package/es/switch/types.d.ts +18 -0
- package/es/switch/types.mjs +0 -0
- package/es/tabbar/index.d.ts +1 -0
- package/es/tabbar/types.d.ts +5 -0
- package/es/tabbar/types.mjs +0 -0
- package/es/tabbar-item/index.css +1 -1
- package/es/tabbar-item/index.d.ts +1 -0
- package/es/tabbar-item/types.d.ts +14 -0
- package/es/tabbar-item/types.mjs +0 -0
- package/es/table/index.css +1 -1
- package/es/table/index.d.ts +1 -0
- package/es/table/types.d.ts +10 -0
- package/es/tabs/index.css +1 -1
- package/es/tabs/index.d.ts +1 -1
- package/es/tabs/types.d.ts +17 -0
- package/es/tag/Tag.mjs +5 -4
- package/es/tag/index.css +1 -1
- package/es/tag/index.d.ts +1 -0
- package/es/tag/types.d.ts +17 -0
- package/es/tag/types.mjs +0 -0
- package/es/text-ellipsis/index.css +1 -1
- package/es/text-ellipsis/types.d.ts +1 -0
- package/es/time-picker/TimePicker.d.ts +2 -2
- package/es/time-picker/index.css +1 -1
- package/es/time-picker/index.d.ts +3 -2
- package/es/time-picker/types.d.ts +23 -0
- package/es/time-picker/types.mjs +0 -0
- package/es/timeline/index.css +1 -1
- package/es/timeline/index.d.ts +1 -0
- package/es/timeline/types.d.ts +9 -0
- package/es/timeline/types.mjs +0 -0
- package/es/toast/index.css +1 -1
- package/es/toast/index.d.ts +1 -1
- package/es/toast/types.d.ts +15 -0
- package/es/uploader/index.css +1 -1
- package/es/uploader/index.d.ts +1 -1
- package/es/uploader/types.d.ts +21 -0
- package/es/vue-sfc-shim.d.ts +6 -6
- package/es/vue-tsx-shim.d.ts +23 -23
- package/lib/action-sheet/index.css +1 -1
- package/lib/action-sheet/index.d.ts +1 -0
- package/lib/action-sheet/types.d.ts +14 -0
- package/lib/action-sheet/types.js +15 -0
- package/lib/avatar/index.css +1 -1
- package/lib/avatar/index.d.ts +1 -1
- package/lib/avatar/types.d.ts +10 -0
- package/lib/badge/index.css +1 -1
- package/lib/badge/index.d.ts +1 -0
- package/lib/badge/types.d.ts +15 -0
- package/lib/badge/types.js +15 -0
- package/lib/button/index.css +1 -1
- package/lib/button/index.d.ts +1 -1
- package/lib/button/types.d.ts +35 -0
- package/lib/calendar/CalendarDay.js +8 -1
- package/lib/calendar/CalendarHeader.js +2 -2
- package/lib/calendar/index.css +1 -1
- package/lib/calendar/index.d.ts +1 -1
- package/lib/calendar/types.d.ts +25 -0
- package/lib/cascader/index.css +1 -1
- package/lib/cascader/index.d.ts +1 -1
- package/lib/cascader/types.d.ts +21 -0
- package/lib/cell/index.css +1 -1
- package/lib/cell/index.d.ts +1 -1
- package/lib/cell/types.d.ts +24 -0
- package/lib/cell-group/index.css +1 -1
- package/lib/checkbox/Checker.js +6 -0
- package/lib/checkbox/index.css +1 -1
- package/lib/checkbox/index.d.ts +1 -1
- package/lib/checkbox/types.d.ts +19 -0
- package/lib/checkbox-group/index.css +1 -1
- package/lib/collapse-item/index.css +1 -1
- package/lib/collapse-item/index.d.ts +1 -1
- package/lib/collapse-item/types.d.ts +8 -0
- package/lib/config-provider/index.d.ts +2 -1
- package/lib/config-provider/types.d.ts +138 -0
- package/lib/config-provider/types.js +15 -0
- package/lib/date-time-picker/DateTimePicker.d.ts +2 -2
- package/lib/date-time-picker/DateTimePickerWrapper.d.ts +2 -2
- package/lib/date-time-picker/index.css +1 -1
- package/lib/date-time-picker/index.d.ts +2 -2
- package/lib/date-time-picker/utils.d.ts +1 -1
- package/lib/dialog/Dialog.d.ts +1 -1
- package/lib/dialog/index.css +1 -1
- package/lib/dialog/index.d.ts +2 -2
- package/lib/dialog/types.d.ts +18 -0
- package/lib/divider/index.css +1 -1
- package/lib/divider/index.d.ts +1 -0
- package/lib/divider/types.d.ts +8 -0
- package/lib/divider/types.js +15 -0
- package/lib/dropdown-item/DropdownItem.js +1 -0
- package/lib/dropdown-item/index.css +1 -1
- package/lib/dropdown-item/index.d.ts +1 -1
- package/lib/dropdown-item/types.d.ts +3 -0
- package/lib/dropdown-menu/index.css +1 -1
- package/lib/dropdown-menu/index.d.ts +1 -1
- package/lib/dropdown-menu/types.d.ts +12 -0
- package/lib/empty/Empty.js +4 -2
- package/lib/empty/Images.d.ts +20 -9
- package/lib/empty/Images.js +755 -563
- package/lib/empty/index.css +1 -1
- package/lib/empty/index.d.ts +1 -0
- package/lib/empty/types.d.ts +8 -0
- package/lib/empty/types.js +15 -0
- package/lib/field/Field.js +2 -0
- package/lib/field/index.css +1 -1
- package/lib/field/index.d.ts +1 -1
- package/lib/field/types.d.ts +22 -0
- package/lib/grid-item/index.css +1 -1
- package/lib/grid-item/index.d.ts +1 -0
- package/lib/grid-item/types.d.ts +7 -0
- package/lib/grid-item/types.js +15 -0
- package/lib/hierarchy-select/Breadcrumb.js +1 -1
- package/lib/hierarchy-select/HierarchySelect.d.ts +29 -1
- package/lib/hierarchy-select/HierarchySelect.js +138 -24
- package/lib/hierarchy-select/index.css +1 -1
- package/lib/hierarchy-select/index.d.ts +21 -2
- package/lib/hierarchy-select/svg/SubIcon.d.ts +2 -1
- package/lib/hierarchy-select/svg/SubIcon.js +9 -28
- package/lib/hierarchy-select/types.d.ts +21 -0
- package/lib/image/index.css +1 -1
- package/lib/image/index.d.ts +1 -0
- package/lib/image/types.d.ts +5 -0
- package/lib/image/types.js +15 -0
- package/lib/image-preview/ImagePreview.d.ts +1 -1
- package/lib/image-preview/index.css +1 -1
- package/lib/image-preview/index.d.ts +2 -2
- package/lib/image-preview/types.d.ts +10 -0
- package/lib/index-anchor/index.css +1 -1
- package/lib/index-anchor/types.d.ts +1 -3
- package/lib/index-bar/IndexBar.d.ts +42 -1
- package/lib/index-bar/IndexBar.js +188 -51
- package/lib/index-bar/index.css +1 -1
- package/lib/index-bar/index.d.ts +30 -1
- package/lib/index-bar/types.d.ts +4 -3
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/lazyload/vue-lazyload/index.d.ts +55 -55
- package/lib/list/index.css +1 -1
- package/lib/list/index.d.ts +1 -1
- package/lib/list/types.d.ts +5 -0
- package/lib/loading/index.css +1 -1
- package/lib/loading/index.d.ts +1 -0
- package/lib/loading/types.d.ts +6 -0
- package/lib/loading/types.js +15 -0
- package/lib/media-picker/index.css +1 -1
- package/lib/media-picker/index.d.ts +1 -1
- package/lib/media-picker/type.d.ts +12 -0
- package/lib/media-player/index.css +1 -1
- package/lib/multiple-picker/MultiplePicker.d.ts +3 -3
- package/lib/multiple-picker/index.css +1 -1
- package/lib/multiple-picker/index.d.ts +4 -3
- package/lib/multiple-picker/types.d.ts +17 -0
- package/lib/nav-bar/index.css +1 -1
- package/lib/nav-bar/index.d.ts +1 -0
- package/lib/nav-bar/types.d.ts +16 -0
- package/lib/nav-bar/types.js +15 -0
- package/lib/notice-bar/index.css +1 -1
- package/lib/notice-bar/index.d.ts +1 -1
- package/lib/notice-bar/types.d.ts +10 -0
- package/lib/notify/index.css +1 -1
- package/lib/notify/index.d.ts +1 -1
- package/lib/notify/types.d.ts +8 -0
- package/lib/number-keyboard/NumberKeyboard.js +4 -19
- package/lib/number-keyboard/index.css +1 -1
- package/lib/number-keyboard/index.d.ts +1 -0
- package/lib/number-keyboard/style/index.js +0 -1
- package/lib/number-keyboard/types.d.ts +14 -0
- package/lib/number-keyboard/types.js +15 -0
- package/lib/overlay/index.d.ts +1 -0
- package/lib/overlay/types.d.ts +4 -0
- package/lib/overlay/types.js +15 -0
- package/lib/password-input/index.css +1 -1
- package/lib/password-input/index.d.ts +1 -0
- package/lib/password-input/types.d.ts +15 -0
- package/lib/password-input/types.js +15 -0
- package/lib/picker/Picker.d.ts +6 -6
- package/lib/picker/index.css +1 -1
- package/lib/picker/index.d.ts +7 -7
- package/lib/picker/types.d.ts +17 -0
- package/lib/popover/Popover.js +1 -1
- package/lib/popover/index.css +1 -1
- package/lib/popover/index.d.ts +1 -1
- package/lib/popover/types.d.ts +12 -0
- package/lib/popup/index.css +1 -1
- package/lib/popup/index.d.ts +1 -1
- package/lib/popup/types.d.ts +8 -0
- package/lib/pull-refresh/index.css +1 -1
- package/lib/pull-refresh/index.d.ts +1 -0
- package/lib/pull-refresh/types.d.ts +6 -0
- package/lib/pull-refresh/types.js +15 -0
- package/lib/radio/index.css +1 -1
- package/lib/radio/index.d.ts +1 -0
- package/lib/radio/types.d.ts +18 -0
- package/lib/radio/types.js +15 -0
- package/lib/radio-group/index.css +1 -1
- package/lib/radio-picker/RadioPicker.d.ts +3 -3
- package/lib/radio-picker/index.css +1 -1
- package/lib/radio-picker/index.d.ts +4 -4
- package/lib/radio-picker/types.d.ts +24 -0
- package/lib/rate/index.css +1 -1
- package/lib/rate/index.d.ts +1 -0
- package/lib/rate/types.d.ts +6 -0
- package/lib/rate/types.js +15 -0
- package/lib/search/index.css +1 -1
- package/lib/search/index.d.ts +1 -1
- package/lib/search/types.d.ts +12 -0
- package/lib/signature/index.css +1 -1
- package/lib/signature/index.d.ts +1 -1
- package/lib/signature/types.d.ts +9 -0
- package/lib/skeleton/index.d.ts +1 -0
- package/lib/skeleton/types.d.ts +9 -0
- package/lib/skeleton/types.js +15 -0
- package/lib/step/Step.js +2 -2
- package/lib/step/index.css +1 -1
- package/lib/step/index.d.ts +1 -0
- package/lib/step/types.d.ts +6 -0
- package/lib/step/types.js +15 -0
- package/lib/stepper/index.css +1 -1
- package/lib/stepper/index.d.ts +1 -0
- package/lib/stepper/types.d.ts +17 -0
- package/lib/stepper/types.js +15 -0
- package/lib/steps/index.css +1 -1
- package/lib/steps/index.d.ts +1 -0
- package/lib/steps/types.d.ts +5 -0
- package/lib/steps/types.js +15 -0
- package/lib/sticky/index.d.ts +1 -0
- package/lib/sticky/types.d.ts +3 -0
- package/lib/sticky/types.js +15 -0
- package/lib/style/base.css +1 -1
- package/lib/style/css-variables.css +1 -1
- package/lib/swipe/index.css +1 -1
- package/lib/swipe/index.d.ts +1 -1
- package/lib/swipe/types.d.ts +10 -0
- package/lib/switch/index.css +1 -1
- package/lib/switch/index.d.ts +1 -0
- package/lib/switch/types.d.ts +18 -0
- package/lib/switch/types.js +15 -0
- package/lib/tabbar/index.d.ts +1 -0
- package/lib/tabbar/types.d.ts +5 -0
- package/lib/tabbar/types.js +15 -0
- package/lib/tabbar-item/index.css +1 -1
- package/lib/tabbar-item/index.d.ts +1 -0
- package/lib/tabbar-item/types.d.ts +14 -0
- package/lib/tabbar-item/types.js +15 -0
- package/lib/table/index.css +1 -1
- package/lib/table/index.d.ts +1 -0
- package/lib/table/types.d.ts +10 -0
- package/lib/tabs/index.css +1 -1
- package/lib/tabs/index.d.ts +1 -1
- package/lib/tabs/types.d.ts +17 -0
- package/lib/tag/Tag.js +5 -4
- package/lib/tag/index.css +1 -1
- package/lib/tag/index.d.ts +1 -0
- package/lib/tag/types.d.ts +17 -0
- package/lib/tag/types.js +15 -0
- package/lib/text-ellipsis/index.css +1 -1
- package/lib/text-ellipsis/types.d.ts +1 -0
- package/lib/time-picker/TimePicker.d.ts +2 -2
- package/lib/time-picker/index.css +1 -1
- package/lib/time-picker/index.d.ts +3 -2
- package/lib/time-picker/types.d.ts +23 -0
- package/lib/time-picker/types.js +15 -0
- package/lib/timeline/index.css +1 -1
- package/lib/timeline/index.d.ts +1 -0
- package/lib/timeline/types.d.ts +9 -0
- package/lib/timeline/types.js +15 -0
- package/lib/toast/index.css +1 -1
- package/lib/toast/index.d.ts +1 -1
- package/lib/toast/types.d.ts +15 -0
- package/lib/uploader/index.css +1 -1
- package/lib/uploader/index.d.ts +1 -1
- package/lib/uploader/types.d.ts +21 -0
- package/lib/vue-sfc-shim.d.ts +6 -6
- package/lib/vue-tsx-shim.d.ts +23 -23
- package/lib/web-types.json +1 -1
- package/lib/zartui.cjs.js +1148 -726
- package/lib/zartui.es.js +1148 -726
- package/lib/zartui.js +1152 -730
- package/lib/zartui.min.js +1 -1
- package/package.json +2 -2
package/es/empty/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-empty-image-width:
|
|
1
|
+
:root{--zt-empty-image-width: 160px;--zt-empty-image-height: 160px;--zt-empty-image-background-color: var(--zt-primary-color-a1);--zt-empty-description-padding: 16px 64px 32px;--zt-empty-description-color: var(--zt-gray-a6);--zt-empty-bottom-margin-top: 32px}.zt-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box}.zt-empty__image{width:var(--zt-empty-image-width);height:var(--zt-empty-image-height);color:var(--zt-empty-image-background-color)}.zt-empty__image img{width:100%;height:100%}.zt-empty__description{text-align:center;padding:var(--zt-empty-description-padding);color:var(--zt-empty-description-color);font-size:var(--zt-font-size-md);line-height:var(--zt-line-height-md)}.zt-empty__bottom{margin-top:var(--zt-empty-bottom-margin-top);width:100%}.zt-empty__svg-defs-stop-color-gradient{stop-color:var(--zt-primary-color-light)}.zt-empty__svg-defs-stop-color{stop-color:var(--zt-primary-color)}.zt-empty__svg-defs-path-fill{fill:var(--zt-primary-color-light)}.zt-theme-dark{--zt-empty-image-background-color: var(--zt-gray-a1)}
|
package/es/empty/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export declare const Empty: import("../utils").WithInstall<import("vue").DefineC
|
|
|
17
17
|
}, {}>>;
|
|
18
18
|
export default Empty;
|
|
19
19
|
export type { EmptyProps } from './Empty';
|
|
20
|
+
export type { EmptyThemeVars } from './types';
|
|
20
21
|
declare module 'vue' {
|
|
21
22
|
interface GlobalComponents {
|
|
22
23
|
ZtEmpty: typeof Empty;
|
|
File without changes
|
package/es/field/Field.mjs
CHANGED
|
@@ -468,6 +468,7 @@ var stdin_default = defineComponent({
|
|
|
468
468
|
});
|
|
469
469
|
return () => {
|
|
470
470
|
const disabled = getProp("disabled");
|
|
471
|
+
const readonly = getProp("readonly");
|
|
471
472
|
const labelAlign = getProp("labelAlign");
|
|
472
473
|
const Label = renderLabel();
|
|
473
474
|
const TitleIcon = renderTitleIcon();
|
|
@@ -479,6 +480,7 @@ var stdin_default = defineComponent({
|
|
|
479
480
|
"class": bem({
|
|
480
481
|
error: showError.value,
|
|
481
482
|
disabled,
|
|
483
|
+
readonly,
|
|
482
484
|
[`label-${labelAlign}`]: labelAlign,
|
|
483
485
|
"error-message": props.errorMessage !== "" && typeof props.errorMessage !== "undefined",
|
|
484
486
|
description: props.description !== "" && typeof props.description !== "undefined",
|
package/es/field/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-field-
|
|
1
|
+
:root{--zt-field-value-border-radius: var(--zt-radius-md);--zt-field-input-text-color: var(--zt-text-color);--zt-field-input-disabled-text-color: var(--zt-gray-a4);--zt-field-placeholder-text-color: var(--zt-placeholder-color);--zt-field-clear-icon-color: var(--zt-gray-a6);--zt-field-left-icon-color: var(--zt-gray-a4);--zt-field-right-icon-color: var(--zt-gray-a4);--zt-field-password-icon-color: var(--zt-gray-a6);--zt-field-error-message-background-color: rgb(var(--zt-red-r), var(--zt-red-g), var(--zt-red-b), .1);--zt-field-error-message-color: var(--zt-red);--zt-field-description-background-color: var(--zt-gray-a04);--zt-field-description-color: var(--zt-gray-a6);--zt-field-description-border-color: var(--zt-gray-a2);--zt-field-text-area-min-height: 60px;--zt-field-word-limit-color: var(--zt-gray-a4);--zt-field-disabled-text-color: var(--zt-gray-a6);--zt-field-required-mark-color: var(--zt-red);--zt-field-required-mark-margin: 0 0 0 4px;--zt-field-caret-color: var(--zt-primary-color)}.zt-field__label{flex:none;box-sizing:border-box;word-wrap:break-word;overflow:hidden}.zt-field__label--center{text-align:center}.zt-field__label--right{text-align:right}.zt-field__label--required:after{margin:var(--zt-field-required-mark-margin);color:var(--zt-field-required-mark-color);content:"*";font-weight:var(--zt-font-bold);line-height:var(--zt-line-height-md)}.zt-field--disabled .zt-field__label{color:var(--zt-field-disabled-text-color)}.zt-field--disabled .zt-cell__value--vertical,.zt-field--readonly .zt-cell__value--vertical{background:var(--zt-gray-a04)}.zt-field__value{display:block;overflow:visible;border-radius:var(--zt-field-value-border-radius)}.zt-field__body{width:100%;display:flex;align-items:center}.zt-field__body input,.zt-field__body textarea{caret-color:var(--zt-field-caret-color)}.zt-field__control{display:block;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:0;color:var(--zt-field-input-text-color);line-height:inherit;text-align:left;background-color:transparent;border:0;resize:none;-webkit-user-select:auto;user-select:auto}.zt-field__control::-webkit-input-placeholder{color:var(--zt-field-placeholder-text-color)}.zt-field__control::placeholder{color:var(--zt-field-placeholder-text-color)}.zt-field__control:disabled{color:var(--zt-field-input-disabled-text-color);cursor:not-allowed;opacity:1;-webkit-text-fill-color:var(--zt-field-input-disabled-text-color)}.zt-field__control:read-only{cursor:default}.zt-field__control--center{justify-content:center;text-align:center}.zt-field__control--right{justify-content:flex-end;text-align:right}.zt-field__control--custom{display:flex;align-items:center;min-height:var(--zt-line-height-md)}.zt-field__control--min-height{min-height:var(--zt-field-text-area-min-height)}.zt-field__control[type=date],.zt-field__control[type=time],.zt-field__control[type=datetime-local]{min-height:var(--zt-line-height-md)}.zt-field__control[type=search]{-webkit-appearance:none}.zt-field__clear,.zt-field__icon,.zt-field__button,.zt-field__right-icon{flex-shrink:0}.zt-field__clear,.zt-field__right-icon{margin-right:calc(var(--zt-padding-xs) * -1);padding:0 var(--zt-padding-xs);line-height:inherit}.zt-field__clear{color:var(--zt-field-clear-icon-color);font-size:var(--zt-font-size-xxl);cursor:pointer}.zt-field__left-icon .zt-icon,.zt-field__right-icon .zt-icon{display:block;font-size:var(--zt-font-size-xxl)}.zt-field__left-icon{color:var(--zt-field-left-icon-color);margin-right:var(--zt-padding-base);display:flex;align-items:center}.zt-field__right-icon{color:var(--zt-field-right-icon-color)}.zt-field__button{padding-left:var(--zt-padding-xs)}.zt-field__error-message{color:var(--zt-field-error-message-color);font-size:var(--zt-font-size-sm);text-align:left}.zt-field__error-message--center{text-align:center}.zt-field__error-message--right{text-align:right}.zt-field__word-limit{margin-top:var(--zt-padding-md);color:var(--zt-field-word-limit-color);font-size:var(--zt-font-size-md);line-height:var(--zt-line-height-md)}.zt-field__word-num--exceed{color:var(--zt-field-error-message-color)}.zt-field--error-message .zt-cell__value,.zt-field--error .zt-cell__value,.zt-field--description .zt-cell__value{border-bottom-left-radius:0;border-bottom-right-radius:0}.zt-field__bottom{border-radius:0 0 var(--zt-radius-md) var(--zt-radius-md)}.zt-field--error-message .zt-field__label,.zt-field--error .zt-field__label{color:var(--zt-field-error-message-color)}.zt-field--error-message .zt-field__error-message,.zt-field--error .zt-field__error-message{background:var(--zt-field-error-message-background-color);border-radius:0 0 var(--zt-radius-md) var(--zt-radius-md);padding:var(--zt-padding-xs);font-size:var(--zt-font-size-sm);color:var(--zt-field-error-message-color);letter-spacing:0;line-height:var(--zt-line-height-xs);position:relative}.zt-field--error-message .zt-field__error-message:before,.zt-field--error .zt-field__error-message:before{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:0;right:0;left:0;border-top:1px solid var(--zt-field-error-message-color);transform:scaleY(.5)}.zt-field--error-message.zt-field--description .zt-field__error-message,.zt-field--error.zt-field--description .zt-field__error-message{border-radius:0}.zt-field__description{background:var(--zt-field-description-background-color);border-radius:0 0 var(--zt-radius-md) var(--zt-radius-md);padding:var(--zt-padding-xs);font-size:var(--zt-font-size-sm);color:var(--zt-field-description-color);letter-spacing:0;line-height:var(--zt-line-height-xs);position:relative}.zt-field__description:before{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:0;right:0;left:0;border-top:1px solid var(--zt-field-description-border-color);transform:scaleY(.5)}.zt-field__password{width:100%;display:flex;justify-content:space-between;align-items:center}.zt-field__password .zt-icon{color:var(--zt-field-password-icon-color);font-size:var(--zt-font-size-xxl)}.zt-field--is-link .zt-field__value{display:flex}.zt-theme-dark{--zt-field-left-icon-color: var(--zt-gray)}
|
package/es/field/index.d.ts
CHANGED
|
@@ -224,7 +224,7 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
|
|
|
224
224
|
}, {}>>;
|
|
225
225
|
export default Field;
|
|
226
226
|
export type { FieldProps };
|
|
227
|
-
export type { FieldType, FieldRule, FieldInstance, FieldTextAlign, FieldRuleMessage, FieldClearTrigger, FieldFormatTrigger, FieldRuleValidator, FiledRuleFormatter, FieldValidateError, FieldAutosizeConfig, FieldValidateTrigger, FieldValidationStatus, } from './types';
|
|
227
|
+
export type { FieldType, FieldRule, FieldInstance, FieldTextAlign, FieldRuleMessage, FieldClearTrigger, FieldFormatTrigger, FieldRuleValidator, FiledRuleFormatter, FieldValidateError, FieldAutosizeConfig, FieldValidateTrigger, FieldValidationStatus, FieldThemeVars, } from './types';
|
|
228
228
|
declare module 'vue' {
|
|
229
229
|
interface GlobalComponents {
|
|
230
230
|
ZtField: typeof Field;
|
package/es/field/types.d.ts
CHANGED
|
@@ -42,3 +42,25 @@ declare global {
|
|
|
42
42
|
composing?: boolean;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
+
export type FieldThemeVars = {
|
|
46
|
+
fieldValueBorderRadius?: string;
|
|
47
|
+
fieldInputTextColor?: string;
|
|
48
|
+
fieldInputPlaceholderColor?: string;
|
|
49
|
+
fieldInputDisabledTextColor?: string;
|
|
50
|
+
fieldPlaceholderTextColor?: string;
|
|
51
|
+
fieldClearIconColor?: string;
|
|
52
|
+
fieldLeftIconColor?: string;
|
|
53
|
+
fieldRightIconColor?: string;
|
|
54
|
+
fieldPasswordIconColor?: string;
|
|
55
|
+
fieldErrorMessageBackgroundColor?: string;
|
|
56
|
+
fieldErrorMessageColor?: string;
|
|
57
|
+
fieldDescriptionBackgroundColor?: string;
|
|
58
|
+
fieldDescriptionColor?: string;
|
|
59
|
+
fieldDescriptionBorderColor?: string;
|
|
60
|
+
fieldTextAreaMinHeight?: string;
|
|
61
|
+
fieldWordLimitColor?: string;
|
|
62
|
+
fieldDisabledTextColor?: string;
|
|
63
|
+
fieldRequiredMarkColor?: string;
|
|
64
|
+
fieldRequiredMarkMargin?: string;
|
|
65
|
+
fieldCaretColor?: string;
|
|
66
|
+
};
|
package/es/grid-item/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-grid-item-content-padding: var(--zt-padding-md) var(--zt-padding-xs);--zt-grid-item-content-background: var(--zt-background-card);--zt-grid-item-content-active-color: var(--zt-active-color);--zt-grid-item-
|
|
1
|
+
:root{--zt-grid-item-content-padding: var(--zt-padding-md) var(--zt-padding-xs);--zt-grid-item-content-background: var(--zt-background-card);--zt-grid-item-content-active-color: var(--zt-active-color);--zt-grid-item-text-color: var(--zt-text-color);--zt-grid-item-icon-font-size: 28px}:root[zt-theme-size=large]{--zt-grid-item-icon-font-size: 34px}.zt-grid-item{position:relative;box-sizing:border-box}.zt-grid-item--square{height:0}.zt-grid-item__icon{font-size:var(--zt-grid-item-icon-font-size)}.zt-grid-item__text{color:var(--zt-grid-item-text-color);font-size:var(--zt-font-size-sm);line-height:1.5;word-break:break-all}.zt-grid-item__icon+.zt-grid-item__text{margin-top:var(--zt-padding-xs)}.zt-grid-item__content{display:flex;flex-direction:column;box-sizing:border-box;height:100%;padding:var(--zt-grid-item-content-padding);background:var(--zt-grid-item-content-background)}.zt-grid-item__content:after{z-index:1;border-width:0 var(--zt-border-width) var(--zt-border-width) 0}.zt-grid-item__content--square{position:absolute;top:0;right:0;left:0}.zt-grid-item__content--center{align-items:center;justify-content:center}.zt-grid-item__content--horizontal{flex-direction:row}.zt-grid-item__content--horizontal .zt-grid-item__text{margin:0 0 0 var(--zt-padding-xs)}.zt-grid-item__content--reverse{flex-direction:column-reverse}.zt-grid-item__content--reverse .zt-grid-item__text{margin:0 0 var(--zt-padding-xs)}.zt-grid-item__content--horizontal.zt-grid-item__content--reverse{flex-direction:row-reverse}.zt-grid-item__content--horizontal.zt-grid-item__content--reverse .zt-grid-item__text{margin:0 var(--zt-padding-xs) 0 0}.zt-grid-item__content--surround:after{border-width:var(--zt-border-width)}.zt-grid-item__content--clickable{cursor:pointer}.zt-grid-item__content--clickable:active{background-color:var(--zt-grid-item-content-active-color)}
|
package/es/grid-item/index.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export declare const GridItem: import("../utils").WithInstall<import("vue").Defi
|
|
|
29
29
|
export default GridItem;
|
|
30
30
|
export { gridItemProps } from './GridItem';
|
|
31
31
|
export type { GridItemProps } from './GridItem';
|
|
32
|
+
export type { GridItemThemeVars } from './types';
|
|
32
33
|
declare module 'vue' {
|
|
33
34
|
interface GlobalComponents {
|
|
34
35
|
ZtGridItem: typeof GridItem;
|
|
File without changes
|
|
@@ -43,7 +43,7 @@ var stdin_default = defineComponent({
|
|
|
43
43
|
}, null), _createVNode("span", {
|
|
44
44
|
"class": bem("name"),
|
|
45
45
|
"style": {
|
|
46
|
-
color: index === props.data.length - 1 ? "" : "
|
|
46
|
+
color: index === props.data.length - 1 ? "" : "var(--zt-primary-color)"
|
|
47
47
|
},
|
|
48
48
|
"onClick": () => {
|
|
49
49
|
chooseSenior(index);
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { ExtractPropTypes } from 'vue';
|
|
2
|
+
import { HierarchyData } from './types';
|
|
2
3
|
declare const hierarchySelectProps: {
|
|
3
4
|
treeData: {
|
|
4
5
|
type: ArrayConstructor;
|
|
5
6
|
default: () => never[];
|
|
6
7
|
};
|
|
8
|
+
checkedList: {
|
|
9
|
+
type: import("vue").PropType<HierarchyData[]>;
|
|
10
|
+
default: () => HierarchyData[];
|
|
11
|
+
};
|
|
7
12
|
disableParent: {
|
|
8
13
|
type: BooleanConstructor;
|
|
9
14
|
default: boolean;
|
|
@@ -15,6 +20,10 @@ declare const hierarchySelectProps: {
|
|
|
15
20
|
asyncGetter: {
|
|
16
21
|
type: FunctionConstructor;
|
|
17
22
|
};
|
|
23
|
+
unanimous: {
|
|
24
|
+
type: BooleanConstructor;
|
|
25
|
+
default: boolean;
|
|
26
|
+
};
|
|
18
27
|
valueKey: {
|
|
19
28
|
type: import("vue").PropType<string>;
|
|
20
29
|
default: string;
|
|
@@ -35,6 +44,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
35
44
|
type: ArrayConstructor;
|
|
36
45
|
default: () => never[];
|
|
37
46
|
};
|
|
47
|
+
checkedList: {
|
|
48
|
+
type: import("vue").PropType<HierarchyData[]>;
|
|
49
|
+
default: () => HierarchyData[];
|
|
50
|
+
};
|
|
38
51
|
disableParent: {
|
|
39
52
|
type: BooleanConstructor;
|
|
40
53
|
default: boolean;
|
|
@@ -46,6 +59,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
46
59
|
asyncGetter: {
|
|
47
60
|
type: FunctionConstructor;
|
|
48
61
|
};
|
|
62
|
+
unanimous: {
|
|
63
|
+
type: BooleanConstructor;
|
|
64
|
+
default: boolean;
|
|
65
|
+
};
|
|
49
66
|
valueKey: {
|
|
50
67
|
type: import("vue").PropType<string>;
|
|
51
68
|
default: string;
|
|
@@ -59,11 +76,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
59
76
|
default: string;
|
|
60
77
|
};
|
|
61
78
|
autoChangeToChildren: BooleanConstructor;
|
|
62
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("selected" | "change" | "asyncGetter")[], "selected" | "change" | "asyncGetter", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
79
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("selected" | "change" | "asyncGetter" | "update:checkedList")[], "selected" | "change" | "asyncGetter" | "update:checkedList", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
63
80
|
treeData: {
|
|
64
81
|
type: ArrayConstructor;
|
|
65
82
|
default: () => never[];
|
|
66
83
|
};
|
|
84
|
+
checkedList: {
|
|
85
|
+
type: import("vue").PropType<HierarchyData[]>;
|
|
86
|
+
default: () => HierarchyData[];
|
|
87
|
+
};
|
|
67
88
|
disableParent: {
|
|
68
89
|
type: BooleanConstructor;
|
|
69
90
|
default: boolean;
|
|
@@ -75,6 +96,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
75
96
|
asyncGetter: {
|
|
76
97
|
type: FunctionConstructor;
|
|
77
98
|
};
|
|
99
|
+
unanimous: {
|
|
100
|
+
type: BooleanConstructor;
|
|
101
|
+
default: boolean;
|
|
102
|
+
};
|
|
78
103
|
valueKey: {
|
|
79
104
|
type: import("vue").PropType<string>;
|
|
80
105
|
default: string;
|
|
@@ -92,13 +117,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
92
117
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
93
118
|
onSelected?: ((...args: any[]) => any) | undefined;
|
|
94
119
|
onAsyncGetter?: ((...args: any[]) => any) | undefined;
|
|
120
|
+
"onUpdate:checkedList"?: ((...args: any[]) => any) | undefined;
|
|
95
121
|
}, {
|
|
96
122
|
multiple: boolean;
|
|
97
123
|
valueKey: string;
|
|
98
124
|
textKey: string;
|
|
99
125
|
breadcrumbTitle: string;
|
|
100
126
|
treeData: unknown[];
|
|
127
|
+
checkedList: HierarchyData[];
|
|
101
128
|
disableParent: boolean;
|
|
129
|
+
unanimous: boolean;
|
|
102
130
|
autoChangeToChildren: boolean;
|
|
103
131
|
}, {}>;
|
|
104
132
|
export default _default;
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { createTextVNode as _createTextVNode, createVNode as _createVNode } from "vue";
|
|
2
|
-
import { defineComponent, nextTick, ref } from "vue";
|
|
3
|
-
import { createNamespace, makeStringProp } from "../utils/index.mjs";
|
|
2
|
+
import { computed, defineComponent, nextTick, ref } from "vue";
|
|
3
|
+
import { createNamespace, makeArrayProp, makeStringProp } from "../utils/index.mjs";
|
|
4
4
|
import { deepClone } from "../utils/deep-clone.mjs";
|
|
5
5
|
import { SubIcon } from "./svg/SubIcon.mjs";
|
|
6
6
|
import Icon from "../icon/index.mjs";
|
|
7
7
|
import { showToast } from "../toast/index.mjs";
|
|
8
8
|
import Breadcrumb from "./Breadcrumb.mjs";
|
|
9
|
+
import { useSyncPropRef } from "../composables/use-sync-prop-ref.mjs";
|
|
10
|
+
import { useExpose } from "../composables/use-expose.mjs";
|
|
9
11
|
const [name, bem] = createNamespace("hierarchy-select");
|
|
10
12
|
const hierarchySelectProps = {
|
|
11
13
|
treeData: {
|
|
12
14
|
type: Array,
|
|
13
15
|
default: () => []
|
|
14
16
|
},
|
|
17
|
+
checkedList: makeArrayProp([]),
|
|
15
18
|
disableParent: {
|
|
16
19
|
type: Boolean,
|
|
17
20
|
default: false
|
|
@@ -23,6 +26,10 @@ const hierarchySelectProps = {
|
|
|
23
26
|
asyncGetter: {
|
|
24
27
|
type: Function
|
|
25
28
|
},
|
|
29
|
+
unanimous: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: true
|
|
32
|
+
},
|
|
26
33
|
valueKey: makeStringProp("id"),
|
|
27
34
|
textKey: makeStringProp("name"),
|
|
28
35
|
breadcrumbTitle: makeStringProp("\u5168\u90E8"),
|
|
@@ -31,12 +38,21 @@ const hierarchySelectProps = {
|
|
|
31
38
|
var stdin_default = defineComponent({
|
|
32
39
|
name,
|
|
33
40
|
props: hierarchySelectProps,
|
|
34
|
-
emits: ["asyncGetter", "selected", "change"],
|
|
41
|
+
emits: ["asyncGetter", "selected", "change", "update:checkedList"],
|
|
35
42
|
setup(props, {
|
|
36
|
-
emit
|
|
43
|
+
emit,
|
|
44
|
+
slots
|
|
37
45
|
}) {
|
|
38
|
-
const checkedList =
|
|
39
|
-
const
|
|
46
|
+
const checkedList = useSyncPropRef(() => props.checkedList, (value) => emit("update:checkedList", value));
|
|
47
|
+
const SINGLE_LIMIT = 1;
|
|
48
|
+
const choosedValue = computed(() => {
|
|
49
|
+
var _a;
|
|
50
|
+
if (!props.multiple && checkedList.value.length > SINGLE_LIMIT) {
|
|
51
|
+
console.warn("\u975Emutiple\u6A21\u5F0F\uFF0C\u8BF7\u6CE8\u610FcheckedList\u6570\u7EC4\u957F\u5EA6\u4E0D\u8981\u5927\u4E8E" + SINGLE_LIMIT);
|
|
52
|
+
}
|
|
53
|
+
const choosedId = ((_a = checkedList.value) == null ? void 0 : _a.length) && !props.multiple ? checkedList.value[0].id : null;
|
|
54
|
+
return choosedId;
|
|
55
|
+
});
|
|
40
56
|
const dataList = ref(deepClone(props.treeData));
|
|
41
57
|
const breadcrumbData = ref([]);
|
|
42
58
|
const historyLayers = ref([]);
|
|
@@ -51,16 +67,33 @@ var stdin_default = defineComponent({
|
|
|
51
67
|
return true;
|
|
52
68
|
}
|
|
53
69
|
};
|
|
70
|
+
const flatHierarchy = (data, flatArray = []) => {
|
|
71
|
+
data.forEach((item) => {
|
|
72
|
+
var _a;
|
|
73
|
+
flatArray.push(item);
|
|
74
|
+
if ((_a = item.children) == null ? void 0 : _a.length) {
|
|
75
|
+
flatHierarchy(item.children, flatArray);
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
return flatArray;
|
|
79
|
+
};
|
|
80
|
+
const isIndeterminate = (item) => {
|
|
81
|
+
var _a;
|
|
82
|
+
let indeterminate = false;
|
|
83
|
+
if ((_a = item.children) == null ? void 0 : _a.length) {
|
|
84
|
+
const flatArray = flatHierarchy(item.children);
|
|
85
|
+
const checkedIds = checkedList.value.map((item2) => item2.id);
|
|
86
|
+
indeterminate = flatArray.some((item2) => checkedIds.includes(item2.id));
|
|
87
|
+
}
|
|
88
|
+
return indeterminate;
|
|
89
|
+
};
|
|
54
90
|
const uncheckedChildren = (array) => {
|
|
55
91
|
const unchecked = (list) => {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
if (checkedList.value[index][props.valueKey] === v[props.valueKey]) {
|
|
60
|
-
checkedList.value.splice(index, 1);
|
|
61
|
-
}
|
|
92
|
+
checkedList.value = checkedList.value.filter((item) => {
|
|
93
|
+
return !list.find((v) => {
|
|
94
|
+
return item[props.valueKey] === v[props.valueKey];
|
|
62
95
|
});
|
|
63
|
-
}
|
|
96
|
+
});
|
|
64
97
|
list.forEach((v) => {
|
|
65
98
|
if (v && v.children && v.children.length) {
|
|
66
99
|
unchecked(v.children);
|
|
@@ -69,8 +102,8 @@ var stdin_default = defineComponent({
|
|
|
69
102
|
};
|
|
70
103
|
unchecked(array);
|
|
71
104
|
};
|
|
72
|
-
const multipleClicked = (item) => {
|
|
73
|
-
if (isDisabled(item)) {
|
|
105
|
+
const multipleClicked = (item, emitChange = true) => {
|
|
106
|
+
if (isDisabled(item) || item.disabled) {
|
|
74
107
|
return;
|
|
75
108
|
}
|
|
76
109
|
item = deepClone(item);
|
|
@@ -94,7 +127,7 @@ var stdin_default = defineComponent({
|
|
|
94
127
|
delete item.children;
|
|
95
128
|
checkedList.value.push(item);
|
|
96
129
|
}
|
|
97
|
-
emit("change", checkedList.value);
|
|
130
|
+
emitChange && emit("change", checkedList.value);
|
|
98
131
|
};
|
|
99
132
|
const selected = (item) => {
|
|
100
133
|
if (isDisabled(item) || item.disabled) {
|
|
@@ -104,7 +137,7 @@ var stdin_default = defineComponent({
|
|
|
104
137
|
multipleClicked(item);
|
|
105
138
|
return;
|
|
106
139
|
}
|
|
107
|
-
|
|
140
|
+
checkedList.value = [item];
|
|
108
141
|
emit("selected", item);
|
|
109
142
|
};
|
|
110
143
|
const getChecked = (item) => {
|
|
@@ -113,6 +146,12 @@ var stdin_default = defineComponent({
|
|
|
113
146
|
}
|
|
114
147
|
return false;
|
|
115
148
|
};
|
|
149
|
+
const scrollBreadcrumbToLast = () => {
|
|
150
|
+
nextTick(() => {
|
|
151
|
+
var _a;
|
|
152
|
+
(_a = document.querySelector(".zt-breadcrumb__item:last-child")) == null ? void 0 : _a.scrollIntoViewIfNeeded();
|
|
153
|
+
});
|
|
154
|
+
};
|
|
116
155
|
const toNextLevel = (item, index) => {
|
|
117
156
|
if (item.disabled) {
|
|
118
157
|
return;
|
|
@@ -131,6 +170,9 @@ var stdin_default = defineComponent({
|
|
|
131
170
|
dataList.value[index].children = props.autoChangeToChildren ? void 0 : [];
|
|
132
171
|
return;
|
|
133
172
|
}
|
|
173
|
+
if (props.unanimous) {
|
|
174
|
+
item.children = list;
|
|
175
|
+
}
|
|
134
176
|
historyLayers.value.push(dataList.value);
|
|
135
177
|
breadcrumbData.value.push(item);
|
|
136
178
|
dataList.value = list;
|
|
@@ -138,22 +180,66 @@ var stdin_default = defineComponent({
|
|
|
138
180
|
} else {
|
|
139
181
|
showToast("\u65E0\u4E0B\u7EA7\u6570\u636E");
|
|
140
182
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
183
|
+
scrollBreadcrumbToLast();
|
|
184
|
+
};
|
|
185
|
+
const findNodeLayers = (root, id, path = [], result = []) => {
|
|
186
|
+
var _a;
|
|
187
|
+
for (let index = 0; index < root.length; index++) {
|
|
188
|
+
const item = root[index];
|
|
189
|
+
path.push(item);
|
|
190
|
+
if (item.id === id) {
|
|
191
|
+
result.push(...path);
|
|
192
|
+
path.pop();
|
|
193
|
+
return true;
|
|
194
|
+
}
|
|
195
|
+
if ((_a = item.children) == null ? void 0 : _a.length) {
|
|
196
|
+
if (findNodeLayers(item.children, id, path, result)) {
|
|
197
|
+
return true;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
path.pop();
|
|
201
|
+
}
|
|
202
|
+
return false;
|
|
203
|
+
};
|
|
204
|
+
const toNodeLevel = (id, force = false) => {
|
|
205
|
+
let rootLevelData = dataList.value;
|
|
206
|
+
if (historyLayers.value.length) {
|
|
207
|
+
rootLevelData = historyLayers.value[0];
|
|
208
|
+
}
|
|
209
|
+
const nodeLayers = [];
|
|
210
|
+
findNodeLayers(rootLevelData, id, [], nodeLayers);
|
|
211
|
+
if (nodeLayers.length) {
|
|
212
|
+
if (!force && nodeLayers.slice(0, nodeLayers.length - 1).some((item) => getChecked(item))) {
|
|
213
|
+
console.warn("\u5F53\u524D\u6307\u5B9A\u8282\u70B9\u5B58\u5728\u4E0A\u7EA7\u8282\u70B9\u88AB\u9009\u4E2D\uFF0C\u65E0\u6CD5\u5C55\u5F00\u5230\u6B64\u5C42\u7EA7");
|
|
214
|
+
return false;
|
|
215
|
+
}
|
|
216
|
+
breadcrumbData.value.splice(0);
|
|
217
|
+
historyLayers.value.splice(0, 1, rootLevelData);
|
|
218
|
+
nodeLayers.slice(0, nodeLayers.length - 1).forEach((item) => {
|
|
219
|
+
breadcrumbData.value.push(item);
|
|
220
|
+
historyLayers.value.push(item.children);
|
|
221
|
+
});
|
|
222
|
+
dataList.value = historyLayers.value.splice(historyLayers.value.length - 1)[0];
|
|
223
|
+
scrollBreadcrumbToLast();
|
|
224
|
+
return true;
|
|
225
|
+
} else {
|
|
226
|
+
console.warn("\u672A\u627E\u5230\u5F53\u524Did\u6307\u5B9A\u7684\u8282\u70B9");
|
|
227
|
+
return false;
|
|
228
|
+
}
|
|
145
229
|
};
|
|
146
230
|
const getMultipleDom = (item) => {
|
|
147
231
|
if (item.disabled || isDisabled(item)) {
|
|
148
232
|
return _createVNode("span", {
|
|
149
233
|
"class": bem("icon", {
|
|
150
234
|
disabled: true,
|
|
151
|
-
round: true
|
|
235
|
+
round: true,
|
|
236
|
+
checked: getChecked(item)
|
|
152
237
|
})
|
|
153
238
|
}, [_createVNode(Icon, {
|
|
154
239
|
"name": "checkbox-select"
|
|
155
240
|
}, null)]);
|
|
156
241
|
}
|
|
242
|
+
const indeterminate = props.unanimous && isIndeterminate(item);
|
|
157
243
|
return getChecked(item) ? _createVNode("span", {
|
|
158
244
|
"class": bem("icon", {
|
|
159
245
|
checked: true,
|
|
@@ -163,10 +249,11 @@ var stdin_default = defineComponent({
|
|
|
163
249
|
"name": "checkbox-select"
|
|
164
250
|
}, null)]) : _createVNode("span", {
|
|
165
251
|
"class": bem("icon", {
|
|
166
|
-
round: true
|
|
252
|
+
round: true,
|
|
253
|
+
indeterminate
|
|
167
254
|
})
|
|
168
255
|
}, [_createVNode(Icon, {
|
|
169
|
-
"name": "check-blank-r",
|
|
256
|
+
"name": indeterminate ? "minus" : "check-blank-r",
|
|
170
257
|
"class": bem("uncheck-icon")
|
|
171
258
|
}, null)]);
|
|
172
259
|
};
|
|
@@ -177,11 +264,38 @@ var stdin_default = defineComponent({
|
|
|
177
264
|
}
|
|
178
265
|
return props.asyncGetter && (item == null ? void 0 : item.children) || !props.asyncGetter && ((_a = item == null ? void 0 : item.children) == null ? void 0 : _a.length);
|
|
179
266
|
};
|
|
267
|
+
function adapterHierarchTree(root, emitChange = true) {
|
|
268
|
+
if (!props.unanimous)
|
|
269
|
+
return;
|
|
270
|
+
root.forEach((item) => {
|
|
271
|
+
var _a;
|
|
272
|
+
if ((_a = item.children) == null ? void 0 : _a.length) {
|
|
273
|
+
adapterHierarchTree(item.children, emitChange);
|
|
274
|
+
const checkedAll = item.children.every((item2) => getChecked(item2));
|
|
275
|
+
if (checkedAll) {
|
|
276
|
+
multipleClicked(item, emitChange);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
const updateSelectParent = (index) => {
|
|
282
|
+
const checkedAllDataList = dataList.value.every((item) => getChecked(item));
|
|
283
|
+
if (checkedAllDataList && props.multiple) {
|
|
284
|
+
const nextLayer = index + 1;
|
|
285
|
+
const nextDataList = historyLayers.value[nextLayer];
|
|
286
|
+
adapterHierarchTree(nextDataList);
|
|
287
|
+
}
|
|
288
|
+
};
|
|
180
289
|
const chooseSenior = (index) => {
|
|
290
|
+
updateSelectParent(index);
|
|
181
291
|
breadcrumbData.value.splice(index + 1);
|
|
182
292
|
dataList.value = historyLayers.value[index + 1];
|
|
183
293
|
historyLayers.value.splice(index + 1);
|
|
184
294
|
};
|
|
295
|
+
adapterHierarchTree(props.treeData, false);
|
|
296
|
+
useExpose({
|
|
297
|
+
toNodeLevel
|
|
298
|
+
});
|
|
185
299
|
return () => _createVNode("div", {
|
|
186
300
|
"class": bem()
|
|
187
301
|
}, [_createVNode(Breadcrumb, {
|
|
@@ -204,7 +318,7 @@ var stdin_default = defineComponent({
|
|
|
204
318
|
"onClick": () => {
|
|
205
319
|
selected(item);
|
|
206
320
|
}
|
|
207
|
-
}, [item[props.textKey]]), _createVNode("div", {
|
|
321
|
+
}, [slots.content ? slots.content(item) : item[props.textKey]]), _createVNode("div", {
|
|
208
322
|
"class": bem("item-nav"),
|
|
209
323
|
"onClick": () => {
|
|
210
324
|
toNextLevel(item, index);
|
|
@@ -213,7 +327,7 @@ var stdin_default = defineComponent({
|
|
|
213
327
|
"class": bem("sub-level", getChecked(item) ? "disable" : "")
|
|
214
328
|
}, [_createVNode("span", {
|
|
215
329
|
"class": bem("sub-icon")
|
|
216
|
-
}, [SubIcon()]), _createVNode("span", null, [_createTextVNode("\u4E0B\u7EA7")])])])]))]);
|
|
330
|
+
}, [SubIcon(bem)]), _createVNode("span", null, [_createTextVNode("\u4E0B\u7EA7")])])])]))]);
|
|
217
331
|
}
|
|
218
332
|
});
|
|
219
333
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-hierarchy-select-
|
|
1
|
+
:root{--zt-hierarchy-select-color: var(--zt-gray-5);--zt-hierarchy-select-duration: var(--zt-duration-fast);--zt-hierarchy-select-round-icon-border: 1px solid rgba(45, 75, 115, .13);--zt-hierarchy-select-round-icon-box-shadow: -1px -1px 2px 0 #ffffff, 0 0 3px 0 rgba(45, 75, 115, .2);--zt-hierarchy-select-round-icon-background: linear-gradient(135deg, #e6ebf0 0%, #ffffff 100%);--zt-hierarchy-select-checked-icon-color: var(--zt-primary-color);--zt-hierarchy-select-checked-icon-shadow: inset 1px 1px 2px 0 rgba(0, 0, 0, .2);--zt-hierarchy-select-checked-icon-border: 1px solid rgba(255, 255, 255, .5);--zt-hierarchy-select-disabled-icon-shadow: -1px -1px 2px 0 #fff, 0 0 3px 0 rgba(45, 75, 115, .2);--zt-hierarchy-select-disabled-icon-border: 1px solid rgba(255, 255, 255, .5);--zt-hierarchy-select-disabled-checked-icon-opacity: .4;--zt-hierarchy-select-disabled-icon-background: linear-gradient(134deg, #e1e6eb 0%, #e5edf5 100%);--zt-hierarchy-breadcrumb-line-height: 44px;--zt-hierarchy-select-sub-icon-gap: 4px}:root[zt-theme-size=large]{--zt-hierarchy-breadcrumb-line-height: 56px}.zt-hierarchy-select__score-item{position:relative;display:flex;justify-content:space-between;align-items:center;padding:10px 0 10px var(--zt-padding-md);background-color:var(--zt-background-2)}.zt-hierarchy-select__score-item:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:0;bottom:0;left:var(--zt-padding-md);border-bottom:1px solid var(--zt-border-color);transform:scaleY(.5)}.zt-hierarchy-select__item-content{flex:1;margin-right:var(--zt-padding-md);width:278px;font-size:var(--zt-font-size-md);font-weight:400;text-align:left;color:var(--zt-gray);line-height:var(--zt-line-height-xl);word-break:break-all}.zt-hierarchy-select__item-content--selected,.zt-hierarchy-select__item-content span{color:var(--zt-primary-color)}.zt-hierarchy-select__disable .zt-hierarchy-select__sub-level,.zt-hierarchy-select__disable-parent .zt-hierarchy-select__sub-level,.zt-hierarchy-select__disable .zt-hierarchy-select__item-content,.zt-hierarchy-select__disable-parent .zt-hierarchy-select__item-content{opacity:.4}.zt-hierarchy-select__item-nav{padding:0 16px;border-left:rgba(0,0,0,.1) 1px solid}.zt-hierarchy-select__svg-defs-path-fill{fill:var(--zt-primary-color)}.zt-hierarchy-select__sub-level{display:flex;align-items:center;gap:var(--zt-hierarchy-select-sub-icon-gap)}.zt-hierarchy-select__sub-level span{color:var(--zt-primary-color);font-size:var(--zt-font-size-md)}.zt-hierarchy-select__sub-level--disable{opacity:.2}.zt-hierarchy-select__sub-icon{line-height:.75}.zt-hierarchy-select__svg-sub-icon{width:var(--zt-font-size-md);height:var(--zt-font-size-md)}.zt-hierarchy-select__multiple-button{margin-right:8px;display:flex;justify-content:center;align-items:center}.zt-hierarchy-select__icon{font-size:0;font-size:var(--zt-font-size-lg);cursor:pointer;box-sizing:border-box}.zt-hierarchy-select__icon .zt-icon{display:flex;justify-content:center;align-items:center;color:transparent;text-align:center;width:18px;height:18px;border:1px solid var(--zt-hierarchy-select-color);transition-duration:var(--zt-hierarchy-select-duration);transition-property:color,border-color,background-color}.zt-hierarchy-select__icon--round .zt-icon{border-radius:100%;border:var(--zt-hierarchy-select-round-icon-border);box-shadow:var(--zt-hierarchy-select-round-icon-box-shadow);background:var(--zt-hierarchy-select-round-icon-background)}.zt-hierarchy-select__icon--indeterminate .zt-icon{color:var(--zt-white);background:var(--zt-checkbox-checked-icon-color);box-shadow:var(--zt-checkbox-checked-icon-shadow);border:var(--zt-checkbox-checked-icon-border)}.zt-hierarchy-select__icon--checked .zt-icon{color:var(--zt-white);background:var(--zt-hierarchy-select-checked-icon-color);box-shadow:var(--zt-hierarchy-select-checked-icon-shadow);border:var(--zt-hierarchy-select-checked-icon-border)}.zt-hierarchy-select__icon--disabled{cursor:not-allowed}.zt-hierarchy-select__icon--disabled .zt-icon{border:var(--zt-hierarchy-select-disabled-icon-border);box-shadow:var(--zt-hierarchy-select-disabled-icon-shadow);background:var(--zt-hierarchy-select-disabled-icon-background)}.zt-hierarchy-select__icon--disabled.zt-hierarchy-select__icon--checked .zt-icon{opacity:var(--zt-hierarchy-select-disabled-checked-icon-opacity);background:var(--zt-primary-color);color:var(--zt-white)}.zt-breadcrumb{padding:0 16px}.zt-breadcrumb__list{box-sizing:border-box;height:var(--zt-hierarchy-breadcrumb-line-height);display:flex;align-items:center;color:var(--zt-primary-color);width:100%;overflow-x:scroll;font-size:var(--zt-font-size-lg)}.zt-breadcrumb__list::-webkit-scrollbar{width:0;height:0}.zt-breadcrumb__default{display:flex;white-space:nowrap}.zt-breadcrumb__item{height:44px;display:flex;align-items:center;white-space:nowrap}.zt-breadcrumb__item:last-child{color:var(--zt-gray)}.zt-breadcrumb__icon{padding:0 4px}
|
|
@@ -3,6 +3,10 @@ export declare const HierarchySelect: import("../utils").WithInstall<import("vue
|
|
|
3
3
|
type: ArrayConstructor;
|
|
4
4
|
default: () => never[];
|
|
5
5
|
};
|
|
6
|
+
checkedList: {
|
|
7
|
+
type: import("vue").PropType<import("./types").HierarchyData[]>;
|
|
8
|
+
default: () => import("./types").HierarchyData[];
|
|
9
|
+
};
|
|
6
10
|
disableParent: {
|
|
7
11
|
type: BooleanConstructor;
|
|
8
12
|
default: boolean;
|
|
@@ -14,6 +18,10 @@ export declare const HierarchySelect: import("../utils").WithInstall<import("vue
|
|
|
14
18
|
asyncGetter: {
|
|
15
19
|
type: FunctionConstructor;
|
|
16
20
|
};
|
|
21
|
+
unanimous: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
17
25
|
valueKey: {
|
|
18
26
|
type: import("vue").PropType<string>;
|
|
19
27
|
default: string;
|
|
@@ -27,11 +35,15 @@ export declare const HierarchySelect: import("../utils").WithInstall<import("vue
|
|
|
27
35
|
default: string;
|
|
28
36
|
};
|
|
29
37
|
autoChangeToChildren: BooleanConstructor;
|
|
30
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("selected" | "change" | "asyncGetter")[], "selected" | "change" | "asyncGetter", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
38
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("selected" | "change" | "asyncGetter" | "update:checkedList")[], "selected" | "change" | "asyncGetter" | "update:checkedList", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
31
39
|
treeData: {
|
|
32
40
|
type: ArrayConstructor;
|
|
33
41
|
default: () => never[];
|
|
34
42
|
};
|
|
43
|
+
checkedList: {
|
|
44
|
+
type: import("vue").PropType<import("./types").HierarchyData[]>;
|
|
45
|
+
default: () => import("./types").HierarchyData[];
|
|
46
|
+
};
|
|
35
47
|
disableParent: {
|
|
36
48
|
type: BooleanConstructor;
|
|
37
49
|
default: boolean;
|
|
@@ -43,6 +55,10 @@ export declare const HierarchySelect: import("../utils").WithInstall<import("vue
|
|
|
43
55
|
asyncGetter: {
|
|
44
56
|
type: FunctionConstructor;
|
|
45
57
|
};
|
|
58
|
+
unanimous: {
|
|
59
|
+
type: BooleanConstructor;
|
|
60
|
+
default: boolean;
|
|
61
|
+
};
|
|
46
62
|
valueKey: {
|
|
47
63
|
type: import("vue").PropType<string>;
|
|
48
64
|
default: string;
|
|
@@ -60,18 +76,21 @@ export declare const HierarchySelect: import("../utils").WithInstall<import("vue
|
|
|
60
76
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
61
77
|
onSelected?: ((...args: any[]) => any) | undefined;
|
|
62
78
|
onAsyncGetter?: ((...args: any[]) => any) | undefined;
|
|
79
|
+
"onUpdate:checkedList"?: ((...args: any[]) => any) | undefined;
|
|
63
80
|
}, {
|
|
64
81
|
multiple: boolean;
|
|
65
82
|
valueKey: string;
|
|
66
83
|
textKey: string;
|
|
67
84
|
breadcrumbTitle: string;
|
|
68
85
|
treeData: unknown[];
|
|
86
|
+
checkedList: import("./types").HierarchyData[];
|
|
69
87
|
disableParent: boolean;
|
|
88
|
+
unanimous: boolean;
|
|
70
89
|
autoChangeToChildren: boolean;
|
|
71
90
|
}, {}>>;
|
|
72
91
|
export default HierarchySelect;
|
|
73
92
|
export type { HierarchySelectProps } from './HierarchySelect';
|
|
74
|
-
export type { HierarchyData } from './types';
|
|
93
|
+
export type { HierarchyData, HierarchySelectThemeVars, HierarchySelectInstance, } from './types';
|
|
75
94
|
declare module 'vue' {
|
|
76
95
|
interface GlobalComponents {
|
|
77
96
|
ZtHierarchySelect: typeof HierarchySelect;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { BEM } from '../../utils';
|
|
2
|
+
export declare const SubIcon: (bem: BEM) => JSX.Element;
|