bkui-vue 0.0.1-beta.45 → 0.0.1-beta.450
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.txt +14 -0
- package/dist/index.cjs.js +160 -35
- package/dist/index.esm.js +35568 -14524
- package/dist/index.umd.js +160 -35
- package/dist/locale/en.esm.js +2 -0
- package/dist/locale/en.esm.js.map +1 -0
- package/dist/locale/en.umd.js +2 -0
- package/dist/locale/en.umd.js.map +1 -0
- package/dist/locale/zh-cn.esm.js +2 -0
- package/dist/locale/zh-cn.esm.js.map +1 -0
- package/dist/locale/zh-cn.umd.js +2 -0
- package/dist/locale/zh-cn.umd.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -0
- package/lib/affix/affix.css +3 -0
- package/lib/affix/affix.d.ts +47 -0
- package/lib/affix/affix.less +5 -0
- package/lib/affix/affix.variable.css +125 -0
- package/lib/affix/index.d.ts +143 -0
- package/lib/affix/index.js +1 -0
- package/lib/alert/alert.css +9 -3
- package/lib/alert/alert.d.ts +5 -5
- package/lib/alert/alert.less +29 -20
- package/lib/alert/alert.variable.css +41 -7
- package/lib/alert/index.d.ts +11 -11
- package/lib/alert/index.js +1 -1
- package/lib/animate-number/animate-number.d.ts +1 -1
- package/lib/animate-number/index.d.ts +4 -4
- package/lib/backtop/backtop.css +8 -0
- package/lib/backtop/backtop.d.ts +3 -3
- package/lib/backtop/backtop.less +8 -0
- package/lib/backtop/backtop.variable.css +40 -4
- package/lib/backtop/index.d.ts +10 -10
- package/lib/backtop/index.js +1 -1
- package/lib/badge/badge.css +7 -10
- package/lib/badge/badge.d.ts +28 -7
- package/lib/badge/badge.less +9 -11
- package/lib/badge/badge.variable.css +39 -14
- package/lib/badge/index.d.ts +68 -18
- package/lib/badge/index.js +1 -1
- package/lib/breadcrumb/breadcrumb-item.d.ts +4 -2
- package/lib/breadcrumb/breadcrumb.css +51 -0
- package/lib/breadcrumb/breadcrumb.variable.css +88 -9
- package/lib/breadcrumb/index.d.ts +4 -2
- package/lib/breadcrumb/index.js +1 -1
- package/lib/button/button-group.d.ts +2 -2
- package/lib/button/button.css +85 -50
- package/lib/button/button.d.ts +44 -24
- package/lib/button/button.less +72 -42
- package/lib/button/button.variable.css +117 -54
- package/lib/button/index.d.ts +74 -44
- package/lib/button/index.js +1 -1
- package/lib/card/card.css +97 -2
- package/lib/card/card.d.ts +47 -6
- package/lib/card/card.less +50 -2
- package/lib/card/card.variable.css +133 -10
- package/lib/card/index.d.ts +113 -17
- package/lib/card/index.js +1 -1
- package/lib/cascader/cascader-panel.d.ts +101 -0
- package/lib/cascader/cascader.css +316 -0
- package/lib/cascader/cascader.d.ts +342 -0
- package/lib/cascader/cascader.less +283 -0
- package/lib/cascader/cascader.variable.css +438 -0
- package/lib/cascader/index.d.ts +961 -0
- package/lib/cascader/index.js +1 -0
- package/lib/cascader/interface.d.ts +51 -0
- package/lib/cascader/node.d.ts +31 -0
- package/lib/cascader/store.d.ts +25 -0
- package/lib/checkbox/checkbox-group.d.ts +16 -0
- package/lib/checkbox/checkbox.css +51 -11
- package/lib/checkbox/checkbox.d.ts +36 -24
- package/lib/checkbox/checkbox.less +85 -32
- package/lib/checkbox/checkbox.variable.css +83 -15
- package/lib/checkbox/common.d.ts +4 -3
- package/lib/checkbox/index.d.ts +70 -38
- package/lib/checkbox/index.js +1 -1
- package/lib/checkbox/type.d.ts +2 -6
- package/lib/code-diff/code-diff.css +27 -7
- package/lib/code-diff/code-diff.d.ts +1 -1
- package/lib/code-diff/code-diff.less +42 -7
- package/lib/code-diff/code-diff.variable.css +59 -11
- package/lib/code-diff/index.js +1 -1
- package/lib/collapse/collapse-panel.d.ts +103 -0
- package/lib/collapse/collapse.css +69 -14
- package/lib/collapse/collapse.d.ts +66 -52
- package/lib/collapse/collapse.less +112 -30
- package/lib/collapse/collapse.variable.css +191 -14
- package/lib/collapse/index.d.ts +266 -20
- package/lib/collapse/index.js +1 -1
- package/lib/collapse/props.d.ts +131 -0
- package/lib/collapse/utils.d.ts +11 -0
- package/lib/collapse-transition/collapse-transition.css +93 -0
- package/lib/collapse-transition/collapse-transition.d.ts +15 -0
- package/lib/collapse-transition/collapse-transition.less +111 -0
- package/lib/collapse-transition/collapse-transition.variable.css +215 -0
- package/lib/collapse-transition/index.d.ts +2 -0
- package/lib/collapse-transition/index.js +1 -0
- package/lib/color-picker/color-picker.css +275 -0
- package/lib/color-picker/color-picker.d.ts +144 -0
- package/lib/color-picker/color-picker.less +325 -0
- package/lib/color-picker/color-picker.variable.css +397 -0
- package/lib/color-picker/components/color-input.d.ts +42 -0
- package/lib/color-picker/components/hue-slider.d.ts +41 -0
- package/lib/color-picker/components/input-container.d.ts +42 -0
- package/lib/color-picker/components/recommend-colors.d.ts +51 -0
- package/lib/color-picker/components/saturation-panel.d.ts +41 -0
- package/lib/color-picker/index.d.ts +254 -0
- package/lib/color-picker/index.js +1 -0
- package/lib/color-picker/utils.d.ts +37 -0
- package/lib/components.d.ts +31 -8
- package/lib/components.js +1 -0
- package/lib/config-provider/config-provider.css +0 -0
- package/lib/config-provider/config-provider.d.ts +384 -0
- package/lib/config-provider/config-provider.less +1 -0
- package/lib/config-provider/config-provider.variable.css +122 -0
- package/lib/config-provider/index.d.ts +585 -0
- package/lib/config-provider/index.js +1 -0
- package/lib/config-provider/token.d.ts +122 -0
- package/lib/config-provider/use-global-config.d.ts +5 -0
- package/lib/config-provider/use-locale.d.ts +3 -0
- package/lib/config-provider/use-prefix.d.ts +9 -0
- package/lib/container/col.d.ts +51 -0
- package/lib/container/container.css +91 -0
- package/lib/container/container.d.ts +83 -0
- package/lib/container/container.less +20 -0
- package/lib/container/container.variable.css +213 -0
- package/lib/container/index.d.ts +223 -0
- package/lib/container/index.js +1 -0
- package/lib/container/row.d.ts +4 -0
- package/lib/date-picker/base/confirm.d.ts +74 -0
- package/lib/date-picker/base/date-table.d.ts +96 -0
- package/lib/date-picker/base/month-table.d.ts +117 -0
- package/lib/date-picker/base/picker-dropdown.d.ts +74 -0
- package/lib/date-picker/base/time-spinner.d.ts +170 -0
- package/lib/date-picker/base/year-table.d.ts +117 -0
- package/lib/date-picker/date-picker.css +28 -1
- package/lib/date-picker/date-picker.d.ts +49 -20
- package/lib/date-picker/date-picker.less +106 -74
- package/lib/date-picker/date-picker.variable.css +60 -5
- package/lib/date-picker/index.d.ts +121 -54
- package/lib/date-picker/index.js +1 -1
- package/lib/date-picker/interface.d.ts +11 -1
- package/lib/date-picker/panel/date-range.d.ts +328 -0
- package/lib/date-picker/panel/date.d.ts +206 -0
- package/lib/date-picker/panel/time-range.d.ts +489 -0
- package/lib/date-picker/panel/time.d.ts +448 -0
- package/lib/date-picker/props.d.ts +55 -5
- package/lib/date-picker/time-picker.d.ts +381 -0
- package/lib/date-picker/utils.d.ts +22 -2
- package/lib/dialog/dialog.css +136 -24
- package/lib/dialog/dialog.d.ts +245 -58
- package/lib/dialog/dialog.less +100 -38
- package/lib/dialog/dialog.variable.css +258 -24
- package/lib/dialog/index.d.ts +545 -126
- package/lib/dialog/index.js +1 -1
- package/lib/dialog/props.d.ts +122 -0
- package/lib/directives/ellipsis.d.ts +7 -0
- package/lib/directives/index.d.ts +2 -0
- package/lib/directives/index.js +1 -1
- package/lib/directives/tooltips.d.ts +2 -1
- package/lib/dist.index.js +1 -0
- package/lib/divider/divider.d.ts +15 -15
- package/lib/divider/divider.variable.css +32 -4
- package/lib/divider/index.d.ts +34 -34
- package/lib/divider/index.js +1 -1
- package/lib/divider/props.d.ts +6 -6
- package/lib/dropdown/dropdown.css +13 -7
- package/lib/dropdown/dropdown.d.ts +46 -14
- package/lib/dropdown/dropdown.less +47 -34
- package/lib/dropdown/dropdown.variable.css +45 -11
- package/lib/dropdown/index.d.ts +99 -35
- package/lib/dropdown/index.js +1 -1
- package/lib/exception/exception.css +40 -14
- package/lib/exception/exception.d.ts +31 -11
- package/lib/exception/exception.less +59 -22
- package/lib/exception/exception.variable.css +72 -18
- package/lib/exception/index.d.ts +43 -26
- package/lib/exception/index.js +1 -1
- package/lib/exception/typings/index.d.ts +4 -0
- package/lib/fixed-navbar/fixed-navbar.d.ts +16 -2
- package/lib/fixed-navbar/fixed-navbar.variable.css +32 -4
- package/lib/fixed-navbar/index.d.ts +40 -5
- package/lib/fixed-navbar/index.js +1 -1
- package/lib/form/compose-form-item.d.ts +16 -0
- package/lib/form/form-item.d.ts +22 -7
- package/lib/form/form.css +103 -15
- package/lib/form/form.d.ts +48 -14
- package/lib/form/form.less +152 -46
- package/lib/form/form.variable.css +225 -15
- package/lib/form/index.d.ts +121 -35
- package/lib/form/index.js +1 -1
- package/lib/form/type.d.ts +11 -8
- package/lib/form/utils.d.ts +2 -0
- package/lib/form/validator.d.ts +1 -0
- package/lib/hooks.d.ts +1 -0
- package/lib/hooks.js +1 -0
- package/lib/icon/angle-double-down-line.js +1 -1
- package/lib/icon/angle-double-left-line.js +1 -1
- package/lib/icon/angle-double-left.js +1 -1
- package/lib/icon/angle-double-right-line.js +1 -1
- package/lib/icon/angle-double-right.js +1 -1
- package/lib/icon/angle-double-up-line.js +1 -1
- package/lib/icon/angle-down-fill.js +1 -1
- package/lib/icon/angle-down-line.js +1 -1
- package/lib/icon/angle-down.js +1 -1
- package/lib/icon/angle-left.js +1 -1
- package/lib/icon/angle-right.js +1 -1
- package/lib/icon/angle-up-fill.js +1 -1
- package/lib/icon/angle-up.js +1 -1
- package/lib/icon/archive-fill.d.ts +4 -0
- package/lib/icon/archive-fill.js +1 -0
- package/lib/icon/arrows-left.js +1 -1
- package/lib/icon/arrows-right.js +1 -1
- package/lib/icon/audio-fill.d.ts +4 -0
- package/lib/icon/audio-fill.js +1 -0
- package/lib/icon/bk.js +1 -1
- package/lib/icon/circle.js +1 -1
- package/lib/icon/close-line.d.ts +4 -0
- package/lib/icon/close-line.js +1 -0
- package/lib/icon/close.js +1 -1
- package/lib/icon/code.js +1 -1
- package/lib/icon/cog-shape.js +1 -1
- package/lib/icon/collapse-left.js +1 -1
- package/lib/icon/copy.js +1 -1
- package/lib/icon/data-shape.d.ts +4 -0
- package/lib/icon/data-shape.js +1 -0
- package/lib/icon/del.d.ts +4 -0
- package/lib/icon/del.js +1 -0
- package/lib/icon/doc-fill.d.ts +4 -0
- package/lib/icon/doc-fill.js +1 -0
- package/lib/icon/done.js +1 -1
- package/lib/icon/down-shape.js +1 -1
- package/lib/icon/down-small.js +1 -1
- package/lib/icon/edit-line.d.ts +4 -0
- package/lib/icon/edit-line.js +1 -0
- package/lib/icon/ellipsis.js +1 -1
- package/lib/icon/enlarge-line.d.ts +4 -0
- package/lib/icon/enlarge-line.js +1 -0
- package/lib/icon/error.js +1 -1
- package/lib/icon/excel-fill.d.ts +4 -0
- package/lib/icon/excel-fill.js +1 -0
- package/lib/icon/exclamation-circle-shape.d.ts +4 -0
- package/lib/icon/exclamation-circle-shape.js +1 -0
- package/lib/icon/eye.js +1 -1
- package/lib/icon/filliscreen-line.d.ts +4 -0
- package/lib/icon/filliscreen-line.js +1 -0
- package/lib/icon/folder-open.js +1 -1
- package/lib/icon/folder-shape-open.js +1 -1
- package/lib/icon/folder-shape.js +1 -1
- package/lib/icon/folder.js +1 -1
- package/lib/icon/funnel.d.ts +4 -0
- package/lib/icon/funnel.js +1 -0
- package/lib/icon/help-document-fill.js +1 -1
- package/lib/icon/help-fill.js +1 -1
- package/lib/icon/help.js +1 -1
- package/lib/icon/image-fill.d.ts +4 -0
- package/lib/icon/img-error.d.ts +4 -0
- package/lib/icon/img-error.js +1 -0
- package/lib/icon/img-placehoulder.d.ts +4 -0
- package/lib/icon/img-placehoulder.js +1 -0
- package/lib/icon/index.d.ts +79 -53
- package/lib/icon/index.js +1 -1
- package/lib/icon/info-line.js +1 -1
- package/lib/icon/info.js +1 -1
- package/lib/icon/left-shape.js +1 -1
- package/lib/icon/left-turn-line.d.ts +4 -0
- package/lib/icon/left-turn-line.js +1 -0
- package/lib/icon/narrow-line.d.ts +4 -0
- package/lib/icon/narrow-line.js +1 -0
- package/lib/icon/original.d.ts +4 -0
- package/lib/icon/original.js +1 -0
- package/lib/icon/pdf-fill.d.ts +4 -0
- package/lib/icon/pdf-fill.js +1 -0
- package/lib/icon/play-shape.js +1 -1
- package/lib/icon/plus.js +1 -1
- package/lib/icon/ppt-fill.d.ts +4 -0
- package/lib/icon/ppt-fill.js +1 -0
- package/lib/icon/qq.js +1 -1
- package/lib/icon/right-shape.js +1 -1
- package/lib/icon/right-turn-line.d.ts +4 -0
- package/lib/icon/right-turn-line.js +1 -0
- package/lib/icon/search.js +1 -1
- package/lib/icon/share.js +1 -1
- package/lib/icon/spinner.js +1 -1
- package/lib/icon/success.js +1 -1
- package/lib/icon/switcher-loading.js +1 -1
- package/lib/icon/text-file.js +1 -1
- package/lib/icon/text-fill.d.ts +4 -0
- package/lib/icon/text-fill.js +1 -0
- package/lib/icon/transfer.d.ts +4 -0
- package/lib/icon/transfer.js +1 -0
- package/lib/icon/tree-application-shape.js +1 -1
- package/lib/icon/unfull-screen.d.ts +4 -0
- package/lib/icon/unfull-screen.js +1 -0
- package/lib/icon/unvisible.js +1 -1
- package/lib/icon/up-shape.js +1 -1
- package/lib/icon/upload.d.ts +4 -0
- package/lib/icon/upload.js +1 -0
- package/lib/icon/video-fill.d.ts +4 -0
- package/lib/icon/video-fill.js +1 -0
- package/lib/icon/warn.js +1 -1
- package/lib/icon/weixin.js +1 -1
- package/lib/image/image-viewer.css +142 -0
- package/lib/image/image-viewer.d.ts +73 -0
- package/lib/image/image-viewer.less +168 -0
- package/lib/image/image-viewer.variable.css +142 -0
- package/lib/image/image.css +37 -0
- package/lib/image/image.d.ts +93 -0
- package/lib/image/image.less +44 -0
- package/lib/image/image.variable.css +37 -0
- package/lib/image/index.d.ts +246 -0
- package/lib/image/index.js +1 -0
- package/lib/image/props.d.ts +71 -0
- package/lib/index.d.ts +3 -1
- package/lib/index.js +1 -0
- package/lib/info-box/index.d.ts +7 -0
- package/lib/info-box/index.js +1 -0
- package/lib/info-box/info-box.css +37 -0
- package/lib/info-box/info-box.d.ts +28 -0
- package/lib/info-box/info-box.less +51 -0
- package/lib/info-box/info-box.variable.css +159 -0
- package/lib/input/index.d.ts +175 -90
- package/lib/input/index.js +1 -1
- package/lib/input/input.css +183 -19
- package/lib/input/input.d.ts +119 -36
- package/lib/input/input.less +112 -18
- package/lib/input/input.variable.css +246 -55
- package/lib/link/index.d.ts +29 -21
- package/lib/link/index.js +1 -1
- package/lib/link/link.css +12 -12
- package/lib/link/link.d.ts +10 -8
- package/lib/link/link.less +16 -14
- package/lib/link/link.variable.css +44 -16
- package/lib/loading/directive.d.ts +14 -0
- package/lib/loading/index.d.ts +135 -19
- package/lib/loading/index.js +1 -1
- package/lib/loading/loading.css +86 -33
- package/lib/loading/loading.d.ts +94 -12
- package/lib/loading/loading.less +27 -23
- package/lib/loading/loading.variable.css +134 -53
- package/lib/locale/index.d.ts +3 -0
- package/lib/locale/index.js +1 -0
- package/lib/locale/lang/en.d.ts +120 -0
- package/lib/locale/lang/zh-cn.d.ts +3 -0
- package/lib/menu/index.d.ts +16 -24
- package/lib/menu/index.js +1 -1
- package/lib/menu/menu.css +51 -0
- package/lib/menu/menu.d.ts +7 -16
- package/lib/menu/menu.variable.css +101 -22
- package/lib/menu/submenu.variable.css +32 -4
- package/lib/message/index.js +1 -1
- package/lib/message/message.css +17 -5
- package/lib/message/message.less +21 -6
- package/lib/message/message.variable.css +49 -9
- package/lib/message/messageConstructor.d.ts +14 -11
- package/lib/modal/index.d.ts +470 -78
- package/lib/modal/index.js +1 -1
- package/lib/modal/modal.css +63 -1
- package/lib/modal/modal.d.ts +177 -30
- package/lib/modal/modal.less +39 -3
- package/lib/modal/modal.variable.css +185 -1
- package/lib/modal/props.mixin.d.ts +74 -13
- package/lib/navigation/index.d.ts +310 -1
- package/lib/navigation/index.js +1 -1
- package/lib/navigation/navigation.css +1 -1
- package/lib/navigation/navigation.d.ts +11 -2
- package/lib/navigation/navigation.less +1 -1
- package/lib/navigation/navigation.variable.css +33 -5
- package/lib/notify/index.js +1 -1
- package/lib/notify/notify.css +25 -5
- package/lib/notify/notify.less +29 -6
- package/lib/notify/notify.variable.css +57 -9
- package/lib/notify/notifyConstructor.d.ts +62 -21
- package/lib/overflow-title/components/overflow-title.d.ts +57 -0
- package/lib/overflow-title/directive/overflow-title.d.ts +3 -0
- package/lib/overflow-title/index.d.ts +170 -0
- package/lib/overflow-title/index.js +1 -0
- package/lib/overflow-title/overflow.css +11 -0
- package/lib/overflow-title/overflow.less +13 -0
- package/lib/overflow-title/overflow.variable.css +11 -0
- package/lib/overflow-title/props.d.ts +43 -0
- package/lib/overflow-title/utils/getActualWidthByCanvas.d.ts +3 -0
- package/lib/overflow-title/utils/getActualWidthByDom.d.ts +3 -0
- package/lib/pagination/index.d.ts +35 -20
- package/lib/pagination/index.js +1 -1
- package/lib/pagination/pagination.css +54 -28
- package/lib/pagination/pagination.d.ts +18 -8
- package/lib/pagination/pagination.less +59 -30
- package/lib/pagination/pagination.variable.css +86 -32
- package/lib/pagination/use-limit.d.ts +3 -1
- package/lib/pagination/use-total.d.ts +3 -1
- package/lib/plugin-popover/index.d.ts +27 -0
- package/lib/plugin-popover/index.js +1 -0
- package/lib/plugins/index.d.ts +1 -0
- package/lib/plugins/index.js +1 -0
- package/lib/pop-confirm/index.d.ts +246 -0
- package/lib/pop-confirm/index.js +1 -0
- package/lib/pop-confirm/pop-confirm.css +28 -0
- package/lib/pop-confirm/pop-confirm.d.ts +95 -0
- package/lib/pop-confirm/pop-confirm.less +34 -0
- package/lib/pop-confirm/pop-confirm.variable.css +150 -0
- package/lib/pop-confirm/props.d.ts +67 -0
- package/lib/popover/arrow.d.ts +2 -0
- package/lib/popover/const.d.ts +16 -0
- package/lib/popover/content.d.ts +43 -0
- package/lib/popover/index.d.ts +504 -97
- package/lib/popover/index.js +1 -1
- package/lib/popover/plugin-popover.d.ts +12 -0
- package/lib/popover/popover.css +10 -50
- package/lib/popover/popover.d.ts +222 -43
- package/lib/popover/popover.less +19 -66
- package/lib/popover/popover.variable.css +42 -54
- package/lib/popover/props.d.ts +110 -30
- package/lib/popover/reference.d.ts +2 -0
- package/lib/popover/root.d.ts +16 -0
- package/lib/popover/use-floating.d.ts +34 -0
- package/lib/popover/use-platform.d.ts +30 -0
- package/lib/popover/use-popover-init.d.ts +23 -0
- package/lib/popover/use-popper-id.d.ts +6 -0
- package/lib/popover/utils.d.ts +8 -0
- package/lib/popover2/index.d.ts +44 -0
- package/lib/popover2/index.js +1 -0
- package/lib/popover2/popover.d.ts +2 -0
- package/lib/preset.d.ts +252 -2
- package/lib/preset.js +1 -0
- package/lib/process/index.d.ts +9 -9
- package/lib/process/index.js +1 -1
- package/lib/process/process.css +22 -0
- package/lib/process/process.d.ts +2 -2
- package/lib/process/process.less +30 -2
- package/lib/process/process.variable.css +54 -4
- package/lib/progress/index.d.ts +31 -31
- package/lib/progress/index.js +1 -1
- package/lib/progress/progress.css +51 -0
- package/lib/progress/progress.d.ts +12 -12
- package/lib/progress/progress.variable.css +87 -8
- package/lib/radio/common.d.ts +5 -5
- package/lib/radio/index.d.ts +36 -18
- package/lib/radio/index.js +1 -1
- package/lib/radio/radio-button.d.ts +7 -8
- package/lib/radio/radio-group.d.ts +26 -0
- package/lib/radio/radio.css +137 -66
- package/lib/radio/radio.d.ts +4 -4
- package/lib/radio/radio.less +262 -173
- package/lib/radio/radio.variable.css +172 -73
- package/lib/radio/type.d.ts +9 -4
- package/lib/rate/index.d.ts +28 -5
- package/lib/rate/index.js +1 -1
- package/lib/rate/rate.d.ts +13 -2
- package/lib/rate/star.d.ts +1 -1
- package/lib/resize-layout/index.d.ts +18 -18
- package/lib/resize-layout/index.js +1 -1
- package/lib/resize-layout/resize-layout.css +6 -15
- package/lib/resize-layout/resize-layout.d.ts +7 -7
- package/lib/resize-layout/resize-layout.less +10 -19
- package/lib/resize-layout/resize-layout.variable.css +38 -19
- package/lib/search-select/index.d.ts +891 -0
- package/lib/search-select/index.js +1 -0
- package/lib/search-select/input.d.ts +101 -0
- package/lib/search-select/menu.d.ts +77 -0
- package/lib/search-select/search-select.css +427 -0
- package/lib/search-select/search-select.d.ts +361 -0
- package/lib/search-select/search-select.less +384 -0
- package/lib/search-select/search-select.variable.css +549 -0
- package/lib/search-select/selected.d.ts +155 -0
- package/lib/search-select/utils.d.ts +88 -0
- package/lib/select/common.d.ts +5 -12
- package/lib/select/index.d.ts +1816 -691
- package/lib/select/index.js +1 -1
- package/lib/select/option.d.ts +18 -4
- package/lib/select/optionGroup.d.ts +1 -1
- package/lib/select/select.css +202 -113
- package/lib/select/select.d.ts +715 -147
- package/lib/select/select.less +335 -197
- package/lib/select/select.variable.css +234 -117
- package/lib/select/selectTagInput.d.ts +94 -0
- package/lib/select/type.d.ts +21 -13
- package/lib/shared/dom.d.ts +3 -0
- package/lib/shared/helper.d.ts +9 -0
- package/lib/shared/hooks/use-form-item.d.ts +2 -0
- package/lib/shared/hooks/use-form.d.ts +2 -0
- package/lib/shared/index.d.ts +32 -7
- package/lib/shared/index.js +1 -1
- package/lib/shared/mask-manager.d.ts +13 -5
- package/lib/shared/pop-manager.d.ts +19 -5
- package/lib/shared/popover.d.ts +6 -2
- package/lib/shared/token.d.ts +4 -0
- package/lib/shared/utils.d.ts +19 -0
- package/lib/shared/vue-types.d.ts +107 -7
- package/lib/sideslider/index.d.ts +343 -69
- package/lib/sideslider/index.js +1 -1
- package/lib/sideslider/sideslider.css +58 -11
- package/lib/sideslider/sideslider.d.ts +160 -31
- package/lib/sideslider/sideslider.less +75 -14
- package/lib/sideslider/sideslider.variable.css +90 -15
- package/lib/slider/index.d.ts +414 -1
- package/lib/slider/index.js +1 -1
- package/lib/slider/slider-button.d.ts +2 -1
- package/lib/slider/slider.d.ts +4 -4
- package/lib/slider/slider.variable.css +32 -4
- package/lib/steps/index.d.ts +52 -52
- package/lib/steps/index.js +1 -1
- package/lib/steps/steps.css +15 -3
- package/lib/steps/steps.d.ts +32 -32
- package/lib/steps/steps.less +24 -3
- package/lib/steps/steps.variable.css +47 -7
- package/lib/styles/index.d.ts +10 -1
- package/lib/styles/mixins/clearfix.css +8 -0
- package/lib/styles/mixins/clearfix.less +10 -0
- package/lib/styles/mixins/clearfix.variable.css +8 -0
- package/lib/styles/mixins/mixins.css +51 -0
- package/lib/styles/mixins/mixins.less +2 -0
- package/lib/styles/mixins/mixins.variable.css +51 -0
- package/lib/styles/mixins/popper.css +1 -1
- package/lib/styles/mixins/popper.less +12 -11
- package/lib/styles/mixins/popper.variable.css +123 -1
- package/lib/styles/mixins/scroll.css +17 -0
- package/lib/styles/mixins/scroll.less +22 -0
- package/lib/styles/mixins/scroll.variable.css +139 -0
- package/lib/styles/reset.css +36 -0
- package/lib/styles/reset.less +26 -2
- package/lib/styles/reset.variable.css +36 -0
- package/lib/styles/themes/themes.less +42 -4
- package/lib/switcher/index.d.ts +42 -30
- package/lib/switcher/index.js +1 -1
- package/lib/switcher/switcher.css +57 -6
- package/lib/switcher/switcher.d.ts +19 -13
- package/lib/switcher/switcher.less +5 -26
- package/lib/switcher/switcher.variable.css +106 -27
- package/lib/tab/index.d.ts +121 -67
- package/lib/tab/index.js +1 -1
- package/lib/tab/props.d.ts +93 -41
- package/lib/tab/tab-nav.d.ts +50 -14
- package/lib/tab/tab-panel.d.ts +14 -7
- package/lib/tab/tab.css +151 -55
- package/lib/tab/tab.d.ts +42 -21
- package/lib/tab/tab.less +179 -86
- package/lib/tab/tab.variable.css +183 -59
- package/lib/table/cache.d.ts +6 -0
- package/lib/table/components/index.d.ts +3 -0
- package/lib/table/components/table-cell.d.ts +51 -0
- package/lib/table/components/table-column.d.ts +299 -0
- package/lib/table/components/table-row.d.ts +2 -0
- package/lib/table/const.d.ts +125 -1
- package/lib/table/index.d.ts +1375 -48
- package/lib/table/index.js +1 -1
- package/lib/table/plugins/body-empty.d.ts +36 -0
- package/lib/table/plugins/col-group.d.ts +38 -0
- package/lib/table/plugins/common.d.ts +6 -0
- package/lib/table/plugins/head-filter.css +84 -0
- package/lib/table/plugins/head-filter.d.ts +26 -0
- package/lib/table/plugins/head-filter.less +110 -0
- package/lib/table/plugins/head-filter.variable.css +206 -0
- package/lib/table/plugins/head-sort.css +26 -0
- package/lib/table/plugins/head-sort.d.ts +29 -0
- package/lib/table/plugins/head-sort.less +32 -0
- package/lib/table/plugins/head-sort.variable.css +148 -0
- package/lib/table/plugins/index.d.ts +5 -0
- package/lib/table/plugins/settings.css +147 -0
- package/lib/table/plugins/settings.d.ts +37 -0
- package/lib/table/plugins/settings.less +181 -0
- package/lib/table/plugins/settings.variable.css +269 -0
- package/lib/table/plugins/use-active-columns.d.ts +16 -0
- package/lib/table/plugins/use-column-resize.d.ts +15 -0
- package/lib/table/plugins/use-fixed-column.d.ts +26 -0
- package/lib/table/plugins/use-pagination.d.ts +16 -0
- package/lib/table/plugins/use-scroll-loading.d.ts +5 -0
- package/lib/table/props.d.ts +358 -11
- package/lib/table/render.d.ts +54 -31
- package/lib/table/table.css +1250 -38
- package/lib/table/table.d.ts +258 -18
- package/lib/table/table.less +314 -42
- package/lib/table/table.variable.css +1291 -51
- package/lib/table/use-column.d.ts +12 -0
- package/lib/table/use-common.d.ts +113 -0
- package/lib/table/utils.d.ts +60 -13
- package/lib/table-column/index.d.ts +790 -0
- package/lib/table-column/index.js +1 -0
- package/lib/tag/index.d.ts +29 -29
- package/lib/tag/index.js +1 -1
- package/lib/tag/tag.css +46 -13
- package/lib/tag/tag.d.ts +12 -12
- package/lib/tag/tag.less +46 -10
- package/lib/tag/tag.variable.css +78 -17
- package/lib/tag-input/common.d.ts +13 -1
- package/lib/tag-input/index.d.ts +1406 -1
- package/lib/tag-input/index.js +1 -1
- package/lib/tag-input/list-tag-render.d.ts +0 -3
- package/lib/tag-input/tag-input.css +23 -26
- package/lib/tag-input/tag-input.d.ts +303 -44
- package/lib/tag-input/tag-input.less +102 -104
- package/lib/tag-input/tag-input.variable.css +55 -30
- package/lib/tag-input/tag-props.d.ts +141 -7
- package/lib/tag-input/tag-render.d.ts +30 -4
- package/lib/time-picker/index.d.ts +904 -0
- package/lib/time-picker/index.js +1 -0
- package/lib/time-picker/time-picker.css +215 -0
- package/lib/time-picker/time-picker.less +260 -0
- package/lib/time-picker/time-picker.variable.css +337 -0
- package/lib/timeline/index.d.ts +6 -6
- package/lib/timeline/index.js +1 -1
- package/lib/timeline/timeline.css +16 -9
- package/lib/timeline/timeline.d.ts +1 -1
- package/lib/timeline/timeline.less +22 -9
- package/lib/timeline/timeline.variable.css +48 -13
- package/lib/transfer/const.d.ts +5 -0
- package/lib/transfer/index.d.ts +247 -150
- package/lib/transfer/index.js +1 -1
- package/lib/transfer/props.d.ts +59 -0
- package/lib/transfer/transfer.css +153 -92
- package/lib/transfer/transfer.d.ts +101 -95
- package/lib/transfer/transfer.less +142 -112
- package/lib/transfer/transfer.variable.css +191 -102
- package/lib/tree/constant.d.ts +62 -0
- package/lib/tree/index.d.ts +379 -60
- package/lib/tree/index.js +1 -1
- package/lib/tree/props.d.ts +124 -0
- package/lib/tree/tree.css +181 -9
- package/lib/tree/tree.d.ts +172 -19
- package/lib/tree/tree.less +54 -3
- package/lib/tree/tree.variable.css +213 -13
- package/lib/tree/use-empty.d.ts +6 -0
- package/lib/tree/use-node-action.d.ts +12 -0
- package/lib/tree/use-node-async.d.ts +5 -0
- package/lib/tree/use-node-attribute.d.ts +33 -0
- package/lib/tree/use-node-drag.d.ts +3 -0
- package/lib/tree/use-search.d.ts +11 -0
- package/lib/tree/use-tree-init.d.ts +15 -0
- package/lib/tree/util.d.ts +4 -6
- package/lib/upload/index.d.ts +566 -0
- package/lib/upload/index.js +1 -0
- package/lib/upload/props.d.ts +111 -0
- package/lib/upload/upload-list.d.ts +47 -0
- package/lib/upload/upload-trigger.d.ts +51 -0
- package/lib/upload/upload.css +427 -0
- package/lib/upload/upload.d.ts +246 -0
- package/lib/upload/upload.less +466 -0
- package/lib/upload/upload.type.d.ts +78 -0
- package/lib/upload/upload.variable.css +549 -0
- package/lib/upload/use-ajax-upload.d.ts +3 -0
- package/lib/upload/use-file-handler.d.ts +44 -0
- package/lib/virtual-render/index.d.ts +50 -4
- package/lib/virtual-render/index.js +1 -1
- package/lib/virtual-render/props.d.ts +15 -0
- package/lib/virtual-render/use-tag-render.d.ts +7 -0
- package/lib/virtual-render/v-virtual-render.d.ts +0 -1
- package/lib/virtual-render/virtual-render.css +17 -17
- package/lib/virtual-render/virtual-render.d.ts +23 -1
- package/lib/virtual-render/virtual-render.less +2 -23
- package/lib/virtual-render/virtual-render.variable.css +139 -17
- package/lib/volar.components.d.ts +102 -0
- package/package.json +59 -26
- package/LICENSE.txt +0 -22
- package/lib/form/common.d.ts +0 -3
- package/lib/use-form.d.ts +0 -3
@@ -0,0 +1 @@
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("vue-types"),require("../config-provider"),require("../directives"),require("../icon"),require("../popover"),require("../tag"),require("../checkbox"));else if("function"==typeof define&&define.amd)define(["../shared","vue","vue-types","../config-provider","../directives","../icon","../popover","../tag","../checkbox"],t);else{var r="object"==typeof exports?t(require("../shared"),require("vue"),require("vue-types"),require("../config-provider"),require("../directives"),require("../icon"),require("../popover"),require("../tag"),require("../checkbox")):t(e["../shared"],e.vue,e["vue-types"],e["../config-provider"],e["../directives"],e["../icon"],e["../popover"],e["../tag"],e["../checkbox"]);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(self,((e,t,r,n,o,a,i,s,l)=>(()=>{var c={7162:(e,t,r)=>{r(5047)},5047:e=>{var t=function(e){"use strict";var t,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),i=new L(n||[]);return a._invoke=function(e,t,r){var n=d;return function(o,a){if(n===p)throw new Error("Generator is already running");if(n===f){if("throw"===o)throw a;return O()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var s=P(i,r);if(s){if(s===v)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===d)throw n=f,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var l=u(e,t,r);if("normal"===l.type){if(n=r.done?f:h,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n=f,r.method="throw",r.arg=l.arg)}}}(e,r,i),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var d="suspendedStart",h="suspendedYield",p="executing",f="completed",v={};function g(){}function y(){}function m(){}var b={};l(b,a,(function(){return this}));var N=Object.getPrototypeOf,k=N&&N(N(E([])));k&&k!==r&&n.call(k,a)&&(b=k);var T=m.prototype=g.prototype=Object.create(b);function w(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function r(o,a,i,s){var l=u(e[o],e,a);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==typeof d&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,i,s)}),(function(e){r("throw",e,i,s)})):t.resolve(d).then((function(e){c.value=e,i(c)}),(function(e){return r("throw",e,i,s)}))}s(l.arg)}var o;this._invoke=function(e,n){function a(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(a,a):a()}}function P(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method))return v;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=u(n,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var a=o.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function V(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function E(e){if(e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}return{next:O}}function O(){return{value:t,done:!0}}return y.prototype=m,l(T,"constructor",m),l(m,"constructor",y),y.displayName=l(m,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,l(e,s,"GeneratorFunction")),e.prototype=Object.create(T),e},e.awrap=function(e){return{__await:e}},w(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new x(c(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(T),l(T,s,"Generator"),l(T,a,(function(){return this})),l(T,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=E,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(V),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),V(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;V(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:E(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},5800:e=>{"use strict";e.exports=l},2717:e=>{"use strict";e.exports=n},4061:e=>{"use strict";e.exports=o},6870:e=>{"use strict";e.exports=a},5537:e=>{"use strict";e.exports=i},4212:t=>{"use strict";t.exports=e},7739:e=>{"use strict";e.exports=s},748:e=>{"use strict";e.exports=t},210:e=>{"use strict";e.exports=r}},u={};function d(e){var t=u[e];if(void 0!==t)return t.exports;var r=u[e]={exports:{}};return c[e](r,r.exports,d),r.exports}d.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return d.d(t,{a:t}),t},d.d=(e,t)=>{for(var r in t)d.o(t,r)&&!d.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var h={};return(()=>{"use strict";d.r(h),d.d(h,{BkCascader:()=>w,BkCascaderPanel:()=>f,default:()=>x});var e=d(4212),t=d(748),r=d(210),n=d(2717),o=d(4061),a=d(6870),i=d(5537),s=d.n(i),l=d(7739),c=d.n(l);d(7162),Symbol("BkSelect"),Symbol("BkOptionGroup");var u=d(5800),p=d.n(u);const f=(0,t.defineComponent)({name:"CascaderPanel",props:{width:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]).def("auto"),height:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]).def(216),store:e.PropTypes.object.def({}),separator:e.PropTypes.string.def(""),suggestions:e.PropTypes.arrayOf((0,r.object)()),isFiltering:e.PropTypes.bool.def(!1),searchKey:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def(""),modelValue:e.PropTypes.arrayOf(e.PropTypes.oneOfType([(0,r.array)(),String,Number]))},emits:["update:modelValue"],setup:function(r,o){var i=o.emit,s=(0,n.useLocale)("select"),l=r.store,c=(0,t.reactive)({list:[r.store.getNodes()]}),u=(0,t.ref)([]),d=(0,t.ref)([]),h=function(e){return"number"==typeof e?"".concat(e,"px"):e},p=h(r.height),f=h(r.width),v=function(e){e.isDisabled||(e.config.multiple?d.value=l.getCheckedNodes().map((function(e){return e.path})):d.value=e.path,i("update:modelValue",d.value))},g=function(e){var t;if(e&&!(null==e?void 0:e.isDisabled)){if(c.list=c.list.slice(0,e.level),u.value=u.value.slice(0,e.level-1),null===(t=e.children)||void 0===t?void 0:t.length)return c.list.push(e.children),void u.value.push(e);l.config.isRemote&&!e.isLeaf&&(e.loading=!0,l.config.remoteMethod(e,(function(t){l.appendNodes(t,e||null),c.list.push(e.children),u.value.push(e),e.loading=!1})))}},y=s.value.noData,m=function(e,t){e.setNodeCheck(t||!1),v(e)};return(0,t.watch)((function(){return r.modelValue}),(function(e){!function(e){0===e.length&&(c.list=c.list.slice(0,1),u.value=[]),e.forEach((function(e){var t=l.getNodeById(e);g(t)})),d.value=e}(e)}),{immediate:!0}),(0,t.watch)((function(){return r.store}),(function(e){c.list=[e.getNodes()]})),{menus:c,activePath:u,nodeExpandHandler:g,isNodeInPath:function(e){return(u.value[e.level-1]||{}).id===e.id},nodeEvent:function(e){var t=e.config,r=t.trigger,n=t.checkAnyLevel,o=t.multiple;return{onClick:function(t){e.isLeaf&&!o||t.stopPropagation(),"click"===r&&g(e),n&&!o&&v(e),e.isLeaf&&!o&&v(e)},onMouseenter:function(){"hover"===r&&g(e)}}},isCheckedNode:function(t,r){return t.config.multiple?r.some((function(r){return(0,e.arrayEqual)(r,t.path)})):(0,e.arrayEqual)(r,t.path)},checkValue:d,checkNode:m,iconRender:function(e){return e.loading?(0,t.createVNode)(a.Spinner,{class:"icon-spinner"},null):(0,t.createVNode)(a.AngleRight,{class:"icon-angle-right"},null)},panelWidth:f,panelHeight:p,searchPanelEvents:function(e){var t=e.config.multiple;return{onClick:function(r){if(t)return r.stopPropagation(),void m(e,!e.checked);g(e),e.isLeaf&&!t&&v(e)}}},noDataText:y}},render:function(){var r=this,n=parseInt(this.panelWidth,10)>200?this.panelWidth:"".concat(200,"px");return(0,t.createVNode)("div",{class:(0,e.resolveClassName)("cascader-panel-wrapper")},[this.isFiltering?r.suggestions.length?(0,t.createVNode)("ul",{class:[(0,e.resolveClassName)("cascader-panel"),"bk-scroll-y"],style:{height:r.panelHeight,width:r.panelWidth}},[r.suggestions.map((function(n){return(0,t.createVNode)("li",(0,t.mergeProps)({class:[(0,e.resolveClassName)("cascader-node"),{"is-selected":r.isNodeInPath(n)},{"is-disabled":n.isDisabled},{"is-checked":r.isCheckedNode(n,r.checkValue)}]},r.searchPanelEvents(n)),[n.pathNames.join(r.separator)])}))]):(0,t.createVNode)("div",{class:(0,e.resolveClassName)("cascader-search-empty"),style:{width:n}},[(0,t.createVNode)("span",null,[(0,t.createTextVNode)("暂无搜索结果")])]):this.menus.list.map((function(n){return(0,t.createVNode)("ul",{class:[(0,e.resolveClassName)("cascader-panel"),"bk-scroll-y"],style:{height:r.panelHeight,width:r.panelWidth}},[n.length?n.map((function(n){var o,a;return(0,t.createVNode)("li",(0,t.mergeProps)({class:[(0,e.resolveClassName)("cascader-node"),{"is-selected":r.isNodeInPath(n)},{"is-disabled":n.isDisabled},{"is-checked":!n.config.multiple&&r.isCheckedNode(n,r.checkValue)}]},Object.assign(r.nodeEvent(n),(n.config.multiple,{}))),[n.config.multiple&&(0,t.createVNode)(p(),{disabled:n.isDisabled,modelValue:n.checked,"onUpdate:modelValue":function(e){return n.checked=e},indeterminate:n.isIndeterminate,style:"margin-right: 5px",onChange:function(e){return r.checkNode(n,e)}},null),null===(a=(o=r.$slots).default)||void 0===a?void 0:a.call(o,{node:n,data:n.data}),n.isLeaf?"":r.iconRender(n)])})):(0,t.createVNode)("div",{class:(0,e.resolveClassName)("cascader-panel-empty-wrapper")},[r.noDataText])])}))])}});function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function y(e,t,r){return t&&g(e.prototype,t),r&&g(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function m(e){return!!e.data.disabled||(1!==e.level?m(e.parent):e.data.disabled)}const b=function(){function t(e,r,n){v(this,t),this.data=e,this.config=r,this.parent=n||null,this.leaf=e.leaf,this.level=this.parent?this.parent.level+1:1,this.initState()}return y(t,[{key:"initState",value:function(){var e=this,r=this.config,n=r.idKey,o=r.nameKey,a=r.childrenKey;this.id=this.data[n],this.name=this.data[o],this.loading=!1,this.loaded=!1,this.checked=!1;var i=this.data[a];this.children=(i||[]).map((function(r){return new t(r,e.config,e)})),this.pathNodes=this.calculateNodesPath(),this.path=this.pathNodes.map((function(e){return e.id})),this.pathNames=this.pathNodes.map((function(e){return e.name}))}},{key:"isLeaf",get:function(){var e;return this.config.isRemote?this.leaf||!!this.loaded&&!this.children.length:!(Array.isArray(this.children)&&0!==(null===(e=this.children)||void 0===e?void 0:e.length))}},{key:"isDisabled",get:function(){return m(this)}},{key:"broadcast",value:function(t,r){var n="onParent".concat((0,e.capitalize)(t));this.children.forEach((function(e){var o;e&&(e.broadcast(t,r),null===(o=e[n])||void 0===o||o.call(e,r))}))}},{key:"emit",value:function(t){var r,n=this.parent,o="onChild".concat((0,e.capitalize)(t));n&&(null===(r=n[o])||void 0===r||r.call(n),n.emit(t))}},{key:"onParentCheck",value:function(e){this.isDisabled||this.setCheckState(e)}},{key:"onChildCheck",value:function(){var e=this.children.filter((function(e){return!e.isDisabled})),t=!!e.length&&e.every((function(e){return e.checked}));this.setCheckState(t)}},{key:"setCheckState",value:function(e){var t=this.children.length,r=this.children.reduce((function(e,t){var r=t.isIndeterminate?.5:0;return e+(t.checked?1:r)}),0);this.checked=e,this.isIndeterminate=r!==t&&r>0}},{key:"setNodeCheck",value:function(e){if(this.checked!==e){if(this.config.checkAnyLevel)return void(this.checked=e);this.broadcast("check",e),this.setCheckState(e),this.emit("check")}}},{key:"calculateNodesPath",value:function(){for(var e=[this],t=this.parent;t;)e.unshift(t),t=t.parent;return e}}]),t}();var N=function e(t,r){return t.reduce((function(t,n){return n.isLeaf?t.push(n):(!r&&t.push(n),t=t.concat(e(n.children,r))),t}),[])};const k=function(){function t(e){var r=this;v(this,t);var n=e.list;this.data=n,this.config=e,this.nodes=this.data.map((function(e){return new b(e,r.config)}))}return y(t,[{key:"getNodes",value:function(){return this.nodes}},{key:"clearChecked",value:function(){this.getFlattedNodes().forEach((function(e){e.checked=!1,e.isIndeterminate=!1}))}},{key:"removeTag",value:function(t){this.getFlattedNodes().find((function(r){return!!(0,e.arrayEqual)(t,r.path)&&(r.checked=!1,!0)}))}},{key:"getFlattedNodes",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return N(this.nodes,e)}},{key:"setNodesCheck",value:function(t){var r=this;this.getFlattedNodes().forEach((function(n){n.checked=!1;var o=t.find((function(t){return(0,e.arrayEqual)(n.path,t)}));o&&(r.getNodeByValue(o).checked=!0)}))}},{key:"getCheckedNodes",value:function(){return this.getFlattedNodes().filter((function(e){return e.checked}))}},{key:"getNodeByValue",value:function(t){var r;return null!==(r=this.getFlattedNodes().filter((function(r){return(0,e.arrayEqual)(r.path,t)}))[0])&&void 0!==r?r:null}},{key:"getNodeById",value:function(e){return this.getFlattedNodes().find((function(t){return t.id===e}))}},{key:"appendNode",value:function(e,t){var r=new b(e,this.config,t);(t?t.children:this.nodes).push(r)}},{key:"appendNodes",value:function(e,t){var r=this;e.forEach((function(e){return r.appendNode(e,t)}))}}]),t}(),T=(0,t.defineComponent)({name:"Cascader",directives:{bkTooltips:o.bkTooltips},components:{CascaderPanel:f,BkPopover:s(),Tag:c()},props:{modelValue:e.PropTypes.arrayOf(e.PropTypes.oneOfType([(0,r.array)(),String,Number])),list:e.PropTypes.array.def([]),placeholder:e.PropTypes.string.def(""),behavior:e.PropTypes.string.def("normal"),filterable:e.PropTypes.bool.def(!1),multiple:e.PropTypes.bool.def(!1),disabled:e.PropTypes.bool.def(!1),clearable:e.PropTypes.bool.def(!0),trigger:e.PropTypes.string.def("click"),checkAnyLevel:e.PropTypes.bool.def(!1),isRemote:e.PropTypes.bool.def(!1),remoteMethod:e.PropTypes.func,showCompleteName:e.PropTypes.bool.def(!0),idKey:e.PropTypes.string.def("id"),nameKey:e.PropTypes.string.def("name"),childrenKey:e.PropTypes.string.def("children"),separator:e.PropTypes.string.def("/"),limitOneLine:e.PropTypes.bool.def(!1),extCls:e.PropTypes.string.def(""),scrollHeight:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]).def(216),scrollWidth:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]).def("auto"),collapseTags:{type:Boolean,default:!0},floatMode:{type:Boolean,default:!1}},emits:["update:modelValue","change","clear","toggle","focus"],setup:function(r,o){var a=o.emit,i=(0,n.useLocale)("select"),s=r.separator,l=r.multiple,c=function(){var e=(0,t.ref)(!1);return{isHover:e,setHover:function(){e.value=!0},cancelHover:function(){e.value=!1}}}(),u=c.isHover,d=c.setHover,h=c.cancelHover,p=(0,t.ref)(new k(r)),f=(0,t.ref)(""),v=(0,t.ref)([]),g=(0,t.toRefs)(r).modelValue,y=(0,t.ref)(),m=(0,t.ref)(""),b=(0,t.ref)([]),N=(0,t.ref)(!1),T=(0,t.ref)(!1),w=(0,t.ref)(!1),x=(0,t.computed)({get:function(){return g.value},set:function(e){a("update:modelValue",e)}}),P=(0,t.ref)(null),C=(0,t.ref)(null),V=(0,t.ref)(null),L=(0,t.computed)((function(){return r.placeholder?r.placeholder:i.value.pleaseSelect})),E=function(e){return r.showCompleteName?e.pathNames.join(s):e.pathNames[e.pathNames.length-1]},O=function(e){var t;if(l)return p.value.setNodesCheck(e),v.value=p.value.getCheckedNodes().map((function(e){return{text:E(e),key:e.id}})),void(f.value=v.value.map((function(e){return e.text})).join(", "));if(!r.checkAnyLevel&&(null===(t=null==P?void 0:P.value)||void 0===t||t.hide()),0===e.length)f.value="";else{var n=p.value.getNodeByValue(e);if(!n)return;f.value=E(n)}m.value=f.value},S=(0,e.debounce)(200,(function(e){var t=e.target;if(m.value=t.value,""!==m.value){N.value=!0;var n=p.value.getFlattedNodes().filter((function(e){return(r.checkAnyLevel||e.isLeaf)&&e.pathNames.join(r.separator).includes(m.value)}));b.value=n,!(null==P?void 0:P.value.isShow)&&(null==P||P.value.show())}else N.value=!1})),j=function(){a("focus")};(0,t.watch)((function(){return r.modelValue}),(function(e,t){var r;O(e),a("update:modelValue",e),void 0!==t&&a("change",e),null===(r=null==V?void 0:V.value)||void 0===r||r.focus()}),{immediate:!0}),(0,t.watch)((function(){return r.list}),(function(){p.value=new k(r),O(r.modelValue)}),{deep:!0,immediate:!0});var I=(0,t.computed)((function(){return v.value.map((function(e){return e.text}))})),q=(0,t.computed)((function(){return r.collapseTags?r.collapseTags&&w.value:r.collapseTags})),H=function(e,r,n){(0,t.watch)([n,r],(function(){a()}),{flush:"post"});var o=(0,t.ref)(null),a=function(){r.value&&(o.value=null,setTimeout((function(){var t=Array.from(e.value.querySelectorAll(".tag-item")),r=t.findIndex((function(e,r){return!!r&&t[r-1].offsetTop!==e.offsetTop}));o.value=r>0?r-1:null})))};return{overflowTagIndex:o}}(C,(0,t.computed)((function(){return r.collapseTags?r.collapseTags&&T.value:r.collapseTags})),I),F=H.overflowTagIndex;return{calcuPlaceholder:L,bkCascaderRef:C,inputRef:V,overflowTagIndex:F,isCollapse:q,isFocus:w,store:p,updateValue:O,selectedText:f,checkedValue:x,handleClear:function(e){e.stopPropagation(),p.value.clearChecked(),m.value="",O([]),a("update:modelValue",[]),a("clear",JSON.parse(JSON.stringify(r.modelValue)))},isHover:u,setHover:d,popover:P,cancelHover:h,selectedTags:v,removeTag:function(e,t,r){r.stopPropagation();var n=JSON.parse(JSON.stringify(e)),o=n.splice(t,1)[0];T.value=!0,p.value.removeTag(o),O(n),a("update:modelValue",p.value.getCheckedNodes().map((function(e){return e.path}))),setTimeout((function(){T.value=w.value}))},cascaderPanel:y,popoverChangeEmitter:function(e){a("toggle",e.isShow),T.value=e.isShow,w.value=e.isShow,(0,t.nextTick)((function(){var t;e&&(null===(t=V.value)||void 0===t||t.focus())})),e.isShow&&j(),e.isShow||(N.value=!1)},searchKey:m,suggestions:b,isFiltering:N,searchInputHandler:S,focusEmitter:j,tagList:I,isEdit:T}},render:function(){var r=this;this.overflowTagIndex=0===this.overflowTagIndex?1:this.overflowTagIndex;var n=this.tagList.reduce((function(e,t,n){return null!==r.overflowTagIndex&&n>=r.overflowTagIndex&&e.push(t),e}),[]),o=function(){return(0,t.createVNode)(s(),{placement:"bottom-start",theme:"light ".concat((0,e.resolveClassName)("cascader-popover")),trigger:"click",arrow:!1,disabled:r.disabled,class:(0,e.resolveClassName)("cascader-popover-wrapper"),ref:"popover",onAfterHidden:r.popoverChangeEmitter,onAfterShow:r.popoverChangeEmitter,boundary:"body"},{default:function(){return r.$slots.trigger?r.$slots.trigger({selected:r.modelValue}):(0,t.createVNode)("div",{class:[(0,e.resolveClassName)("cascader-name"),"bk-scroll-y"]},[r.multiple&&r.selectedTags.length>0&&(r.limitOneLine?(0,t.createVNode)("span",{class:"cascader-selected-text"},[r.selectedText]):(0,t.createVNode)("div",{class:"cascader-tag-list"},[r.tagList.map((function(n,o){var i=!r.isCollapse&&null!==r.overflowTagIndex&&o>=r.overflowTagIndex;return(0,t.createVNode)("span",{class:"tag-item",style:{display:i?"none":""},key:n},[(0,t.createVNode)("span",{class:"tag-item-name"},[n]),(0,t.createVNode)(a.Error,{class:(0,e.resolveClassName)("icon-clear-icon"),onClick:function(e){e.stopPropagation(),r.removeTag(r.modelValue,o,e)}},null)])})),null!==r.overflowTagIndex&&!r.isCollapse&&(0,t.withDirectives)((0,t.createVNode)(c(),{style:"margin-top: 0"},{default:function(){return[(0,t.createTextVNode)("+"),r.selectedTags.length-r.overflowTagIndex]}}),[[(0,t.resolveDirective)("bk-tooltips"),n.join(", ")]])])),r.filterable?(r.isCollapse||0===r.selectedTags.length)&&(0,t.createVNode)("input",{class:[(0,e.resolveClassName)("cascader-search-input"),{"is-disabled":r.disabled}],type:"text",onInput:r.searchInputHandler,placeholder:r.calcuPlaceholder,value:r.searchKey,disabled:r.disabled,ref:"inputRef"},null):r.multiple?null:(0,t.createVNode)("span",null,[r.selectedText])])},content:function(){return(0,t.createVNode)("div",{class:(0,e.resolveClassName)("cascader-popover")},[(0,t.createVNode)(f,{store:r.store,ref:"cascaderPanel",width:r.scrollWidth,height:r.scrollHeight,"search-key":r.searchKey,separator:r.separator,"is-filtering":r.isFiltering,suggestions:r.suggestions,modelValue:r.checkedValue,"onUpdate:modelValue":function(e){return r.checkedValue=e}},{default:function(n){return r.$slots.default?r.$slots.default(n):(0,t.createVNode)("span",{class:(0,e.resolveClassName)("cascader-node-name")},[n.node.name])}})])}})};return(0,t.createVNode)("div",{class:[(0,e.resolveClassName)("cascader-wrapper"),this.floatMode?"float-mode":""]},[this.$slots.trigger?o():(0,t.createVNode)("div",{class:[(0,e.resolveClassName)("cascader"),this.extCls,{"is-unselected":0===this.modelValue.length,"is-hover":this.isHover,"is-filterable":this.filterable,"is-focus":this.isFocus,"is-disabled":this.disabled,"is-simplicity":"simplicity"===this.behavior}],tabindex:"0","data-placeholder":this.calcuPlaceholder,onMouseenter:this.setHover,onMouseleave:this.cancelHover,ref:"bkCascaderRef"},[r.clearable&&r.isHover&&!r.disabled?(0,t.createVNode)(a.Close,{class:(0,e.resolveClassName)("icon-clear-icon"),onClick:r.handleClear},null):(0,t.createVNode)(a.AngleUp,{class:(0,e.resolveClassName)("icon-angle-up")},null),o()])])}});var w=(0,e.withInstallProps)(T,{CascaderPanel:f});const x=w})(),h})()));
|
@@ -0,0 +1,51 @@
|
|
1
|
+
export interface IPanel {
|
2
|
+
id: string;
|
3
|
+
name: string;
|
4
|
+
disabled?: boolean;
|
5
|
+
children?: IPanel;
|
6
|
+
}
|
7
|
+
export interface INodeConfig {
|
8
|
+
multiple: boolean;
|
9
|
+
}
|
10
|
+
export interface INode {
|
11
|
+
checked: boolean;
|
12
|
+
children?: (null)[] | null;
|
13
|
+
config: IConfig;
|
14
|
+
data: IData;
|
15
|
+
leaf: boolean;
|
16
|
+
id: string;
|
17
|
+
level: number;
|
18
|
+
loading: boolean;
|
19
|
+
loaded: boolean;
|
20
|
+
name: string;
|
21
|
+
parent?: INode;
|
22
|
+
isDisabled: boolean;
|
23
|
+
isIndeterminate: boolean;
|
24
|
+
isLeaf: boolean;
|
25
|
+
pathNames: string[];
|
26
|
+
path: string[];
|
27
|
+
setNodeCheck(status: boolean): void;
|
28
|
+
broadcast(event: string, check: boolean): void;
|
29
|
+
emit(event: string): void;
|
30
|
+
}
|
31
|
+
export interface IData {
|
32
|
+
id: string;
|
33
|
+
name: string;
|
34
|
+
leaf?: boolean;
|
35
|
+
disabled?: boolean;
|
36
|
+
children?: IData[];
|
37
|
+
}
|
38
|
+
export interface IConfig {
|
39
|
+
checkAnyLevel: boolean;
|
40
|
+
childrenKey: string;
|
41
|
+
clearable: boolean;
|
42
|
+
disabled: boolean;
|
43
|
+
idKey: string;
|
44
|
+
isRemote: boolean;
|
45
|
+
multiple: boolean;
|
46
|
+
nameKey: string;
|
47
|
+
showCompleteName: boolean;
|
48
|
+
trigger: string;
|
49
|
+
separator: string;
|
50
|
+
remoteMethod: Function;
|
51
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { IConfig, IData, INode } from './interface';
|
2
|
+
declare class Node implements INode {
|
3
|
+
data: IData;
|
4
|
+
config: IConfig;
|
5
|
+
parent: INode;
|
6
|
+
level: number;
|
7
|
+
id: string;
|
8
|
+
name: string;
|
9
|
+
loading: boolean;
|
10
|
+
loaded: boolean;
|
11
|
+
checked: boolean;
|
12
|
+
isIndeterminate: boolean;
|
13
|
+
children?: null[];
|
14
|
+
leaf: boolean;
|
15
|
+
pathNodes: INode[];
|
16
|
+
path: string[];
|
17
|
+
pathNames: string[];
|
18
|
+
nodes: INode[];
|
19
|
+
constructor(node: IData, config: any, parent?: any);
|
20
|
+
initState(): void;
|
21
|
+
get isLeaf(): boolean;
|
22
|
+
get isDisabled(): any;
|
23
|
+
broadcast(event: string, checkStatus: boolean): void;
|
24
|
+
emit(event: string): void;
|
25
|
+
onParentCheck(checked: boolean): void;
|
26
|
+
onChildCheck(): void;
|
27
|
+
setCheckState(checked: boolean): void;
|
28
|
+
setNodeCheck(status: boolean): void;
|
29
|
+
calculateNodesPath(): INode[];
|
30
|
+
}
|
31
|
+
export default Node;
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { IConfig, IData, INode } from './interface';
|
2
|
+
declare class Store {
|
3
|
+
data: IData[];
|
4
|
+
config: IConfig;
|
5
|
+
nodes: INode[];
|
6
|
+
constructor(props: any);
|
7
|
+
getNodes(): INode[];
|
8
|
+
/** 清空所有checked */
|
9
|
+
clearChecked(): void;
|
10
|
+
/** 移除某一个Tag的check状态 */
|
11
|
+
removeTag(tag: string[]): void;
|
12
|
+
/** 拍平节点,方便筛选 */
|
13
|
+
getFlattedNodes(leafOnly?: boolean): any;
|
14
|
+
/** 根据传入节点设置节点check状态 */
|
15
|
+
setNodesCheck(nodes: Array<string[]>): void;
|
16
|
+
/** 获取多选下,被选中(checked)的节点 */
|
17
|
+
getCheckedNodes(): any;
|
18
|
+
/** 根据值获得node实例 */
|
19
|
+
getNodeByValue(value: Array<number | string | string[]>): INode;
|
20
|
+
getNodeById(id: number | string): INode;
|
21
|
+
/** 插入单个节点 */
|
22
|
+
appendNode(nodeData: IData, parentNode: IData): void;
|
23
|
+
appendNodes(nodeDataList: IData[], parentNode: IData): void;
|
24
|
+
}
|
25
|
+
export default Store;
|
@@ -11,6 +11,11 @@ declare const checkboxGroupProps: {
|
|
11
11
|
disabled: import("vue-types").VueTypeValidableDef<boolean> & {
|
12
12
|
default: boolean;
|
13
13
|
};
|
14
|
+
withValidate: import("vue-types").VueTypeValidableDef<boolean> & {
|
15
|
+
default: boolean;
|
16
|
+
} & {
|
17
|
+
default: boolean;
|
18
|
+
};
|
14
19
|
};
|
15
20
|
export declare type CheckboxGroupProps = Readonly<ExtractPropTypes<typeof checkboxGroupProps>>;
|
16
21
|
declare const _default: import("vue").DefineComponent<{
|
@@ -25,6 +30,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
25
30
|
disabled: import("vue-types").VueTypeValidableDef<boolean> & {
|
26
31
|
default: boolean;
|
27
32
|
};
|
33
|
+
withValidate: import("vue-types").VueTypeValidableDef<boolean> & {
|
34
|
+
default: boolean;
|
35
|
+
} & {
|
36
|
+
default: boolean;
|
37
|
+
};
|
28
38
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
29
39
|
name: import("vue-types").VueTypeValidableDef<string> & {
|
30
40
|
default: string;
|
@@ -37,6 +47,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
37
47
|
disabled: import("vue-types").VueTypeValidableDef<boolean> & {
|
38
48
|
default: boolean;
|
39
49
|
};
|
50
|
+
withValidate: import("vue-types").VueTypeValidableDef<boolean> & {
|
51
|
+
default: boolean;
|
52
|
+
} & {
|
53
|
+
default: boolean;
|
54
|
+
};
|
40
55
|
}>> & {
|
41
56
|
onChange?: (...args: any[]) => any;
|
42
57
|
"onUpdate:modelValue"?: (...args: any[]) => any;
|
@@ -44,5 +59,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
44
59
|
name: string;
|
45
60
|
disabled: boolean;
|
46
61
|
modelValue: unknown[];
|
62
|
+
withValidate: boolean;
|
47
63
|
}>;
|
48
64
|
export default _default;
|
@@ -1,30 +1,63 @@
|
|
1
|
+
.bk-checkbox-group {
|
2
|
+
display: inline-flex;
|
3
|
+
letter-spacing: normal;
|
4
|
+
}
|
1
5
|
.bk-checkbox {
|
2
|
-
display: inline-
|
3
|
-
|
6
|
+
display: inline-flex;
|
7
|
+
justify-self: center;
|
8
|
+
align-items: center;
|
4
9
|
font-size: 14px;
|
5
10
|
letter-spacing: normal;
|
6
11
|
color: #63656e;
|
7
12
|
cursor: pointer;
|
8
13
|
user-select: none;
|
9
14
|
}
|
15
|
+
.bk-checkbox ~ .bk-checkbox {
|
16
|
+
margin-left: 30px;
|
17
|
+
}
|
10
18
|
.bk-checkbox.is-checked .bk-checkbox-input {
|
11
19
|
background: #3a84ff;
|
12
20
|
border-color: #3a84ff;
|
13
21
|
transition: all 0.1s;
|
14
22
|
}
|
23
|
+
.bk-checkbox.is-checked .bk-checkbox-input.small::after {
|
24
|
+
width: 3px;
|
25
|
+
height: 6px;
|
26
|
+
}
|
15
27
|
.bk-checkbox.is-checked .bk-checkbox-input::after {
|
16
28
|
position: absolute;
|
17
|
-
top:
|
18
|
-
left:
|
29
|
+
top: 50%;
|
30
|
+
left: 50%;
|
19
31
|
width: 4px;
|
20
32
|
height: 8px;
|
21
33
|
border: 2px solid #fff;
|
22
34
|
border-top: 0;
|
23
35
|
border-left: 0;
|
24
36
|
content: '';
|
25
|
-
transform: scaleY(1) rotate(45deg);
|
37
|
+
transform: translate(-50%, -60%) scaleY(1) rotate(45deg);
|
26
38
|
transform-origin: center;
|
27
39
|
}
|
40
|
+
.bk-checkbox.is-indeterminated .bk-checkbox-input {
|
41
|
+
background: #3a84ff;
|
42
|
+
border-color: #3a84ff;
|
43
|
+
transition: all 0.1s;
|
44
|
+
}
|
45
|
+
.bk-checkbox.is-indeterminated .bk-checkbox-input.small::after {
|
46
|
+
width: 6px;
|
47
|
+
height: 2px;
|
48
|
+
}
|
49
|
+
.bk-checkbox.is-indeterminated .bk-checkbox-input::after {
|
50
|
+
position: absolute;
|
51
|
+
top: 50%;
|
52
|
+
left: 50%;
|
53
|
+
width: 8px;
|
54
|
+
height: 2px;
|
55
|
+
background: #fff;
|
56
|
+
border: none;
|
57
|
+
border-radius: 2px;
|
58
|
+
content: '';
|
59
|
+
transform: translate(-50%, -50%);
|
60
|
+
}
|
28
61
|
.bk-checkbox.is-disabled {
|
29
62
|
color: #c4c6cc;
|
30
63
|
cursor: not-allowed;
|
@@ -37,19 +70,26 @@
|
|
37
70
|
background: #dcdee5;
|
38
71
|
}
|
39
72
|
.bk-checkbox.is-disabled.is-checked .bk-checkbox-input {
|
40
|
-
background: #
|
73
|
+
background: #a3c5fd;
|
74
|
+
border-color: #a3c5fd;
|
41
75
|
}
|
42
|
-
.bk-checkbox .bk-checkbox-input {
|
76
|
+
.bk-checkbox.is-disabled.is-checked .bk-checkbox-input::after {
|
77
|
+
background: #a3c5fd;
|
78
|
+
}
|
79
|
+
.bk-checkbox-input {
|
43
80
|
position: relative;
|
44
81
|
display: inline-block;
|
45
82
|
width: 16px;
|
46
83
|
height: 16px;
|
47
|
-
margin-right: 5px;
|
48
84
|
vertical-align: middle;
|
49
85
|
border: 1px solid #979ba5;
|
50
86
|
border-radius: 2px;
|
51
87
|
}
|
52
|
-
.bk-checkbox
|
88
|
+
.bk-checkbox-input.small {
|
89
|
+
width: 14px;
|
90
|
+
height: 14px;
|
91
|
+
}
|
92
|
+
.bk-checkbox-original {
|
53
93
|
position: absolute;
|
54
94
|
top: 0;
|
55
95
|
left: 0;
|
@@ -57,8 +97,8 @@
|
|
57
97
|
width: 0;
|
58
98
|
height: 0;
|
59
99
|
}
|
60
|
-
.bk-checkbox
|
100
|
+
.bk-checkbox-label {
|
61
101
|
display: inline-block;
|
62
|
-
|
102
|
+
margin-left: 6px;
|
63
103
|
vertical-align: middle;
|
64
104
|
}
|
@@ -1,11 +1,7 @@
|
|
1
1
|
import type { ExtractPropTypes } from 'vue';
|
2
2
|
export declare const checkboxProps: {
|
3
|
-
modelValue: import("vue-types").VueTypeDef<string | number | boolean
|
4
|
-
|
5
|
-
};
|
6
|
-
label: import("vue-types").VueTypeDef<string | number | boolean> & {
|
7
|
-
required: true;
|
8
|
-
};
|
3
|
+
modelValue: import("vue-types").VueTypeDef<string | number | boolean>;
|
4
|
+
label: import("vue-types").VueTypeDef<string | number | boolean>;
|
9
5
|
trueLabel: import("vue-types").VueTypeDef<string | number | boolean> & {
|
10
6
|
default: string | number | boolean;
|
11
7
|
};
|
@@ -28,16 +24,19 @@ export declare const checkboxProps: {
|
|
28
24
|
beforeChange: import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
|
29
25
|
default: (...args: any[]) => any;
|
30
26
|
};
|
31
|
-
size: import("vue-types").VueTypeDef<
|
27
|
+
size: import("vue-types").VueTypeDef<"small" | "default" | "large"> & {
|
28
|
+
default: "small" | "default" | "large";
|
29
|
+
};
|
30
|
+
immediateEmitChange: import("vue-types").VueTypeValidableDef<boolean> & {
|
31
|
+
default: boolean;
|
32
|
+
} & {
|
33
|
+
default: boolean;
|
34
|
+
};
|
32
35
|
};
|
33
36
|
export declare type CheckboxProps = Readonly<ExtractPropTypes<typeof checkboxProps>>;
|
34
37
|
declare const _default: import("vue").DefineComponent<{
|
35
|
-
modelValue: import("vue-types").VueTypeDef<string | number | boolean
|
36
|
-
|
37
|
-
};
|
38
|
-
label: import("vue-types").VueTypeDef<string | number | boolean> & {
|
39
|
-
required: true;
|
40
|
-
};
|
38
|
+
modelValue: import("vue-types").VueTypeDef<string | number | boolean>;
|
39
|
+
label: import("vue-types").VueTypeDef<string | number | boolean>;
|
41
40
|
trueLabel: import("vue-types").VueTypeDef<string | number | boolean> & {
|
42
41
|
default: string | number | boolean;
|
43
42
|
};
|
@@ -60,22 +59,27 @@ declare const _default: import("vue").DefineComponent<{
|
|
60
59
|
beforeChange: import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
|
61
60
|
default: (...args: any[]) => any;
|
62
61
|
};
|
63
|
-
size: import("vue-types").VueTypeDef<
|
62
|
+
size: import("vue-types").VueTypeDef<"small" | "default" | "large"> & {
|
63
|
+
default: "small" | "default" | "large";
|
64
|
+
};
|
65
|
+
immediateEmitChange: import("vue-types").VueTypeValidableDef<boolean> & {
|
66
|
+
default: boolean;
|
67
|
+
} & {
|
68
|
+
default: boolean;
|
69
|
+
};
|
64
70
|
}, {
|
65
|
-
|
71
|
+
inputRef: import("vue").Ref<any>;
|
66
72
|
isFocus: import("vue").Ref<boolean>;
|
67
|
-
isChecked: import("vue").
|
73
|
+
isChecked: import("vue").Ref<boolean>;
|
68
74
|
isDisabled: import("vue").ComputedRef<boolean>;
|
75
|
+
setChecked: (value?: boolean) => void;
|
69
76
|
handleBlur: () => void;
|
70
77
|
handleFocus: () => void;
|
71
78
|
handleChange: (event: Event) => void;
|
79
|
+
size: "small" | "default" | "large";
|
72
80
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
73
|
-
modelValue: import("vue-types").VueTypeDef<string | number | boolean
|
74
|
-
|
75
|
-
};
|
76
|
-
label: import("vue-types").VueTypeDef<string | number | boolean> & {
|
77
|
-
required: true;
|
78
|
-
};
|
81
|
+
modelValue: import("vue-types").VueTypeDef<string | number | boolean>;
|
82
|
+
label: import("vue-types").VueTypeDef<string | number | boolean>;
|
79
83
|
trueLabel: import("vue-types").VueTypeDef<string | number | boolean> & {
|
80
84
|
default: string | number | boolean;
|
81
85
|
};
|
@@ -98,17 +102,25 @@ declare const _default: import("vue").DefineComponent<{
|
|
98
102
|
beforeChange: import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
|
99
103
|
default: (...args: any[]) => any;
|
100
104
|
};
|
101
|
-
size: import("vue-types").VueTypeDef<
|
105
|
+
size: import("vue-types").VueTypeDef<"small" | "default" | "large"> & {
|
106
|
+
default: "small" | "default" | "large";
|
107
|
+
};
|
108
|
+
immediateEmitChange: import("vue-types").VueTypeValidableDef<boolean> & {
|
109
|
+
default: boolean;
|
110
|
+
} & {
|
111
|
+
default: boolean;
|
112
|
+
};
|
102
113
|
}>> & {
|
103
114
|
onChange?: (...args: any[]) => any;
|
104
115
|
"onUpdate:modelValue"?: (...args: any[]) => any;
|
105
116
|
}, {
|
106
117
|
disabled: boolean;
|
107
|
-
|
118
|
+
size: "small" | "default" | "large";
|
108
119
|
trueLabel: string | number | boolean;
|
109
120
|
falseLabel: string | number | boolean;
|
110
121
|
checked: boolean;
|
111
122
|
indeterminate: boolean;
|
112
123
|
beforeChange: (...args: any[]) => any;
|
124
|
+
immediateEmitChange: boolean;
|
113
125
|
}>;
|
114
126
|
export default _default;
|
@@ -1,41 +1,86 @@
|
|
1
1
|
@import '../styles/themes/themes.less';
|
2
2
|
|
3
|
+
.@{bk-prefix}-checkbox-group {
|
4
|
+
display: inline-flex;
|
5
|
+
letter-spacing: normal;
|
6
|
+
}
|
7
|
+
|
3
8
|
.@{bk-prefix}-checkbox {
|
4
|
-
display: inline-
|
5
|
-
|
9
|
+
display: inline-flex;
|
10
|
+
justify-self: center;
|
11
|
+
align-items: center;
|
6
12
|
font-size: 14px;
|
7
13
|
letter-spacing: normal;
|
8
14
|
color: #63656e;
|
9
15
|
cursor: pointer;
|
10
16
|
user-select: none;
|
11
17
|
|
18
|
+
& ~ .@{bk-prefix}-checkbox {
|
19
|
+
margin-left: 30px;
|
20
|
+
}
|
21
|
+
|
12
22
|
&.is-checked {
|
13
|
-
|
23
|
+
.@{bk-prefix}-checkbox-input {
|
14
24
|
background: @primary-color;
|
15
25
|
border-color: @primary-color;
|
16
26
|
transition: all .1s;
|
17
27
|
|
28
|
+
&.small {
|
29
|
+
&::after {
|
30
|
+
width: 3px;
|
31
|
+
height: 6px;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
18
35
|
&::after {
|
19
36
|
position: absolute;
|
20
|
-
top:
|
21
|
-
left:
|
37
|
+
top: 50%;
|
38
|
+
left: 50%;
|
22
39
|
width: 4px;
|
23
40
|
height: 8px;
|
24
41
|
border: 2px solid #fff;
|
25
42
|
border-top: 0;
|
26
43
|
border-left: 0;
|
27
44
|
content: '';
|
28
|
-
transform: scaleY(1) rotate(45deg);
|
45
|
+
transform: translate(-50%, -60%) scaleY(1) rotate(45deg);
|
29
46
|
transform-origin: center;
|
30
47
|
}
|
31
48
|
}
|
32
49
|
}
|
33
50
|
|
51
|
+
&.is-indeterminated {
|
52
|
+
.@{bk-prefix}-checkbox-input {
|
53
|
+
background: @primary-color;
|
54
|
+
border-color: @primary-color;
|
55
|
+
transition: all .1s;
|
56
|
+
|
57
|
+
&.small {
|
58
|
+
&::after {
|
59
|
+
width: 6px;
|
60
|
+
height: 2px;
|
61
|
+
}
|
62
|
+
}
|
63
|
+
|
64
|
+
&::after {
|
65
|
+
position: absolute;
|
66
|
+
top: 50%;
|
67
|
+
left: 50%;
|
68
|
+
width: 8px;
|
69
|
+
height: 2px;
|
70
|
+
background: #fff;
|
71
|
+
border: none;
|
72
|
+
border-radius: 2px;
|
73
|
+
content: '';
|
74
|
+
transform: translate(-50%, -50%);
|
75
|
+
}
|
76
|
+
}
|
77
|
+
}
|
78
|
+
|
34
79
|
&.is-disabled {
|
35
80
|
color: #c4c6cc;
|
36
81
|
cursor: not-allowed;
|
37
82
|
|
38
|
-
|
83
|
+
.@{bk-prefix}-checkbox-input {
|
39
84
|
background: #fafbfd;
|
40
85
|
border-color: @disable-color;
|
41
86
|
|
@@ -45,36 +90,44 @@
|
|
45
90
|
}
|
46
91
|
|
47
92
|
&.is-checked {
|
48
|
-
|
49
|
-
background: @
|
93
|
+
.@{bk-prefix}-checkbox-input {
|
94
|
+
background: @checkbox-disabled-checked-bg;
|
95
|
+
border-color: @checkbox-disabled-checked-bg;
|
96
|
+
|
97
|
+
&::after {
|
98
|
+
background: @checkbox-disabled-checked-bg;
|
99
|
+
}
|
50
100
|
}
|
51
101
|
}
|
52
102
|
}
|
103
|
+
}
|
53
104
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
border-radius: 2px;
|
63
|
-
|
64
|
-
}
|
105
|
+
.@{bk-prefix}-checkbox-input {
|
106
|
+
position: relative;
|
107
|
+
display: inline-block;
|
108
|
+
width: 16px;
|
109
|
+
height: 16px;
|
110
|
+
vertical-align: middle;
|
111
|
+
border: 1px solid #979ba5;
|
112
|
+
border-radius: 2px;
|
65
113
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
left: 0;
|
70
|
-
z-index: -1;
|
71
|
-
width: 0;
|
72
|
-
height: 0;
|
114
|
+
&.small {
|
115
|
+
width: 14px;
|
116
|
+
height: 14px;
|
73
117
|
}
|
118
|
+
}
|
74
119
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
120
|
+
.@{bk-prefix}-checkbox-original {
|
121
|
+
position: absolute;
|
122
|
+
top: 0;
|
123
|
+
left: 0;
|
124
|
+
z-index: -1;
|
125
|
+
width: 0;
|
126
|
+
height: 0;
|
127
|
+
}
|
128
|
+
|
129
|
+
.@{bk-prefix}-checkbox-label {
|
130
|
+
display: inline-block;
|
131
|
+
margin-left: 6px;
|
132
|
+
vertical-align: middle;
|
80
133
|
}
|