kui-vue 3.6.10 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +3 -3
- package/components/affix/affix.jsx +39 -34
- package/components/affix/demo/index.jsx +1 -1
- package/components/affix/index.js +2 -2
- package/components/affix/styles/index.less +1 -1
- package/components/alert/alert.jsx +5 -10
- package/components/alert/demo/index.jsx +9 -9
- package/components/alert/index.js +2 -2
- package/components/alert/index.md +1 -1
- package/components/avatar/avatar.jsx +10 -21
- package/components/avatar/demo/basic.md +2 -2
- package/components/avatar/demo/change.md +1 -4
- package/components/avatar/demo/index.jsx +8 -8
- package/components/avatar/index.js +2 -2
- package/components/backtop/backtop.jsx +29 -19
- package/components/backtop/demo/index.jsx +10 -8
- package/components/backtop/index.js +2 -2
- package/components/badge/badge.jsx +1 -1
- package/components/badge/demo/color.md +2 -7
- package/components/badge/demo/dynamic.md +1 -1
- package/components/badge/demo/index.jsx +12 -13
- package/components/badge/index.js +2 -2
- package/components/badge/styles/index.less +143 -144
- package/components/base/transition.js +90 -94
- package/components/breadcrumb/breadcrumb.jsx +1 -1
- package/components/breadcrumb/breadcrumbItem.jsx +2 -6
- package/components/breadcrumb/demo/icon.md +1 -3
- package/components/breadcrumb/demo/index.jsx +8 -8
- package/components/breadcrumb/demo/separator.md +2 -6
- package/components/breadcrumb/index.js +3 -3
- package/components/breadcrumb/styles/index.less +1 -2
- package/components/button/button.jsx +13 -41
- package/components/button/demo/color.md +3 -9
- package/components/button/demo/group.md +4 -1
- package/components/button/demo/index.jsx +15 -15
- package/components/button/demo/light.md +3 -18
- package/components/button/demo/loading.md +3 -16
- package/components/button/demo/size.md +4 -13
- package/components/button/index.js +3 -3
- package/components/card/card.jsx +3 -11
- package/components/card/index.js +2 -2
- package/components/card/styles/index.less +2 -2
- package/components/carousel/carousel.jsx +3 -14
- package/components/carousel/carouselItem.jsx +2 -2
- package/components/carousel/demo/index.jsx +8 -8
- package/components/carousel/index.js +3 -3
- package/components/checkbox/checkbox.jsx +15 -25
- package/components/checkbox/checkboxGroup.jsx +7 -22
- package/components/checkbox/demo/basic.md +5 -2
- package/components/checkbox/demo/check-all.md +5 -5
- package/components/checkbox/demo/disabled.md +4 -0
- package/components/checkbox/demo/group-layout.md +1 -6
- package/components/checkbox/demo/group.md +5 -6
- package/components/checkbox/demo/info.md +8 -5
- package/components/checkbox/index.js +3 -3
- package/components/checkbox/styles/index.less +1 -2
- package/components/collapse/collapse.jsx +5 -11
- package/components/collapse/collapsePanel.jsx +5 -14
- package/components/collapse/demo/extra.md +1 -1
- package/components/collapse/demo/index.jsx +10 -10
- package/components/collapse/index.js +3 -3
- package/components/collapse/index.md +6 -6
- package/components/colorPicker/alpha.jsx +9 -16
- package/components/colorPicker/colorpicker.jsx +24 -53
- package/components/colorPicker/demo/customTrigger.md +2 -2
- package/components/colorPicker/demo/index.jsx +9 -9
- package/components/colorPicker/demo/placement.md +2 -9
- package/components/colorPicker/demo/size.md +14 -13
- package/components/colorPicker/hue.jsx +6 -16
- package/components/colorPicker/index.js +2 -2
- package/components/colorPicker/index.md +1 -1
- package/components/colorPicker/mode.jsx +12 -17
- package/components/colorPicker/paint.jsx +8 -16
- package/components/colorPicker/presets.jsx +4 -6
- package/components/colorPicker/styles/index.less +0 -2
- package/components/components.js +3 -15
- package/components/config/index.js +5 -8
- package/components/const/var.js +34 -2
- package/components/datePicker/datepicker.jsx +44 -121
- package/components/datePicker/demo/basic.md +3 -3
- package/components/datePicker/demo/disabled-date.md +1 -5
- package/components/datePicker/demo/index.jsx +14 -14
- package/components/datePicker/demo/info.md +3 -1
- package/components/datePicker/demo/range.md +4 -4
- package/components/datePicker/demo/size.md +1 -6
- package/components/datePicker/index.js +1 -1
- package/components/datePicker/index.md +1 -1
- package/components/datePicker/styles/index.less +0 -3
- package/components/descriptions/demo/basic.md +5 -3
- package/components/descriptions/demo/bordered.md +5 -3
- package/components/descriptions/demo/index.jsx +10 -10
- package/components/descriptions/demo/layout-bordered.md +5 -3
- package/components/descriptions/demo/layout.md +5 -3
- package/components/descriptions/demo/size.md +5 -3
- package/components/descriptions/descriptions.jsx +7 -32
- package/components/descriptions/descriptionsItem.jsx +1 -1
- package/components/descriptions/index.js +3 -3
- package/components/directives/outsiteclick.js +7 -8
- package/components/directives/resize.js +7 -8
- package/components/directives/scroll.js +7 -8
- package/components/directives/transfer.js +2 -2
- package/components/divider/demo/index.jsx +8 -8
- package/components/divider/divider.jsx +7 -3
- package/components/divider/index.js +2 -2
- package/components/drawer/demo/basic.md +3 -13
- package/components/drawer/demo/index.jsx +9 -9
- package/components/drawer/demo/withForm.md +4 -13
- package/components/drawer/drawer.jsx +19 -30
- package/components/drawer/index.js +2 -2
- package/components/drawer/styles/animal.less +11 -12
- package/components/dropdown/demo/arrow.md +4 -23
- package/components/dropdown/demo/index.jsx +11 -11
- package/components/dropdown/demo/placement.md +4 -23
- package/components/dropdown/dropdown.jsx +32 -66
- package/components/dropdown/dropdownButton.jsx +1 -1
- package/components/dropdown/styles/index.less +0 -4
- package/components/dropdown/trigger.jsx +2 -1
- package/components/empty/demo/custom.md +1 -1
- package/components/empty/demo/index.jsx +9 -9
- package/components/empty/demo/used.md +1 -1
- package/components/empty/empty.jsx +2 -6
- package/components/empty/index.js +2 -2
- package/components/empty/styles/index.less +1 -2
- package/components/flex/demo/align.md +1 -5
- package/components/flex/demo/size.md +1 -7
- package/components/flex/flex.jsx +19 -6
- package/components/flex/index.js +2 -2
- package/components/flex/styles/index.less +1 -2
- package/components/form/demo/basic.md +1 -5
- package/components/form/demo/customvalid.md +3 -9
- package/components/form/demo/dynamicvalid.md +5 -20
- package/components/form/demo/length.md +1 -2
- package/components/form/demo/valid.md +10 -10
- package/components/form/demo/withmodal.md +12 -18
- package/components/form/form.jsx +44 -77
- package/components/form/formitem.jsx +28 -55
- package/components/form/index.js +3 -3
- package/components/grid/col.jsx +1 -1
- package/components/grid/demo/align.md +4 -0
- package/components/grid/demo/basic.md +5 -1
- package/components/grid/demo/fill.md +8 -4
- package/components/grid/demo/flex.md +5 -1
- package/components/grid/demo/gutter.md +9 -5
- package/components/grid/demo/index.jsx +11 -11
- package/components/grid/demo/offset.md +9 -5
- package/components/grid/index.js +3 -3
- package/components/grid/row.jsx +1 -1
- package/components/grid/styles/index.less +4 -4
- package/components/icon/demo/index.jsx +9 -9
- package/components/icon/demo/info.md +1 -1
- package/components/icon/demo/search.vue +13 -39
- package/components/icon/demo/use.md +1 -1
- package/components/icon/icon.jsx +21 -26
- package/components/icon/index.js +4 -4
- package/components/image/demo/basic.md +1 -5
- package/components/image/demo/errors.md +1 -1
- package/components/image/demo/extra.md +1 -1
- package/components/image/demo/group.md +2 -12
- package/components/image/demo/index.jsx +9 -9
- package/components/image/group.jsx +6 -5
- package/components/image/image.jsx +23 -38
- package/components/image/instance.js +21 -7
- package/components/image/preview.jsx +38 -67
- package/components/index.js +1 -1
- package/components/input/demo/basic.md +3 -8
- package/components/input/demo/event.md +1 -9
- package/components/input/demo/group.md +5 -21
- package/components/input/demo/icon.md +3 -10
- package/components/input/demo/index.jsx +3 -3
- package/components/input/demo/suffix.md +3 -12
- package/components/input/demo/theme.md +1 -6
- package/components/input/index.js +4 -4
- package/components/input/input.jsx +72 -99
- package/components/input/inputBox.jsx +21 -30
- package/components/input/inputGroup.jsx +3 -2
- package/components/input/styles/index.less +0 -35
- package/components/input/textarea.jsx +11 -16
- package/components/inputNumber/demo/basic.md +4 -2
- package/components/inputNumber/demo/ffix.md +1 -6
- package/components/inputNumber/demo/format.md +3 -5
- package/components/inputNumber/demo/size.md +2 -12
- package/components/inputNumber/index.js +2 -2
- package/components/inputNumber/index.md +16 -16
- package/components/inputNumber/inputNumber.jsx +56 -71
- package/components/inputNumber/styles/index.less +0 -21
- package/components/layout/demo/index.jsx +2 -2
- package/components/layout/demo/info.md +0 -1
- package/components/layout/demo/layout1.md +2 -8
- package/components/layout/demo/layout2.md +2 -14
- package/components/layout/demo/layout3.md +2 -14
- package/components/layout/demo/layout4.md +1 -8
- package/components/layout/demo/layout5.md +1 -8
- package/components/layout/index.js +6 -6
- package/components/layout/layout.jsx +7 -6
- package/components/loading/demo/basic.md +1 -1
- package/components/loading/demo/index.jsx +2 -2
- package/components/loading/demo/info.md +6 -7
- package/components/loading/index.js +2 -2
- package/components/loading/loading.jsx +26 -12
- package/components/menu/demo/basic.md +1 -5
- package/components/menu/demo/collapsed.md +4 -8
- package/components/menu/demo/index.jsx +2 -2
- package/components/menu/demo/theme.md +2 -13
- package/components/menu/index.js +6 -12
- package/components/menu/menu.jsx +7 -9
- package/components/menu/menudivider.jsx +1 -1
- package/components/menu/menugroup.jsx +1 -1
- package/components/menu/menuitem.jsx +16 -40
- package/components/menu/recursiveMenu.jsx +1 -6
- package/components/menu/styles/index.less +0 -6
- package/components/menu/submenu.jsx +26 -59
- package/components/menu/utils.js +4 -4
- package/components/message/demo/icon.md +0 -1
- package/components/message/demo/index.jsx +9 -9
- package/components/message/group.jsx +12 -29
- package/components/message/index.js +3 -3
- package/components/message/index.md +1 -1
- package/components/message/inner.jsx +2 -12
- package/components/message/instance.js +22 -11
- package/components/message/styles/index.less +0 -1
- package/components/modal/demo/basic.md +2 -12
- package/components/modal/demo/confirm.md +6 -6
- package/components/modal/demo/custom.md +5 -26
- package/components/modal/demo/global.md +0 -1
- package/components/modal/demo/index.jsx +10 -10
- package/components/modal/demo/more.md +2 -12
- package/components/modal/index.js +15 -23
- package/components/modal/modal.jsx +16 -30
- package/components/modal/toast.jsx +5 -17
- package/components/notice/demo/icon.md +4 -10
- package/components/notice/demo/index.jsx +9 -9
- package/components/notice/demo/info.md +3 -1
- package/components/notice/index.js +3 -4
- package/components/notice/index.md +1 -1
- package/components/notice/styles/index.less +1 -1
- package/components/page/demo/basic.md +2 -13
- package/components/page/demo/index.jsx +9 -9
- package/components/page/demo/size.md +1 -7
- package/components/page/index.js +2 -2
- package/components/page/index.md +1 -1
- package/components/page/page.jsx +52 -88
- package/components/page/styles/index.less +0 -30
- package/components/popconfirm/demo/index.jsx +8 -8
- package/components/popconfirm/index.js +2 -2
- package/components/popconfirm/popconfirm.jsx +60 -76
- package/components/popconfirm/styles/index.less +1 -3
- package/components/poptip/demo/closeinside.md +1 -1
- package/components/poptip/demo/index.jsx +9 -9
- package/components/poptip/index.js +2 -2
- package/components/poptip/poptip.jsx +51 -71
- package/components/poptip/styles/index.less +2 -20
- package/components/progress/demo/color.md +1 -6
- package/components/progress/demo/dashboard.md +3 -18
- package/components/progress/demo/dynamic.md +4 -0
- package/components/progress/demo/index.jsx +11 -11
- package/components/progress/index.js +2 -2
- package/components/progress/progress.jsx +3 -15
- package/components/radio/demo/group-layout.md +1 -6
- package/components/radio/demo/group.md +1 -6
- package/components/radio/demo/index.jsx +1 -1
- package/components/radio/demo/radioButton.md +1 -2
- package/components/radio/index.js +4 -4
- package/components/radio/index.md +7 -6
- package/components/radio/radio.jsx +15 -24
- package/components/radio/radioButton.jsx +21 -30
- package/components/radio/radioGroup.jsx +9 -21
- package/components/rate/demo/basic.md +6 -6
- package/components/rate/demo/character.md +6 -13
- package/components/rate/demo/index.jsx +1 -1
- package/components/rate/demo/tips.md +2 -2
- package/components/rate/index.js +2 -2
- package/components/rate/index.md +11 -11
- package/components/rate/rate.jsx +18 -38
- package/components/rate/star.jsx +5 -22
- package/components/select/demo/basic.md +2 -2
- package/components/select/demo/disabled.md +2 -15
- package/components/select/demo/filterable.md +3 -11
- package/components/select/demo/multiple.md +3 -3
- package/components/select/demo/size.md +1 -8
- package/components/select/demo/theme.md +5 -29
- package/components/select/index.js +3 -3
- package/components/select/option.jsx +1 -5
- package/components/select/select.jsx +38 -83
- package/components/select/styles/index.less +2 -3
- package/components/skeleton/demo/animated.md +4 -0
- package/components/skeleton/demo/basic.md +6 -2
- package/components/skeleton/demo/child.md +6 -2
- package/components/skeleton/demo/custom.md +6 -22
- package/components/skeleton/demo/group.md +4 -0
- package/components/skeleton/demo/index.jsx +12 -12
- package/components/skeleton/demo/info.md +2 -2
- package/components/skeleton/demo/items.md +8 -21
- package/components/skeleton/demo/list.md +7 -4
- package/components/skeleton/index.js +6 -6
- package/components/skeleton/skeleton.jsx +2 -2
- package/components/skeleton/skeletonAvatar.jsx +2 -2
- package/components/skeleton/skeletonButton.jsx +2 -2
- package/components/skeleton/skeletonImage.jsx +1 -1
- package/components/skeleton/skeletonText.jsx +2 -2
- package/components/skeleton/styles/index.less +0 -3
- package/components/slider/demo/basic.md +1 -1
- package/components/slider/demo/formatter.md +3 -3
- package/components/slider/demo/index.jsx +1 -1
- package/components/slider/demo/marks.md +6 -6
- package/components/slider/demo/reverse.md +1 -6
- package/components/slider/demo/size.md +3 -16
- package/components/slider/demo/vertical.md +6 -12
- package/components/slider/demo/withNumber.md +8 -13
- package/components/slider/index.js +2 -2
- package/components/slider/index.md +14 -14
- package/components/slider/slider.jsx +30 -67
- package/components/slider/thumb.jsx +3 -7
- package/components/space/demo/basic.md +4 -0
- package/components/space/demo/compact-button-vertical.md +4 -0
- package/components/space/demo/compact-button.md +4 -0
- package/components/space/demo/compact.md +8 -19
- package/components/space/demo/index.jsx +2 -2
- package/components/space/demo/size.md +5 -1
- package/components/space/demo/split.md +4 -0
- package/components/space/demo/vertical.md +4 -0
- package/components/space/demo/wrap.md +4 -0
- package/components/space/index.js +2 -2
- package/components/space/space.jsx +6 -14
- package/components/spin/demo/index.jsx +2 -2
- package/components/spin/index.js +2 -2
- package/components/spin/index.md +6 -6
- package/components/spin/spin.jsx +5 -5
- package/components/spin/styles/index.less +2 -4
- package/components/statCard/{statup/countup.js → countup.js} +8 -25
- package/components/statCard/{statup/countup.jsx → countup.jsx} +4 -4
- package/components/statCard/demo/card.md +5 -14
- package/components/statCard/demo/index.jsx +4 -4
- package/components/statCard/demo/with-card.md +3 -13
- package/components/statCard/{statup/rollup.jsx → rollup.jsx} +4 -4
- package/components/statCard/statCard.jsx +5 -15
- package/components/statCard/statNumber.jsx +8 -14
- package/components/statCard/styles/index.less +1 -0
- package/components/styles/color.less +209 -0
- package/components/styles/index.less +53 -54
- package/components/styles/less-var.less +1 -1
- package/components/styles/sys.less +2 -1
- package/components/styles/var.less +207 -0
- package/components/switch/demo/index.jsx +10 -10
- package/components/switch/demo/info.md +1 -1
- package/components/switch/demo/withText.md +1 -8
- package/components/switch/index.js +2 -2
- package/components/switch/styles/index.less +1 -1
- package/components/switch/switch.jsx +14 -26
- package/components/table/demo/base-render.md +19 -23
- package/components/table/demo/basic.md +9 -12
- package/components/table/demo/bordered.md +5 -3
- package/components/table/demo/col-row-span.md +4 -4
- package/components/table/demo/fixed-col-head.md +5 -1
- package/components/table/demo/head-span.md +6 -3
- package/components/table/demo/size.md +5 -5
- package/components/table/demo/table-check.md +7 -6
- package/components/table/demo/table-edit.md +8 -20
- package/components/table/demo/table-sorter.md +6 -3
- package/components/table/index.js +2 -2
- package/components/table/index.md +13 -13
- package/components/table/styles/index.less +2 -11
- package/components/table/table.jsx +15 -59
- package/components/tabs/demo/basic.md +8 -10
- package/components/tabs/demo/card.md +4 -0
- package/components/tabs/demo/centered.md +4 -0
- package/components/tabs/demo/disabled.md +5 -3
- package/components/tabs/demo/extra.md +4 -0
- package/components/tabs/demo/icon.md +6 -6
- package/components/tabs/demo/index.jsx +13 -13
- package/components/tabs/demo/info.md +13 -6
- package/components/tabs/demo/sample.md +4 -0
- package/components/tabs/index.js +3 -3
- package/components/tabs/index.md +9 -9
- package/components/tabs/styles/index.less +1 -1
- package/components/tabs/tabpanel.jsx +4 -15
- package/components/tabs/tabs.jsx +19 -27
- package/components/tag/demo/basic.md +8 -4
- package/components/tag/demo/color.md +5 -1
- package/components/tag/demo/dynamic.md +5 -3
- package/components/tag/demo/icon.md +5 -1
- package/components/tag/demo/index.jsx +10 -10
- package/components/tag/demo/size.md +5 -3
- package/components/tag/index.js +2 -2
- package/components/tag/styles/index.less +1 -1
- package/components/tag/tag.jsx +6 -9
- package/components/timeline/demo/basic.md +5 -1
- package/components/timeline/demo/icon.md +8 -10
- package/components/timeline/demo/index.jsx +8 -8
- package/components/timeline/demo/mode.md +7 -10
- package/components/timeline/index.js +3 -4
- package/components/timeline/timelineitem.jsx +3 -2
- package/components/tooltip/demo/basic.md +5 -1
- package/components/tooltip/demo/color.md +7 -13
- package/components/tooltip/demo/index.jsx +8 -8
- package/components/tooltip/demo/placement.md +5 -1
- package/components/tooltip/index.js +2 -2
- package/components/tooltip/styles/index.less +1 -10
- package/components/tooltip/tooltip.jsx +57 -88
- package/components/tree/demo/basic.md +5 -1
- package/components/tree/demo/checkable.md +6 -2
- package/components/tree/demo/custom-render.md +6 -4
- package/components/tree/demo/directory.md +9 -17
- package/components/tree/demo/disabled.md +5 -1
- package/components/tree/demo/icon.md +5 -1
- package/components/tree/demo/info.md +8 -3
- package/components/tree/demo/sync.md +6 -11
- package/components/tree/styles/index.less +4 -9
- package/components/tree/tree.jsx +34 -85
- package/components/tree/utils.js +2 -10
- package/components/{treeselect → treeSelect}/demo/basic.md +5 -1
- package/components/{treeselect → treeSelect}/demo/checkable.md +5 -1
- package/components/{treeselect → treeSelect}/demo/disabled.md +5 -1
- package/components/{treeselect → treeSelect}/demo/multiple.md +5 -1
- package/components/{treeselect → treeSelect}/demo/size.md +7 -3
- package/components/{treeselect → treeSelect}/demo/sync.md +6 -11
- package/components/treeSelect/demo/theme.md +38 -0
- package/components/treeSelect/index.js +2 -0
- package/components/{treeselect → treeSelect}/styles/index.less +0 -3
- package/components/{treeselect → treeSelect}/treeselect.jsx +47 -78
- package/components/upload/demo/accept.md +12 -0
- package/components/upload/demo/avatar.md +4 -0
- package/components/upload/demo/basic.md +8 -3
- package/components/upload/demo/custom.md +8 -6
- package/components/upload/demo/directory.md +5 -1
- package/components/upload/demo/draggable.md +4 -0
- package/components/upload/demo/exceed.md +5 -1
- package/components/upload/demo/file-list.md +5 -0
- package/components/upload/demo/forms.md +6 -5
- package/components/upload/demo/index.jsx +16 -16
- package/components/upload/demo/pictures.md +5 -1
- package/components/upload/demo/transform.md +5 -1
- package/components/upload/fileList.jsx +3 -9
- package/components/upload/index.js +2 -2
- package/components/upload/index.md +3 -3
- package/components/upload/selector.jsx +7 -18
- package/components/upload/styles/index.less +1 -3
- package/components/upload/upload.jsx +23 -36
- package/components/utils/element.js +118 -0
- package/components/utils/number.js +1 -3
- package/components/utils/placement.js +6 -14
- package/components/utils/theme.js +2 -2
- package/components/utils/vnode.jsx +7 -10
- package/components/utils/vue.js +2 -133
- package/dist/k-ui.cjs.js +2 -2
- package/dist/k-ui.css +3 -3
- package/dist/k-ui.d.ts +386 -833
- package/dist/k-ui.esm.js +2 -2
- package/dist/k-ui.umd.js +2 -2
- package/dist/locale/de.js +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/zh-CN.js +1 -1
- package/dist/locale/zh-TW.js +1 -1
- package/package.json +24 -28
- package/test/i18n@6.x.html +48 -0
- package/types/affix/Affix.d.ts +3 -9
- package/types/alert/Alert.d.ts +3 -9
- package/types/avatar/Avatar.d.ts +3 -9
- package/types/backtop/BackTop.d.ts +3 -9
- package/types/badge/Badge.d.ts +3 -9
- package/types/breadcrumb/Breadcrumb.d.ts +3 -9
- package/types/breadcrumb/BreadcrumbItem.d.ts +3 -9
- package/types/button/Button.d.ts +4 -10
- package/types/button/ButtonGroup.d.ts +3 -9
- package/types/card/Card.d.ts +3 -9
- package/types/carousel/Carousel.d.ts +3 -9
- package/types/carousel/CarouselItem.d.ts +3 -9
- package/types/checkbox/Checkbox.d.ts +5 -10
- package/types/checkbox/CheckboxGroup.d.ts +4 -10
- package/types/collapse/Collapse.d.ts +3 -9
- package/types/collapse/CollapsePanel.d.ts +3 -9
- package/types/colorPicker/ColorPicker.d.ts +4 -9
- package/types/datePicker/DatePicker.d.ts +4 -10
- package/types/descriptions/Descriptions.d.ts +3 -9
- package/types/descriptions/DescriptionsItem.d.ts +3 -9
- package/types/divider/Divider.d.ts +3 -9
- package/types/drawer/Drawer.d.ts +4 -10
- package/types/dropdown/Dropdown.d.ts +3 -9
- package/types/dropdown/DropdownButton.d.ts +3 -9
- package/types/empty/Empty.d.ts +3 -9
- package/types/flex/Flex.d.ts +3 -9
- package/types/form/Form.d.ts +3 -9
- package/types/form/formitem.d.ts +3 -9
- package/types/grid/Col.d.ts +3 -9
- package/types/grid/Row.d.ts +3 -9
- package/types/icon/Icon.d.ts +3 -9
- package/types/image/ImageGroup.d.ts +3 -9
- package/types/image/KImage.d.ts +3 -9
- package/types/index.d.ts +38 -38
- package/types/input/Input.d.ts +4 -9
- package/types/input/InputGroup.d.ts +3 -9
- package/types/input/TextArea.d.ts +4 -9
- package/types/inputNumber/InputNumber.d.ts +14 -22
- package/types/layout/sider.d.ts +3 -9
- package/types/loading/loading.d.ts +3 -9
- package/types/menu/Menu.d.ts +5 -9
- package/types/menu/MenuDivider.d.ts +3 -9
- package/types/menu/MenuGroup.d.ts +3 -9
- package/types/menu/MenuItem.d.ts +3 -9
- package/types/menu/SubMenu.d.ts +3 -9
- package/types/modal/Modal.d.ts +4 -10
- package/types/page/Page.d.ts +3 -9
- package/types/popconfirm/Popconfirm.d.ts +3 -9
- package/types/poptip/Poptip.d.ts +3 -9
- package/types/progress/Progress.d.ts +3 -9
- package/types/radio/Radio.d.ts +6 -11
- package/types/radio/RadioButton.d.ts +6 -11
- package/types/radio/RadioGroup.d.ts +4 -10
- package/types/rate/Rate.d.ts +6 -12
- package/types/select/Option.d.ts +3 -9
- package/types/select/Select.d.ts +4 -9
- package/types/skeleton/Skeleton.d.ts +3 -9
- package/types/skeleton/SkeletonAvatar.d.ts +3 -9
- package/types/skeleton/SkeletonButton.d.ts +3 -9
- package/types/skeleton/SkeletonImage.d.ts +3 -9
- package/types/skeleton/SkeletonText.d.ts +3 -9
- package/types/slider/Slider.d.ts +4 -10
- package/types/space/Space.d.ts +3 -9
- package/types/spin/Spin.d.ts +4 -10
- package/types/statCard/StatCard.d.ts +3 -9
- package/types/statCard/StatNumber.d.ts +4 -10
- package/types/switch/Switch.d.ts +4 -10
- package/types/table/Table.d.ts +3 -9
- package/types/tabs/TabPanel.d.ts +3 -9
- package/types/tabs/Tabs.d.ts +4 -9
- package/types/tag/Tag.d.ts +3 -9
- package/types/timeline/TimeLine.d.ts +3 -9
- package/types/timeline/TimeLineItem.d.ts +3 -9
- package/types/tooltip/Tooltip.d.ts +3 -9
- package/types/tree/Tree.d.ts +3 -9
- package/types/{treeselect → treeSelect}/TreeSelect.d.ts +4 -9
- package/types/upload/Upload.d.ts +3 -9
- package/components/treeselect/demo/theme.md +0 -66
- package/components/treeselect/index.js +0 -2
- package/dist/locale/ua.js +0 -7
- package/test/i18n@8.x.html +0 -81
- /package/components/{treeselect → treeSelect}/demo/index.jsx +0 -0
- /package/components/{treeselect → treeSelect}/demo/info.md +0 -0
- /package/components/{treeselect → treeSelect}/index.md +0 -0
|
@@ -1,54 +1,53 @@
|
|
|
1
|
-
@import
|
|
2
|
-
@import
|
|
3
|
-
@import
|
|
4
|
-
@import
|
|
5
|
-
@import
|
|
6
|
-
@import
|
|
7
|
-
@import
|
|
8
|
-
@import
|
|
9
|
-
@import
|
|
10
|
-
@import
|
|
11
|
-
@import
|
|
12
|
-
@import
|
|
13
|
-
@import
|
|
14
|
-
@import
|
|
15
|
-
@import
|
|
16
|
-
@import
|
|
17
|
-
@import
|
|
18
|
-
@import
|
|
19
|
-
@import
|
|
20
|
-
@import
|
|
21
|
-
@import
|
|
22
|
-
@import
|
|
23
|
-
@import
|
|
24
|
-
@import
|
|
25
|
-
@import
|
|
26
|
-
@import
|
|
27
|
-
@import
|
|
28
|
-
@import
|
|
29
|
-
@import
|
|
30
|
-
@import
|
|
31
|
-
@import
|
|
32
|
-
@import
|
|
33
|
-
@import
|
|
34
|
-
@import
|
|
35
|
-
@import
|
|
36
|
-
@import
|
|
37
|
-
@import
|
|
38
|
-
@import
|
|
39
|
-
@import
|
|
40
|
-
@import
|
|
41
|
-
@import
|
|
42
|
-
@import
|
|
43
|
-
@import
|
|
44
|
-
@import
|
|
45
|
-
@import
|
|
46
|
-
|
|
47
|
-
@import
|
|
48
|
-
@import
|
|
49
|
-
@import
|
|
50
|
-
@import
|
|
51
|
-
@import
|
|
52
|
-
@import
|
|
53
|
-
@import
|
|
54
|
-
@import '../upload/styles/index.less';
|
|
1
|
+
@import "./sys.less";
|
|
2
|
+
@import "../alert/styles/index.less";
|
|
3
|
+
@import "../affix/styles/index.less";
|
|
4
|
+
@import "../avatar/styles/index.less";
|
|
5
|
+
@import "../badge/styles/index.less";
|
|
6
|
+
@import "../backtop/styles/index.less";
|
|
7
|
+
@import "../breadcrumb/styles/index.less";
|
|
8
|
+
@import "../button/styles/index.less";
|
|
9
|
+
@import "../card/styles/index.less";
|
|
10
|
+
@import "../colorPicker/styles/index.less";
|
|
11
|
+
@import "../collapse/styles/index.less";
|
|
12
|
+
@import "../carousel/styles/index.less";
|
|
13
|
+
@import "../checkbox/styles/index.less";
|
|
14
|
+
@import "../datePicker/styles/index.less";
|
|
15
|
+
@import "../descriptions/styles/index.less";
|
|
16
|
+
@import "../divider/styles/index.less";
|
|
17
|
+
@import "../drawer/styles/index.less";
|
|
18
|
+
@import "../dropdown/styles/index.less";
|
|
19
|
+
@import "../empty/styles/index.less";
|
|
20
|
+
@import "../form/styles/index.less";
|
|
21
|
+
@import "../flex/styles/index.less";
|
|
22
|
+
@import "../grid/styles/index.less";
|
|
23
|
+
@import "../icon/styles/index.less";
|
|
24
|
+
@import "../input/styles/index.less";
|
|
25
|
+
@import "../inputNumber/styles/index.less";
|
|
26
|
+
@import "../image/styles/index.less";
|
|
27
|
+
@import "../loading/styles/index.less";
|
|
28
|
+
@import "../layout/styles/index.less";
|
|
29
|
+
@import "../modal/styles/index.less";
|
|
30
|
+
@import "../message/styles/index.less";
|
|
31
|
+
@import "../menu/styles/index.less";
|
|
32
|
+
@import "../notice/styles/index.less";
|
|
33
|
+
@import "../page/styles/index.less";
|
|
34
|
+
@import "../poptip/styles/index.less";
|
|
35
|
+
@import "../popconfirm/styles/index.less";
|
|
36
|
+
@import "../progress/styles/index.less";
|
|
37
|
+
@import "../radio/styles/index.less";
|
|
38
|
+
@import "../rate/styles/index.less";
|
|
39
|
+
@import "../space/styles/index.less";
|
|
40
|
+
@import "../select/styles/index.less";
|
|
41
|
+
@import "../skeleton/styles/index.less";
|
|
42
|
+
@import "../slider/styles/index.less";
|
|
43
|
+
@import "../spin/styles/index.less";
|
|
44
|
+
@import "../switch/styles/index.less";
|
|
45
|
+
@import "../statCard/styles/index.less";
|
|
46
|
+
@import "../timeline/styles/index.less";
|
|
47
|
+
@import "../tag/styles/index.less";
|
|
48
|
+
@import "../tooltip/styles/index.less";
|
|
49
|
+
@import "../table/styles/index.less";
|
|
50
|
+
@import "../tree/styles/index.less";
|
|
51
|
+
@import "../treeSelect/styles/index.less";
|
|
52
|
+
@import "../tabs/styles/index.less";
|
|
53
|
+
@import "../upload/styles/index.less";
|
|
@@ -18,7 +18,8 @@ textarea::placeholder {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.k-scroll {
|
|
21
|
-
|
|
21
|
+
/* 滑块颜色 轨道颜色 */
|
|
22
|
+
scrollbar-color: var(--kui-color-scrollbar-thumb) transparent;
|
|
22
23
|
// scrollbar-width: 8px;
|
|
23
24
|
&::-webkit-scrollbar {
|
|
24
25
|
// width: 8px;
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
@import "./color.less";
|
|
2
|
+
|
|
3
|
+
html,
|
|
4
|
+
*[theme-mode="light"],
|
|
5
|
+
*[theme-mode="light"] {
|
|
6
|
+
color-scheme: light;
|
|
7
|
+
--kui-control-height-sm: 24px;
|
|
8
|
+
--kui-control-height: 30px;
|
|
9
|
+
--kui-control-height-lg: 40px;
|
|
10
|
+
--kui-padding-block-sm: 2px;
|
|
11
|
+
--kui-padding-inline-sm: 6px;
|
|
12
|
+
--kui-padding-block: 6px;
|
|
13
|
+
--kui-padding-inline: 8px;
|
|
14
|
+
--kui-padding-block-lg: 6px;
|
|
15
|
+
--kui-padding-inline-lg: 10px;
|
|
16
|
+
--kui-border-radius: @radius;
|
|
17
|
+
--kui-border-card-radius: @cardRadius;
|
|
18
|
+
--kui-border-radius-outer: @radiusOuter;
|
|
19
|
+
--kui-color-default: @default;
|
|
20
|
+
--kui-color-dark: @dark-default;
|
|
21
|
+
--kui-color-main: @main;
|
|
22
|
+
--kui-color-main-hover: @main-hover;
|
|
23
|
+
--kui-color-main-active: @main-active;
|
|
24
|
+
--kui-color-main-10: @main-10;
|
|
25
|
+
--kui-color-main-30: @main-30;
|
|
26
|
+
--kui-color-main-60: @main-60;
|
|
27
|
+
--kui-color-main-80: @main-80;
|
|
28
|
+
--kui-color-main-90: @main-90;
|
|
29
|
+
--kui-color-success: @success;
|
|
30
|
+
--kui-color-success-hover: @success-hover;
|
|
31
|
+
--kui-color-success-active: @success-active;
|
|
32
|
+
--kui-color-success-30: @success-30;
|
|
33
|
+
--kui-color-success-60: @success-60;
|
|
34
|
+
--kui-color-success-80: @success-80;
|
|
35
|
+
--kui-color-success-90: @success-90;
|
|
36
|
+
--kui-color-danger: @danger;
|
|
37
|
+
--kui-color-danger-hover: @danger-hover;
|
|
38
|
+
--kui-color-danger-active: @danger-active;
|
|
39
|
+
--kui-color-danger-30: @danger-30;
|
|
40
|
+
--kui-color-danger-60: @danger-60;
|
|
41
|
+
--kui-color-danger-80: @danger-80;
|
|
42
|
+
--kui-color-danger-90: @danger-90;
|
|
43
|
+
--kui-color-warning: @warning;
|
|
44
|
+
--kui-color-warning-hover: @warning-hover;
|
|
45
|
+
--kui-color-warning-active: @warning-active;
|
|
46
|
+
--kui-color-warning-30: @warning-30;
|
|
47
|
+
--kui-color-warning-60: @warning-60;
|
|
48
|
+
--kui-color-warning-80: @warning-80;
|
|
49
|
+
--kui-color-warning-90: @warning-90;
|
|
50
|
+
--kui-color-pink: @pink;
|
|
51
|
+
--kui-color-pink-30: @pink-30;
|
|
52
|
+
--kui-color-pink-60: @pink-60;
|
|
53
|
+
--kui-color-pink-80: @pink-80;
|
|
54
|
+
--kui-color-pink-90: @pink-90;
|
|
55
|
+
--kui-color-red: @red;
|
|
56
|
+
--kui-color-red-30: @red-30;
|
|
57
|
+
--kui-color-red-60: @red-60;
|
|
58
|
+
--kui-color-red-80: @red-80;
|
|
59
|
+
--kui-color-red-90: @red-90;
|
|
60
|
+
--kui-color-yellow: @yellow;
|
|
61
|
+
--kui-color-yellow-30: @yellow-30;
|
|
62
|
+
--kui-color-yellow-60: @yellow-60;
|
|
63
|
+
--kui-color-yellow-80: @yellow-80;
|
|
64
|
+
--kui-color-yellow-90: @yellow-90;
|
|
65
|
+
--kui-color-orange: @orange;
|
|
66
|
+
--kui-color-orange-30: @orange-30;
|
|
67
|
+
--kui-color-orange-60: @orange-60;
|
|
68
|
+
--kui-color-orange-80: @orange-80;
|
|
69
|
+
--kui-color-orange-90: @orange-90;
|
|
70
|
+
--kui-color-cyan: @cyan;
|
|
71
|
+
--kui-color-cyan-30: @cyan-30;
|
|
72
|
+
--kui-color-cyan-60: @cyan-60;
|
|
73
|
+
--kui-color-cyan-80: @cyan-80;
|
|
74
|
+
--kui-color-cyan-90: @cyan-90;
|
|
75
|
+
--kui-color-green: @green;
|
|
76
|
+
--kui-color-green-30: @green-30;
|
|
77
|
+
--kui-color-green-60: @green-60;
|
|
78
|
+
--kui-color-green-80: @green-80;
|
|
79
|
+
--kui-color-green-90: @green-90;
|
|
80
|
+
--kui-color-blue: @blue;
|
|
81
|
+
--kui-color-blue-30: @blue-30;
|
|
82
|
+
--kui-color-blue-60: @blue-60;
|
|
83
|
+
--kui-color-blue-80: @blue-80;
|
|
84
|
+
--kui-color-blue-90: @blue-90;
|
|
85
|
+
--kui-color-purple: @purple;
|
|
86
|
+
--kui-color-purple-30: @purple-30;
|
|
87
|
+
--kui-color-purple-60: @purple-60;
|
|
88
|
+
--kui-color-purple-80: @purple-80;
|
|
89
|
+
--kui-color-purple-90: @purple-90;
|
|
90
|
+
--kui-color-magenta: @magenta;
|
|
91
|
+
--kui-color-magenta-30: @magenta-30;
|
|
92
|
+
--kui-color-magenta-60: @magenta-60;
|
|
93
|
+
--kui-color-magenta-80: @magenta-80;
|
|
94
|
+
--kui-color-magenta-90: @magenta-90;
|
|
95
|
+
--kui-color-violet: @violet;
|
|
96
|
+
--kui-color-violet-30: @violet-30;
|
|
97
|
+
--kui-color-violet-60: @violet-60;
|
|
98
|
+
--kui-color-violet-80: @violet-80;
|
|
99
|
+
--kui-color-violet-90: @violet-90;
|
|
100
|
+
--kui-color-brown: @brown;
|
|
101
|
+
--kui-color-brown-30: @brown-30;
|
|
102
|
+
--kui-color-brown-60: @brown-60;
|
|
103
|
+
--kui-color-brown-80: @brown-80;
|
|
104
|
+
--kui-color-brown-90: @brown-90;
|
|
105
|
+
--kui-color-teal: @teal;
|
|
106
|
+
--kui-color-teal-30: @teal-30;
|
|
107
|
+
--kui-color-teal-60: @teal-60;
|
|
108
|
+
--kui-color-teal-80: @teal-80;
|
|
109
|
+
--kui-color-teal-90: @teal-90;
|
|
110
|
+
--kui-color-olive: @olive;
|
|
111
|
+
--kui-color-olive-30: @olive-30;
|
|
112
|
+
--kui-color-olive-60: @olive-60;
|
|
113
|
+
--kui-color-olive-80: @olive-80;
|
|
114
|
+
--kui-color-olive-90: @olive-90;
|
|
115
|
+
--kui-color-volcano: @volcano;
|
|
116
|
+
--kui-color-volcano-30: @volcano-30;
|
|
117
|
+
--kui-color-volcano-60: @volcano-60;
|
|
118
|
+
--kui-color-volcano-80: @volcano-80;
|
|
119
|
+
--kui-color-volcano-90: @volcano-90;
|
|
120
|
+
--kui-color-gold: @gold;
|
|
121
|
+
--kui-color-gold-30: @gold-30;
|
|
122
|
+
--kui-color-gold-60: @gold-60;
|
|
123
|
+
--kui-color-gold-80: @gold-80;
|
|
124
|
+
--kui-color-gold-90: @gold-90;
|
|
125
|
+
--kui-color-lime: @lime;
|
|
126
|
+
--kui-color-lime-30: @lime-30;
|
|
127
|
+
--kui-color-lime-60: @lime-60;
|
|
128
|
+
--kui-color-lime-80: @lime-80;
|
|
129
|
+
--kui-color-lime-90: @lime-90;
|
|
130
|
+
--kui-color-gray: @gray;
|
|
131
|
+
--kui-color-gray-30: @gray-30;
|
|
132
|
+
--kui-color-gray-40: @gray-40;
|
|
133
|
+
--kui-color-gray-50: @gray-50;
|
|
134
|
+
--kui-color-gray-60: @gray-60;
|
|
135
|
+
--kui-color-gray-70: @gray-70;
|
|
136
|
+
--kui-color-gray-80: @gray-80;
|
|
137
|
+
--kui-color-gray-90: @gray-90;
|
|
138
|
+
--kui-color-mask: @mask-color;
|
|
139
|
+
--kui-color-spin: @spin-color;
|
|
140
|
+
--kui-color-mask-30: @mask-color-30;
|
|
141
|
+
--kui-color-mask-90: @mask-color-90;
|
|
142
|
+
--kui-color-skeleton: @skeleton-color;
|
|
143
|
+
--kui-color-skeleton-mid: @skeleton-min-color;
|
|
144
|
+
--kui-color-font: @font-color;
|
|
145
|
+
--kui-color-title: @title-color;
|
|
146
|
+
--kui-color-sub-title: @sub-title-color;
|
|
147
|
+
--kui-color-back: @back-color;
|
|
148
|
+
--kui-color-back-10: @back-color-10;
|
|
149
|
+
--kui-color-back-20: @back-color-20;
|
|
150
|
+
--kui-color-back-30: @back-color-30;
|
|
151
|
+
--kui-color-back-40: @back-color-40;
|
|
152
|
+
--kui-color-back-50: @back-color-50;
|
|
153
|
+
--kui-color-back-60: @back-color-60;
|
|
154
|
+
--kui-color-back-70: @back-color-70;
|
|
155
|
+
--kui-color-back-80: @back-color-80;
|
|
156
|
+
--kui-color-back-90: @back-color-90;
|
|
157
|
+
--kui-color-icon: @icon-color;
|
|
158
|
+
--kui-color-icon-hover: @icon-color-hover;
|
|
159
|
+
--kui-color-icon-active: @icon-color-active;
|
|
160
|
+
--kui-color-hover: @hover-color;
|
|
161
|
+
--kui-color-active: @active-color;
|
|
162
|
+
--kui-color-selected: @selected-color;
|
|
163
|
+
--kui-color-border: @border-color;
|
|
164
|
+
--kui-color-disable-border: @disable-border;
|
|
165
|
+
--kui-color-disable-back: @disable-back;
|
|
166
|
+
--kui-color-disabled: @disable-color;
|
|
167
|
+
--kui-color-table-header: #fafafa;
|
|
168
|
+
--kui-color-table-border: #f0f0f0;
|
|
169
|
+
--kui-color-table-hover: #fafafa;
|
|
170
|
+
--kui-color-table-header-hover: #f1f1f1;
|
|
171
|
+
--kui-color-shadow: rgba(0, 0, 0, 0.15);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
[theme-mode="dark"],
|
|
175
|
+
html[theme-mode="dark"],
|
|
176
|
+
*[theme-mode="dark"] {
|
|
177
|
+
color-scheme: dark;
|
|
178
|
+
--kui-color-default: @dark-default;
|
|
179
|
+
--kui-color-dark: @default;
|
|
180
|
+
--kui-color-font: @dark-font-color;
|
|
181
|
+
--kui-color-title: @dark-title-color;
|
|
182
|
+
--kui-color-sub-title: @dark-sub-title-color;
|
|
183
|
+
--kui-color-back: @dark-back-color;
|
|
184
|
+
--kui-color-back-10: @dark-back-color-10;
|
|
185
|
+
--kui-color-back-20: @dark-back-color-20;
|
|
186
|
+
--kui-color-back-30: @dark-back-color-30;
|
|
187
|
+
--kui-color-back-40: @dark-back-color-40;
|
|
188
|
+
--kui-color-back-50: @dark-back-color-50;
|
|
189
|
+
--kui-color-back-60: @dark-back-color-60;
|
|
190
|
+
--kui-color-back-70: @dark-back-color-70;
|
|
191
|
+
--kui-color-back-80: @dark-back-color-80;
|
|
192
|
+
--kui-color-back-90: @dark-back-color-90;
|
|
193
|
+
--kui-color-spin: @dark-spin-color;
|
|
194
|
+
--kui-color-selected: @selected-color;
|
|
195
|
+
--kui-color-icon: @dark-icon-color;
|
|
196
|
+
--kui-color-icon-hover: @dark-icon-color-hover;
|
|
197
|
+
--kui-color-icon-active: @dark-icon-color-active;
|
|
198
|
+
--kui-color-border: @dark-border-color;
|
|
199
|
+
--kui-color-disable-border: @dark-disable-border;
|
|
200
|
+
--kui-color-disable-back: @dark-disable-back;
|
|
201
|
+
--kui-color-disabled: @dark-disable-color;
|
|
202
|
+
--kui-color-table-header: #262626;
|
|
203
|
+
--kui-color-table-border: #303030;
|
|
204
|
+
--kui-color-table-hover: #262626;
|
|
205
|
+
--kui-color-table-header-hover: #303030;
|
|
206
|
+
--kui-color-shadow: rgba(0, 0, 0, 0.65);
|
|
207
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import Basic from
|
|
2
|
-
import Info from
|
|
3
|
-
import WithText from
|
|
4
|
-
import Disabled from
|
|
5
|
-
import Size from
|
|
6
|
-
import Loading from
|
|
7
|
-
import CN from
|
|
1
|
+
import Basic from "./basic.md";
|
|
2
|
+
import Info from "./info.md";
|
|
3
|
+
import WithText from "./withText.md";
|
|
4
|
+
import Disabled from "./disabled.md";
|
|
5
|
+
import Size from "./size.md";
|
|
6
|
+
import Loading from "./loading.md";
|
|
7
|
+
import CN from "../index.md";
|
|
8
8
|
export default {
|
|
9
9
|
render() {
|
|
10
10
|
return (
|
|
@@ -17,6 +17,6 @@ export default {
|
|
|
17
17
|
<Loading />
|
|
18
18
|
<CN />
|
|
19
19
|
</div>
|
|
20
|
-
)
|
|
21
|
-
}
|
|
22
|
-
}
|
|
20
|
+
);
|
|
21
|
+
},
|
|
22
|
+
};
|
|
@@ -25,14 +25,7 @@
|
|
|
25
25
|
</Space>
|
|
26
26
|
</template>
|
|
27
27
|
<script setup>
|
|
28
|
-
import {
|
|
29
|
-
Checkmark,
|
|
30
|
-
Close,
|
|
31
|
-
LogoApple,
|
|
32
|
-
LogoMicrosoft,
|
|
33
|
-
Airplane,
|
|
34
|
-
Wifi,
|
|
35
|
-
} from "kui-icons";
|
|
28
|
+
import { Checkmark, Close, LogoApple, LogoMicrosoft, Airplane, Wifi } from "kui-icons";
|
|
36
29
|
import { ref } from "vue";
|
|
37
30
|
const checked = ref(false);
|
|
38
31
|
</script>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import Switch from
|
|
2
|
-
export default Switch
|
|
1
|
+
import Switch from "./switch.jsx";
|
|
2
|
+
export default Switch;
|
|
@@ -4,16 +4,9 @@ import { defineComponent, ref, watch } from "vue";
|
|
|
4
4
|
import { withInstall } from "../utils/vue";
|
|
5
5
|
const Switch = defineComponent({
|
|
6
6
|
name: "KSwitch",
|
|
7
|
-
model: {
|
|
8
|
-
prop: "checked",
|
|
9
|
-
event: "input",
|
|
10
|
-
},
|
|
11
7
|
props: {
|
|
12
|
-
checked:
|
|
13
|
-
|
|
14
|
-
default: false,
|
|
15
|
-
},
|
|
16
|
-
// checked: [Boolean, Number], //for 3
|
|
8
|
+
checked: [Boolean, Number], //for 3
|
|
9
|
+
modelValue: [Boolean, Number], //for 2
|
|
17
10
|
type: String,
|
|
18
11
|
disabled: Boolean,
|
|
19
12
|
loading: Boolean,
|
|
@@ -27,7 +20,13 @@ const Switch = defineComponent({
|
|
|
27
20
|
falseText: String,
|
|
28
21
|
},
|
|
29
22
|
setup(ps, { slots, emit }) {
|
|
30
|
-
const isChecked = ref(ps.checked);
|
|
23
|
+
const isChecked = ref(ps.modelValue || ps.checked);
|
|
24
|
+
watch(
|
|
25
|
+
() => ps.modelValue,
|
|
26
|
+
(nv, no) => {
|
|
27
|
+
isChecked.value = nv;
|
|
28
|
+
}
|
|
29
|
+
);
|
|
31
30
|
watch(
|
|
32
31
|
() => ps.checked,
|
|
33
32
|
(nv, no) => {
|
|
@@ -40,8 +39,7 @@ const Switch = defineComponent({
|
|
|
40
39
|
}
|
|
41
40
|
const checked = !isChecked.value;
|
|
42
41
|
isChecked.value = checked;
|
|
43
|
-
|
|
44
|
-
emit("input", checked); //for 3
|
|
42
|
+
emit("update:modelValue", checked); //for 2
|
|
45
43
|
emit("change", checked);
|
|
46
44
|
};
|
|
47
45
|
|
|
@@ -56,28 +54,18 @@ const Switch = defineComponent({
|
|
|
56
54
|
["k-switch-sm"]: ps.size == "small",
|
|
57
55
|
},
|
|
58
56
|
];
|
|
59
|
-
const children =
|
|
60
|
-
|
|
61
|
-
const loadNode = loading ? (
|
|
62
|
-
<Icon spin type={Loading} class="k-switch-loading" />
|
|
63
|
-
) : null;
|
|
57
|
+
const children = slots.checked?.() || trueText || slots.unchecked?.() || falseText;
|
|
58
|
+
const loadNode = loading ? <Icon spin type={Loading} class="k-switch-loading" /> : null;
|
|
64
59
|
|
|
65
60
|
const textNode =
|
|
66
61
|
size != "small" && children ? (
|
|
67
62
|
<span class="k-switch-inner">
|
|
68
|
-
{isChecked.value
|
|
69
|
-
? slots.checked?.() || trueText
|
|
70
|
-
: slots.unchecked?.() || falseText}
|
|
63
|
+
{isChecked.value ? slots.checked?.() || trueText : slots.unchecked?.() || falseText}
|
|
71
64
|
</span>
|
|
72
65
|
) : null;
|
|
73
66
|
|
|
74
67
|
return (
|
|
75
|
-
<button
|
|
76
|
-
class={classes}
|
|
77
|
-
onClick={change}
|
|
78
|
-
disabled={disabled || loading}
|
|
79
|
-
type="button"
|
|
80
|
-
>
|
|
68
|
+
<button class={classes} onClick={change} disabled={disabled || loading} type="button">
|
|
81
69
|
{textNode}
|
|
82
70
|
{loadNode}
|
|
83
71
|
</button>
|
|
@@ -2,13 +2,17 @@
|
|
|
2
2
|
### 基本用法(使用render)
|
|
3
3
|
使用自定义`render`来初始化表格
|
|
4
4
|
</cn>
|
|
5
|
+
<en>
|
|
6
|
+
### Basic Usage (Using render)
|
|
7
|
+
Use a custom render to render the table cells.
|
|
8
|
+
</en>
|
|
5
9
|
|
|
6
10
|
```vue
|
|
7
11
|
<template>
|
|
8
12
|
<Table :data="data" :sticky="52" :columns="columns" />
|
|
9
13
|
</template>
|
|
10
14
|
<script setup>
|
|
11
|
-
import { modal } from "kui-vue";
|
|
15
|
+
import { modal, Icon, Space, Button, Tag } from "kui-vue";
|
|
12
16
|
import { Sunny, Moon } from "kui-icons";
|
|
13
17
|
const data = [
|
|
14
18
|
{
|
|
@@ -51,12 +55,10 @@ const columns = [
|
|
|
51
55
|
title: "Gender",
|
|
52
56
|
key: "gender",
|
|
53
57
|
render: (h, { gender }, i) => {
|
|
54
|
-
return h(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
size: 15,
|
|
59
|
-
},
|
|
58
|
+
return h(Icon, {
|
|
59
|
+
type: gender == 1 ? Sunny : Moon,
|
|
60
|
+
color: gender == 1 ? "blue" : "#f50cff",
|
|
61
|
+
size: 15,
|
|
60
62
|
});
|
|
61
63
|
},
|
|
62
64
|
},
|
|
@@ -65,14 +67,12 @@ const columns = [
|
|
|
65
67
|
title: "Tags",
|
|
66
68
|
key: "tags",
|
|
67
69
|
render: (h, { tags }, i) => {
|
|
68
|
-
return h(
|
|
70
|
+
return h(Space, {}, [
|
|
69
71
|
tags.map(function (tag) {
|
|
70
72
|
return h(
|
|
71
|
-
|
|
73
|
+
Tag,
|
|
72
74
|
{
|
|
73
|
-
|
|
74
|
-
color: tag == "Python" ? "green" : "blue",
|
|
75
|
-
},
|
|
75
|
+
color: tag == "Python" ? "green" : "blue",
|
|
76
76
|
},
|
|
77
77
|
tag
|
|
78
78
|
);
|
|
@@ -85,18 +85,14 @@ const columns = [
|
|
|
85
85
|
key: "action",
|
|
86
86
|
render: (h, record, i) => {
|
|
87
87
|
return h(
|
|
88
|
-
|
|
88
|
+
Button,
|
|
89
89
|
{
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
title: "More",
|
|
97
|
-
content: `My name is ${record.name}`,
|
|
98
|
-
});
|
|
99
|
-
},
|
|
90
|
+
size: "small",
|
|
91
|
+
onClick: (e) => {
|
|
92
|
+
modal.info({
|
|
93
|
+
title: "More",
|
|
94
|
+
content: `My name is ${record.name}`,
|
|
95
|
+
});
|
|
100
96
|
},
|
|
101
97
|
},
|
|
102
98
|
"more"
|
|
@@ -1,27 +1,24 @@
|
|
|
1
1
|
<cn>
|
|
2
2
|
### 基本用法
|
|
3
3
|
一个普通的表格
|
|
4
|
-
</cn>
|
|
4
|
+
</cn>
|
|
5
|
+
<en>
|
|
6
|
+
### Basic Usage
|
|
7
|
+
A normal table
|
|
8
|
+
</en>
|
|
5
9
|
|
|
6
10
|
```vue
|
|
7
11
|
<template>
|
|
8
12
|
<Table :data="data" :columns="columns" @rowClick="rowClick" :sticky="52">
|
|
9
13
|
<template #tags="{ value }">
|
|
10
14
|
<Space>
|
|
11
|
-
<Tag
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
:color="tag == 'Python' ? 'green' : 'blue'"
|
|
15
|
-
>{{ tag }}</Tag
|
|
16
|
-
>
|
|
15
|
+
<Tag v-for="tag in value" :key="tag" :color="tag == 'Python' ? 'green' : 'blue'">{{
|
|
16
|
+
tag
|
|
17
|
+
}}</Tag>
|
|
17
18
|
</Space>
|
|
18
19
|
</template>
|
|
19
20
|
<template #gender="{ value }">
|
|
20
|
-
<Icon
|
|
21
|
-
:type="value == 1 ? Sunny : Moon"
|
|
22
|
-
:color="value == 1 ? 'blue' : '#f50cff'"
|
|
23
|
-
size="15"
|
|
24
|
-
/>
|
|
21
|
+
<Icon :type="value == 1 ? Sunny : Moon" :color="value == 1 ? 'blue' : '#f50cff'" size="15" />
|
|
25
22
|
</template>
|
|
26
23
|
<template #action="{ value, record, col }">
|
|
27
24
|
<Button size="small" @click.stop="(e) => show(record)">more</Button>
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
### 自定义页头和页脚
|
|
3
3
|
添加表格边框线,页头和页脚。
|
|
4
4
|
</cn>
|
|
5
|
+
<en>
|
|
6
|
+
### Custom Header and Footer
|
|
7
|
+
Add borders to the table, header, and footer.
|
|
8
|
+
</en>
|
|
5
9
|
|
|
6
10
|
```vue
|
|
7
11
|
<template>
|
|
@@ -10,9 +14,7 @@
|
|
|
10
14
|
<a>{{ value }}</a>
|
|
11
15
|
</template>
|
|
12
16
|
<template #price="{ value }">
|
|
13
|
-
<span :class="{ 'test-table-price': value > 20000 }">
|
|
14
|
-
¥{{ value }}/㎡
|
|
15
|
-
</span>
|
|
17
|
+
<span :class="{ 'test-table-price': value > 20000 }"> ¥{{ value }}/㎡ </span>
|
|
16
18
|
</template>
|
|
17
19
|
<template #header> Header </template>
|
|
18
20
|
<template #footer> Footer </template>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<cn>
|
|
2
|
-
###
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
### Table Row/Column Span
|
|
3
|
+
Headers support only column spanning; use colSpan inside column definitions to configure.
|
|
4
|
+
The table supports row and column spanning; in renders, use cell props colSpan or rowSpan. When set to 0, the cell will not render.
|
|
5
5
|
</cn>
|
|
6
6
|
|
|
7
7
|
```vue
|
|
@@ -22,7 +22,7 @@ const columns = [
|
|
|
22
22
|
key: "name",
|
|
23
23
|
width: 100,
|
|
24
24
|
// 第三行第一列向下合并一行
|
|
25
|
-
rowSpan: (record, index) => (index == 2 ?
|
|
25
|
+
rowSpan: (record, index) => (index == 2 ? 2 : 1),
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
title: "年龄",
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
<cn>
|
|
2
2
|
### 固定头/列
|
|
3
3
|
对于列数很多的数据,可以固定前后的列,横向滚动查看其它数据,需要设置表格的宽度 `scroll.x` 和 `scroll.y `
|
|
4
|
-
如果布局被破坏,请把宽度 `x` 值改大。支持: { y:`calc(100% - 500px)` }
|
|
5
4
|
</cn>
|
|
5
|
+
<en>
|
|
6
|
+
### Fixed Header / Columns
|
|
7
|
+
For tables with many columns, fix the left and/or right columns and horizontally scroll the rest. You need to set the table width with scroll.x and scroll.y.
|
|
8
|
+
If the layout is disrupted, increase the x width value. Supports: { y: `calc(100% - 500px)` }
|
|
9
|
+
</en>
|
|
6
10
|
|
|
7
11
|
```vue
|
|
8
12
|
<template>
|