bkui-vue 0.0.1-beta.99 → 0.0.2-beta.1
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 +360 -36
- package/dist/index.esm.js +30199 -24465
- package/dist/index.umd.js +360 -36
- 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.d.ts +2 -2
- package/lib/affix/affix.variable.css +29 -6
- package/lib/affix/index.d.ts +60 -36
- package/lib/alert/alert.css +4 -0
- package/lib/alert/alert.d.ts +11 -9
- package/lib/alert/alert.less +24 -19
- package/lib/alert/alert.variable.css +33 -6
- package/lib/alert/index.d.ts +82 -58
- package/lib/alert/index.js +1 -1
- package/lib/animate-number/animate-number.d.ts +2 -2
- package/lib/animate-number/index.d.ts +58 -25
- package/lib/backtop/backtop.css +8 -0
- package/lib/backtop/backtop.d.ts +4 -4
- package/lib/backtop/backtop.less +8 -0
- package/lib/backtop/backtop.variable.css +37 -6
- package/lib/backtop/index.d.ts +65 -47
- package/lib/backtop/index.js +1 -1
- package/lib/badge/badge.css +2 -5
- package/lib/badge/badge.d.ts +3 -3
- package/lib/badge/badge.less +4 -5
- package/lib/badge/badge.variable.css +31 -11
- package/lib/badge/index.d.ts +67 -64
- package/lib/badge/index.js +1 -1
- package/lib/breadcrumb/breadcrumb-item.d.ts +28 -3
- package/lib/breadcrumb/breadcrumb.css +43 -0
- package/lib/breadcrumb/breadcrumb.d.ts +27 -2
- package/lib/breadcrumb/breadcrumb.less +3 -4
- package/lib/breadcrumb/breadcrumb.variable.css +77 -11
- package/lib/breadcrumb/index.d.ts +67 -41
- package/lib/breadcrumb/index.js +1 -1
- package/lib/button/button-group.d.ts +4 -4
- package/lib/button/button.css +21 -3
- package/lib/button/button.d.ts +46 -33
- package/lib/button/button.less +25 -5
- package/lib/button/button.variable.css +50 -9
- package/lib/button/index.d.ts +121 -96
- package/lib/button/index.js +1 -1
- package/lib/card/card.css +45 -2
- package/lib/card/card.d.ts +2 -1
- package/lib/card/card.less +2 -2
- package/lib/card/card.variable.css +78 -12
- package/lib/card/index.d.ts +66 -64
- package/lib/card/index.js +1 -1
- package/lib/cascader/cascader-panel.d.ts +60 -6
- package/lib/cascader/cascader.css +197 -11
- package/lib/cascader/cascader.d.ts +131 -25
- package/lib/cascader/cascader.less +148 -11
- package/lib/cascader/cascader.variable.css +234 -25
- package/lib/cascader/index.d.ts +415 -174
- package/lib/cascader/index.js +2 -1
- package/lib/cascader/index.js.LICENSE.txt +1 -0
- package/lib/cascader/interface.d.ts +8 -1
- package/lib/cascader/node.d.ts +9 -2
- package/lib/cascader/store.d.ts +13 -1
- package/lib/checkbox/checkbox-group.d.ts +18 -2
- package/lib/checkbox/checkbox.css +38 -11
- package/lib/checkbox/checkbox.d.ts +40 -18
- package/lib/checkbox/checkbox.less +68 -33
- package/lib/checkbox/checkbox.variable.css +67 -17
- package/lib/checkbox/common.d.ts +1 -0
- package/lib/checkbox/index.d.ts +133 -72
- package/lib/checkbox/index.js +1 -1
- package/lib/checkbox/type.d.ts +1 -1
- package/lib/code-diff/code-diff.css +27 -7
- package/lib/code-diff/code-diff.d.ts +7 -7
- package/lib/code-diff/code-diff.less +42 -7
- package/lib/code-diff/code-diff.variable.css +56 -13
- package/lib/code-diff/index.d.ts +30 -43
- package/lib/code-diff/index.js +1 -1
- package/lib/collapse/collapse-panel.d.ts +104 -0
- package/lib/collapse/collapse.css +58 -19
- package/lib/collapse/collapse.d.ts +59 -42
- package/lib/collapse/collapse.less +106 -46
- package/lib/collapse/collapse.variable.css +87 -25
- package/lib/collapse/index.d.ts +271 -46
- package/lib/collapse/index.js +1 -1
- package/lib/collapse/props.d.ts +131 -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 +255 -0
- package/lib/color-picker/index.js +1 -0
- package/lib/color-picker/utils.d.ts +37 -0
- package/lib/components.d.ts +13 -0
- package/lib/components.js +1 -1
- package/lib/config-provider/config-provider.css +0 -0
- package/lib/config-provider/config-provider.d.ts +402 -0
- package/lib/config-provider/config-provider.less +1 -0
- package/lib/{popover2/popover2.variable.css → config-provider/config-provider.variable.css} +29 -31
- package/lib/config-provider/index.d.ts +646 -0
- package/lib/config-provider/index.js +1 -0
- package/lib/config-provider/token.d.ts +128 -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 +3 -3
- package/lib/container/container.css +43 -0
- package/lib/container/container.d.ts +2 -2
- package/lib/container/container.less +4 -4
- package/lib/container/container.variable.css +72 -6
- package/lib/container/index.d.ts +30 -49
- package/lib/container/index.js +1 -1
- package/lib/container/interface.d.ts +7 -0
- package/lib/container/row.d.ts +2 -2
- 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 +30 -1
- package/lib/date-picker/date-picker.d.ts +55 -35
- package/lib/date-picker/date-picker.less +109 -74
- package/lib/date-picker/date-picker.variable.css +59 -7
- package/lib/date-picker/index.d.ts +198 -218
- package/lib/date-picker/index.js +1 -1
- package/lib/date-picker/interface.d.ts +20 -10
- package/lib/date-picker/panel/date-range.d.ts +345 -0
- package/lib/date-picker/panel/date.d.ts +206 -0
- package/lib/date-picker/panel/time-range.d.ts +495 -0
- package/lib/date-picker/panel/time.d.ts +451 -0
- package/lib/date-picker/props.d.ts +48 -5
- package/lib/date-picker/time-picker.d.ts +390 -0
- package/lib/date-picker/utils.d.ts +22 -2
- package/lib/dialog/dialog.css +94 -34
- package/lib/dialog/dialog.d.ts +57 -93
- package/lib/dialog/dialog.less +85 -43
- package/lib/dialog/dialog.variable.css +216 -34
- package/lib/dialog/index.d.ts +194 -334
- package/lib/dialog/index.js +2 -1
- package/lib/dialog/index.js.LICENSE.txt +1 -0
- 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 -1
- package/lib/divider/divider.d.ts +17 -17
- package/lib/divider/divider.variable.css +29 -6
- package/lib/divider/index.d.ts +85 -61
- package/lib/divider/index.js +1 -1
- package/lib/divider/props.d.ts +6 -6
- package/lib/dropdown/dropdown-item.d.ts +1 -1
- package/lib/dropdown/dropdown-menu.d.ts +2 -2
- package/lib/dropdown/dropdown.css +34 -7
- package/lib/dropdown/dropdown.d.ts +46 -15
- package/lib/dropdown/dropdown.less +42 -36
- package/lib/dropdown/dropdown.variable.css +63 -13
- package/lib/dropdown/index.d.ts +136 -65
- package/lib/dropdown/index.js +1 -1
- package/lib/exception/exception.css +40 -14
- package/lib/exception/exception.d.ts +33 -13
- package/lib/exception/exception.less +59 -22
- package/lib/exception/exception.variable.css +69 -20
- package/lib/exception/index.d.ts +91 -43
- package/lib/exception/index.js +1 -1
- package/lib/exception/typings/index.d.ts +4 -0
- package/lib/fixed-navbar/fixed-navbar.d.ts +2 -2
- package/lib/fixed-navbar/fixed-navbar.variable.css +29 -6
- package/lib/fixed-navbar/index.d.ts +60 -36
- package/lib/form/compose-form-item.d.ts +4 -2
- package/lib/form/form-item.d.ts +15 -9
- package/lib/form/form.css +32 -8
- package/lib/form/form.d.ts +25 -7
- package/lib/form/form.less +85 -53
- package/lib/form/form.variable.css +61 -14
- package/lib/form/index.d.ts +109 -51
- package/lib/form/index.js +1 -1
- package/lib/form/type.d.ts +5 -4
- package/lib/form/utils.d.ts +2 -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.js +1 -1
- package/lib/icon/arrows-left.js +1 -1
- package/lib/icon/arrows-right.js +1 -1
- package/lib/icon/audio-fill.js +1 -1
- package/lib/icon/bk.js +1 -1
- package/lib/icon/circle.js +1 -1
- package/lib/icon/close-line.js +1 -1
- 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-shape.d.ts +4 -0
- package/lib/icon/copy-shape.js +1 -0
- package/lib/icon/copy.js +1 -1
- package/lib/icon/data-shape.js +1 -1
- package/lib/icon/del.js +1 -1
- package/lib/icon/doc-fill.js +1 -1
- 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.js +1 -1
- 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.js +1 -1
- package/lib/icon/exclamation-circle-shape.js +1 -1
- 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/fix-line.d.ts +4 -0
- package/lib/icon/fix-line.js +1 -0
- package/lib/icon/fix-shape.d.ts +4 -0
- package/lib/icon/fix-shape.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.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.js +1 -1
- 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 +83 -69
- 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.js +1 -1
- package/lib/icon/play-shape.js +1 -1
- package/lib/icon/plus.js +1 -1
- package/lib/icon/ppt-fill.js +1 -1
- 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.js +1 -1
- 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.js +1 -1
- package/lib/icon/video-fill.js +1 -1
- package/lib/icon/warn.js +1 -1
- package/lib/icon/weixin-pro.d.ts +4 -0
- package/lib/icon/weixin-pro.js +1 -0
- 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 +252 -0
- package/lib/image/index.js +1 -0
- package/lib/image/props.d.ts +71 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +1 -1
- package/lib/info-box/index.d.ts +7 -0
- package/lib/info-box/index.js +2 -0
- package/lib/info-box/index.js.LICENSE.txt +1 -0
- package/lib/info-box/info-box.css +37 -0
- package/lib/info-box/info-box.d.ts +29 -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 +178 -228
- package/lib/input/index.js +1 -1
- package/lib/input/input.css +168 -23
- package/lib/input/input.d.ts +59 -37
- package/lib/input/input.less +104 -22
- package/lib/input/input.variable.css +228 -61
- package/lib/link/index.d.ts +80 -53
- 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 +41 -18
- package/lib/loading/directive.d.ts +14 -0
- package/lib/loading/index.d.ts +160 -56
- package/lib/loading/index.js +1 -1
- package/lib/loading/loading.css +72 -29
- package/lib/loading/loading.d.ts +91 -15
- package/lib/loading/loading.less +21 -19
- package/lib/loading/loading.variable.css +117 -51
- package/lib/locale/index.d.ts +3 -0
- package/lib/locale/index.js +1 -0
- package/lib/locale/lang/en.d.ts +126 -0
- package/lib/locale/lang/zh-cn.d.ts +3 -0
- package/lib/menu/index.d.ts +75 -34
- package/lib/menu/index.js +1 -1
- package/lib/menu/menu-group.d.ts +2 -2
- package/lib/menu/menu-item.d.ts +5 -1
- package/lib/menu/menu.css +43 -0
- package/lib/menu/menu.d.ts +2 -2
- package/lib/menu/menu.variable.css +90 -24
- package/lib/menu/submenu.d.ts +5 -1
- package/lib/menu/submenu.variable.css +29 -6
- package/lib/menu/utils.d.ts +1 -1
- package/lib/message/index.d.ts +1 -0
- package/lib/message/index.js +2 -1
- package/lib/message/index.js.LICENSE.txt +6 -0
- package/lib/message/message.css +166 -2
- package/lib/message/message.less +222 -7
- package/lib/message/message.variable.css +195 -8
- package/lib/message/messageConstructor.d.ts +136 -27
- package/lib/modal/index.d.ts +201 -246
- package/lib/modal/index.js +1 -1
- package/lib/modal/modal.css +39 -6
- package/lib/modal/modal.d.ts +54 -61
- package/lib/modal/modal.less +8 -10
- package/lib/modal/modal.variable.css +161 -6
- package/lib/modal/props.mixin.d.ts +16 -23
- package/lib/navigation/index.d.ts +90 -68
- package/lib/navigation/index.js +1 -1
- package/lib/navigation/navigation-title.d.ts +6 -3
- package/lib/navigation/navigation.d.ts +12 -4
- package/lib/navigation/navigation.variable.css +29 -6
- package/lib/notify/index.d.ts +1 -0
- package/lib/notify/index.js +1 -1
- package/lib/notify/notify.css +8 -4
- package/lib/notify/notify.less +18 -13
- package/lib/notify/notify.variable.css +37 -10
- package/lib/notify/notifyConstructor.d.ts +19 -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 +195 -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 +89 -90
- package/lib/pagination/index.js +1 -1
- package/lib/pagination/pagination.css +54 -28
- package/lib/pagination/pagination.d.ts +17 -6
- package/lib/pagination/pagination.less +59 -30
- package/lib/pagination/pagination.variable.css +83 -34
- package/lib/pagination/type.d.ts +1 -1
- 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 +249 -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 +409 -173
- package/lib/popover/index.js +1 -1
- package/lib/popover/plugin-popover.d.ts +12 -0
- package/lib/popover/popover.css +10 -53
- package/lib/popover/popover.d.ts +189 -58
- package/lib/popover/popover.less +19 -68
- package/lib/popover/popover.variable.css +40 -60
- package/lib/popover/props.d.ts +90 -37
- package/lib/popover/reference.d.ts +2 -0
- package/lib/popover/root.d.ts +27 -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 +54 -393
- package/lib/popover2/index.js +1 -1
- package/lib/popover2/popover.d.ts +2 -0
- package/lib/preset.d.ts +264 -2
- package/lib/preset.js +1 -1
- package/lib/process/index.d.ts +69 -52
- package/lib/process/index.js +2 -1
- package/lib/process/index.js.LICENSE.txt +1 -0
- package/lib/process/process.css +22 -0
- package/lib/process/process.d.ts +5 -4
- package/lib/process/process.less +36 -8
- package/lib/process/process.variable.css +51 -6
- package/lib/progress/index.d.ts +114 -153
- package/lib/progress/index.js +1 -1
- package/lib/progress/progress.css +43 -0
- package/lib/progress/progress.d.ts +90 -32
- package/lib/progress/progress.less +8 -8
- package/lib/progress/progress.variable.css +76 -10
- package/lib/radio/index.d.ts +116 -58
- package/lib/radio/index.js +1 -1
- package/lib/radio/radio-button.d.ts +12 -9
- package/lib/radio/radio-group.d.ts +36 -5
- package/lib/radio/radio.css +133 -62
- package/lib/radio/radio.d.ts +9 -5
- package/lib/radio/radio.less +262 -173
- package/lib/radio/radio.variable.css +166 -72
- package/lib/radio/type.d.ts +1 -1
- package/lib/rate/index.d.ts +78 -28
- package/lib/rate/index.js +1 -1
- package/lib/rate/rate.d.ts +14 -3
- package/lib/rate/star.d.ts +1 -1
- package/lib/resize-layout/index.d.ts +82 -80
- 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 +10 -9
- package/lib/resize-layout/resize-layout.less +32 -41
- package/lib/resize-layout/resize-layout.variable.css +35 -21
- package/lib/search-select/index.d.ts +892 -0
- package/lib/search-select/index.js +2 -0
- package/lib/search-select/index.js.LICENSE.txt +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 +4 -11
- package/lib/select/index.d.ts +1471 -918
- package/lib/select/index.js +2 -1
- package/lib/select/index.js.LICENSE.txt +1 -0
- package/lib/select/option.d.ts +17 -6
- package/lib/select/optionGroup.d.ts +2 -2
- package/lib/select/select.css +211 -140
- package/lib/select/select.d.ts +654 -205
- package/lib/select/select.less +331 -189
- package/lib/select/select.variable.css +240 -146
- package/lib/select/selectTagInput.d.ts +38 -15
- package/lib/select/type.d.ts +20 -14
- 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 +16 -12
- package/lib/shared/index.js +1 -1
- package/lib/shared/mask-manager.d.ts +18 -5
- package/lib/shared/pop-manager.d.ts +13 -3
- package/lib/shared/popover.d.ts +1 -1
- package/lib/shared/token.d.ts +1 -1
- package/lib/shared/utils.d.ts +19 -0
- package/lib/shared/vue-types.d.ts +139 -13
- package/lib/sideslider/index.d.ts +158 -252
- package/lib/sideslider/index.js +2 -1
- package/lib/sideslider/index.js.LICENSE.txt +1 -0
- package/lib/sideslider/sideslider.css +10 -8
- package/lib/sideslider/sideslider.d.ts +46 -71
- package/lib/sideslider/sideslider.less +19 -17
- package/lib/sideslider/sideslider.variable.css +39 -14
- package/lib/slider/index.d.ts +82 -112
- package/lib/slider/index.js +2 -1
- package/lib/slider/index.js.LICENSE.txt +1 -0
- package/lib/slider/slider-button.d.ts +3 -2
- package/lib/slider/slider.d.ts +6 -6
- package/lib/slider/slider.variable.css +29 -6
- package/lib/steps/index.d.ts +105 -96
- package/lib/steps/index.js +2 -1
- package/lib/steps/index.js.LICENSE.txt +1 -0
- package/lib/steps/steps.css +1 -0
- package/lib/steps/steps.d.ts +35 -34
- package/lib/steps/steps.less +63 -62
- package/lib/steps/steps.variable.css +30 -6
- package/lib/styles/index.d.ts +6 -2
- package/lib/styles/mixins/mixins.css +43 -0
- package/lib/styles/mixins/mixins.less +1 -0
- package/lib/styles/mixins/mixins.variable.css +43 -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 +37 -6
- package/lib/swiper/index.d.ts +60 -44
- package/lib/swiper/index.js +1 -1
- package/lib/swiper/swiper.d.ts +1 -1
- package/lib/swiper/swiper.less +15 -13
- package/lib/swiper/swiper.variable.css +122 -0
- package/lib/switcher/index.d.ts +94 -87
- package/lib/switcher/index.js +1 -1
- package/lib/switcher/switcher.css +44 -1
- package/lib/switcher/switcher.d.ts +17 -11
- package/lib/switcher/switcher.less +29 -52
- package/lib/switcher/switcher.variable.css +90 -24
- package/lib/tab/index.d.ts +163 -124
- package/lib/tab/index.js +1 -1
- package/lib/tab/props.d.ts +92 -43
- package/lib/tab/tab-nav.d.ts +46 -14
- package/lib/tab/tab-panel.d.ts +16 -9
- package/lib/tab/tab.css +135 -58
- package/lib/tab/tab.d.ts +42 -20
- package/lib/tab/tab.less +164 -77
- package/lib/tab/tab.variable.css +164 -64
- 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 +305 -0
- package/lib/table/components/table-row.d.ts +2 -0
- package/lib/table/const.d.ts +94 -6
- package/lib/table/index.d.ts +698 -169
- 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 +30 -14
- package/lib/table/plugins/head-filter.d.ts +26 -0
- package/lib/table/plugins/head-filter.less +79 -52
- package/lib/table/plugins/head-filter.variable.css +59 -20
- package/lib/table/plugins/head-sort.css +7 -3
- package/lib/table/plugins/head-sort.d.ts +29 -0
- package/lib/table/plugins/head-sort.less +8 -4
- package/lib/table/plugins/head-sort.variable.css +36 -9
- package/lib/table/plugins/index.d.ts +5 -0
- package/lib/table/plugins/settings.css +43 -6
- package/lib/table/plugins/settings.d.ts +37 -0
- package/lib/table/plugins/settings.less +52 -7
- package/lib/table/plugins/settings.variable.css +72 -12
- 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 +271 -23
- package/lib/table/render.d.ts +32 -12
- package/lib/table/table.css +961 -69
- package/lib/table/table.d.ts +170 -27
- package/lib/table/table.less +195 -69
- package/lib/table/table.variable.css +990 -75
- package/lib/table/use-column.d.ts +12 -0
- package/lib/table/use-common.d.ts +71 -11
- package/lib/table/utils.d.ts +33 -7
- package/lib/table-column/index.d.ts +797 -0
- package/lib/table-column/index.js +1 -0
- package/lib/tag/index.d.ts +89 -68
- package/lib/tag/index.js +1 -1
- package/lib/tag/tag.css +46 -13
- package/lib/tag/tag.d.ts +17 -12
- package/lib/tag/tag.less +58 -21
- package/lib/tag/tag.variable.css +75 -19
- package/lib/tag-input/common.d.ts +13 -1
- package/lib/tag-input/index.d.ts +570 -269
- package/lib/tag-input/index.js +1 -1
- package/lib/tag-input/list-tag-render.d.ts +2 -5
- package/lib/tag-input/tag-input.css +23 -27
- package/lib/tag-input/tag-input.d.ts +304 -45
- package/lib/tag-input/tag-input.less +103 -106
- package/lib/tag-input/tag-input.variable.css +52 -33
- package/lib/tag-input/tag-props.d.ts +142 -8
- package/lib/tag-input/tag-render.d.ts +31 -5
- package/lib/time-picker/index.d.ts +833 -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 +64 -32
- package/lib/timeline/index.js +1 -1
- package/lib/timeline/timeline.css +11 -4
- package/lib/timeline/timeline.d.ts +4 -3
- package/lib/timeline/timeline.less +48 -36
- package/lib/timeline/timeline.variable.css +40 -10
- package/lib/transfer/index.d.ts +152 -81
- package/lib/transfer/index.js +1 -1
- package/lib/transfer/props.d.ts +5 -0
- package/lib/transfer/transfer.css +121 -41
- package/lib/transfer/transfer.d.ts +35 -3
- package/lib/transfer/transfer.less +103 -46
- package/lib/transfer/transfer.variable.css +155 -52
- package/lib/tree/constant.d.ts +22 -2
- package/lib/tree/index.d.ts +236 -141
- package/lib/tree/index.js +1 -1
- package/lib/tree/props.d.ts +68 -12
- package/lib/tree/tree.css +176 -7
- package/lib/tree/tree.d.ts +91 -20
- package/lib/tree/tree.less +49 -1
- package/lib/tree/tree.variable.css +205 -13
- package/lib/tree/use-empty.d.ts +1 -1
- package/lib/tree/use-node-action.d.ts +3 -2
- package/lib/tree/use-node-attribute.d.ts +11 -0
- package/lib/tree/use-node-drag.d.ts +1 -1
- package/lib/tree/use-search.d.ts +1 -1
- package/lib/tree/util.d.ts +2 -0
- package/lib/upload/index.d.ts +508 -1
- package/lib/upload/index.js +2 -1
- package/lib/upload/index.js.LICENSE.txt +1 -0
- package/lib/upload/props.d.ts +0 -2
- package/lib/upload/upload-list.d.ts +3 -2
- package/lib/upload/upload-trigger.d.ts +1 -4
- package/lib/upload/upload.css +58 -5
- package/lib/upload/upload.d.ts +10 -16
- package/lib/upload/upload.less +19 -8
- package/lib/upload/upload.type.d.ts +12 -12
- package/lib/upload/upload.variable.css +113 -37
- package/lib/upload/use-file-handler.d.ts +2 -25
- package/lib/virtual-render/index.d.ts +100 -150
- package/lib/virtual-render/index.js +1 -1
- package/lib/virtual-render/props.d.ts +15 -1
- package/lib/virtual-render/virtual-render.css +17 -17
- package/lib/virtual-render/virtual-render.d.ts +39 -4
- 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 +47 -41
- package/LICENSE.txt +0 -22
- package/lib/popover2/arrow.d.ts +0 -2
- package/lib/popover2/content.d.ts +0 -24
- package/lib/popover2/popover2.css +0 -25
- package/lib/popover2/popover2.d.ts +0 -180
- package/lib/popover2/popover2.less +0 -35
- package/lib/popover2/props.d.ts +0 -92
- package/lib/popover2/reference.d.ts +0 -2
- package/lib/popover2/use-floating.d.ts +0 -15
- package/lib/popover2/use-popper-id.d.ts +0 -5
package/lib/cascader/index.js
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../directives"),require("../icon"),require("../popover"),require("../checkbox"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../directives","../icon","../popover","../checkbox"],t);else{var r="object"==typeof exports?t(require("../shared"),require("vue"),require("../directives"),require("../icon"),require("../popover"),require("../checkbox")):t(e["../shared"],e.vue,e["../directives"],e["../icon"],e["../popover"],e["../checkbox"]);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(self,((e,t,r,n,o,i)=>(()=>{var a={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:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var o=t&&t.prototype instanceof y?t:y,i=Object.create(o.prototype),a=new C(n||[]);return i._invoke=function(e,t,r){var n=d;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===f){if("throw"===o)throw i;return j()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=L(a,r);if(c){if(c===v)continue;return c}}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 s=u(e,t,r);if("normal"===s.type){if(n=r.done?f:h,s.arg===v)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=f,r.method="throw",r.arg=s.arg)}}}(e,r,a),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var d="suspendedStart",h="suspendedYield",p="executing",f="completed",v={};function y(){}function g(){}function m(){}var b={};s(b,i,(function(){return this}));var k=Object.getPrototypeOf,w=k&&k(k(E([])));w&&w!==r&&n.call(w,i)&&(b=w);var N=m.prototype=y.prototype=Object.create(b);function x(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,a,c){var s=u(e[o],e,i);if("throw"!==s.type){var l=s.arg,d=l.value;return d&&"object"==typeof d&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(d).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,c)}))}c(s.arg)}var o;this._invoke=function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}}function L(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,L(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 i=o.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function T(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 C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function E(e){if(e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=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 a.next=a}}return{next:j}}function j(){return{value:t,done:!0}}return g.prototype=m,s(N,"constructor",m),s(m,"constructor",g),g.displayName=s(m,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,s(e,c,"GeneratorFunction")),e.prototype=Object.create(N),e},e.awrap=function(e){return{__await:e}},x(P.prototype),s(P.prototype,a,(function(){return this})),e.AsyncIterator=P,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new P(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},x(N),s(N,c,"Generator"),s(N,i,(function(){return this})),s(N,"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,C.prototype={constructor:C,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 c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(s&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.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 i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},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=i},4061:e=>{"use strict";e.exports=r},6870:e=>{"use strict";e.exports=n},5537:e=>{"use strict";e.exports=o},4212:t=>{"use strict";t.exports=e},748:e=>{"use strict";e.exports=t}},c={};function s(e){var t=c[e];if(void 0!==t)return t.exports;var r=c[e]={exports:{}};return a[e](r,r.exports,s),r.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return(()=>{"use strict";s.r(l),s.d(l,{BkCascader:()=>m,BkCascaderPanel:()=>u,default:()=>b});var e=s(4212),t=s(748),r=s(4061),n=s(6870),o=s(5537),i=s.n(o);s(7162),Symbol("BkSelect"),Symbol("BkOptionGroup");var a=s(5800),c=s.n(a);const u=(0,t.defineComponent)({name:"CascaderPanel",props:{store:e.PropTypes.object.def({})},emits:["input"],setup:function(r,n){var o=n.emit,i=r.store,a=(0,t.reactive)({list:[r.store.getNodes()]}),c=(0,t.ref)([]),s=(0,t.ref)([]),l=function(e){e.config.multiple?s.value=i.getCheckedNodes().map((function(e){return e.path})):s.value=e.path,o("input",s.value)},u=function(e){var t;e.isDisabled||(a.list=a.list.slice(0,e.level),c.value=c.value.slice(0,e.level-1),(null===(t=e.children)||void 0===t?void 0:t.length)&&(a.list.push(e.children),c.value.push(e)))};return{menus:a,activePath:c,nodeExpandHandler:u,isNodeInPath:function(e){return(c.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&&u(e),n&&!o&&l(e),e.isLeaf&&!o&&l(e)},onMouseenter:function(){"hover"===r&&u(e)}}},isCheckedNode:function(t,r){return!t.config.multiple&&(0,e.arrayEqual)(r,t.path)},checkValue:s,nodeClear:function(){o("input",[])},checkNode:function(e,t){e.setNodeCheck(t),l(e)}}},render:function(){var e=this;return(0,t.createVNode)("div",{class:"bk-cascader-panel-wrapper"},[this.menus.list.map((function(r){return(0,t.createVNode)("ul",{class:"bk-cascader-panel"},[r.map((function(r){return(0,t.createVNode)("li",(0,t.mergeProps)({class:["bk-cascader-node",{"is-selected":e.isNodeInPath(r)},{"is-disabled":r.isDisabled},{"is-checked":e.isCheckedNode(r,e.checkValue)}]},e.nodeEvent(r)),[r.config.multiple&&(0,t.createVNode)(c(),{disabled:r.isDisabled,modelValue:r.checked,"onUpdate:modelValue":function(e){return r.checked=e},onChange:function(t){return e.checkNode(r,t)}},null),(0,t.createVNode)("span",{class:"content"},[r.name]),r.isLeaf?"":(0,t.createVNode)(n.AngleRight,{class:"icon-angle-right"},null)])}))])}))])}});function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(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 p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}const f=function(){function e(t,r,n){d(this,e),this.data=t,this.config=r,this.parent=n||null,this.level=this.parent?this.parent.level+1:1,this.initState()}return p(e,[{key:"initState",value:function(){var t,r=this,n=this.config,o=n.idKey,i=n.nameKey,a=n.childrenKey;this.id=this.data[o],this.name=this.data[i],this.loading=!1,this.checked=!1;var c=this.data[a];this.children=(c||[]).map((function(t){return new e(t,r.config,r)})),this.hasChildren=0!==(null===(t=this.children)||void 0===t?void 0:t.length),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(){return!this.hasChildren}},{key:"isDisabled",get:function(){return this.data.disabled}},{key:"setNodeCheck",value:function(e){this.checked=e}},{key:"calculateNodesPath",value:function(){for(var e=[this],t=this.parent;t;)e.unshift(t),t=t.parent;return e}}]),e}();var v=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 y=function(){function t(r){var n=this;d(this,t);var o=r.list;this.data=o,this.config=(0,e.filterProperty)(r,["list"]),this.nodes=this.data.map((function(e){return new f(e,n.config)}))}return p(t,[{key:"getNodes",value:function(){return this.nodes}},{key:"getFlattedNodes",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return v(this.nodes,e)}},{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}}]),t}(),g=(0,t.defineComponent)({name:"Cascader",directives:{clickoutside:r.clickoutside},components:{CascaderPanel:u,BkPopover:i()},props:{modelValue:e.PropTypes.array.def([]),list:e.PropTypes.array.def([]),placeholder:e.PropTypes.string.def("请选择"),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(!1),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("")},emits:["update:modelValue"],setup:function(e,r){var n=r.emit,o=e.separator,i=e.multiple,a=function(){var e=(0,t.ref)(!1);return{isHover:e,setHover:function(){e.value=!0},cancelHover:function(){e.value=!1}}}(),c=a.isHover,s=a.setHover,l=a.cancelHover,u=(0,t.reactive)(new y(e)),d=(0,t.ref)(!1),h=(0,t.ref)(""),p=(0,t.ref)([]),f=function(e){if(n("update:modelValue",e),i)p.value=u.getCheckedNodes().map((function(e){return{text:e.pathNames.join(o),key:e.id}}));else if(0!==e.length){var t=u.getNodeByValue(e);h.value=t.pathNames.join(o)}else h.value=""};return{store:u,updateValue:f,hidePopover:function(){d.value=!1},inputClickHandler:function(e){e.stopPropagation(),d.value=!d.value},selectedText:h,panelShow:d,handleClear:function(e){e.stopPropagation(),f([])},isHover:c,setHover:s,cancelHover:l,selectedTags:p,removeTag:function(e,t,r){r.stopPropagation();var n=JSON.parse(JSON.stringify(e));n.splice(t,1),f(n)}}},render:function(){var e=this;return(0,t.createVNode)("div",{class:["bk-cascader","bk-cascader-wrapper",this.extCls,{"bk-is-show-panel":this.panelShow,"is-unselected":0===this.modelValue.length}],tabindex:"0","data-placeholder":this.placeholder,onMouseenter:this.setHover,onMouseleave:this.cancelHover},[e.clearable&&e.isHover?(0,t.createVNode)(n.Close,{class:"bk-icon-clear-icon",onClick:e.handleClear},null):(0,t.createVNode)(n.AngleUp,{class:"bk-icon-angle-up"},null),(0,t.createVNode)(i(),{placement:"bottom-start",theme:"light bk-cascader-popover",trigger:"click",arrow:!1,class:"bk-cascader-popover-wrapper",isShow:e.panelShow,"onUpdate:isShow":function(t){return e.panelShow=t},boundary:"body"},{default:function(){return(0,t.createVNode)("div",{class:"bk-cascader-name",onClick:e.inputClickHandler},[e.multiple&&(e.limitOneLine?(0,t.createVNode)("span",null,[e.selectedText]):(0,t.createVNode)("div",{class:"cascader-tag-list"},[e.selectedTags.map((function(r,o){return(0,t.createVNode)("span",{class:"cascader-tag-item"},[(0,t.createVNode)("span",{class:"cascader-tag-item-name"},[r.text]),(0,t.createVNode)(n.Error,{class:"bk-icon-clear-icon",onClick:function(t){return e.removeTag(e.modelValue,o,t)}},null)])}))])),e.filterable?(0,t.createVNode)("input",{class:"bk-cascader-search-input",type:"text",placeholder:e.placeholder},null):(0,t.createVNode)("span",null,[e.selectedText])])},content:function(){return(0,t.createVNode)("div",{class:"bk-cascader-popover"},[(0,t.createVNode)(u,{store:e.store,onInput:function(t){return e.updateValue(t)}},null)])}})])}});var m=(0,e.withInstallProps)(g,{CascaderPanel:u});const b=m})(),l})()));
|
1
|
+
/*! For license information please see index.js.LICENSE.txt */
|
2
|
+
!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,l,s)=>(()=>{var c={5800:e=>{"use strict";e.exports=s},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=l},748:e=>{"use strict";e.exports=t},210:e=>{"use strict";e.exports=r},7609:(e,t,r)=>{var n=r(7425).default;function o(){"use strict";e.exports=o=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},r=Object.prototype,a=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},l="function"==typeof Symbol?Symbol:{},s=l.iterator||"@@iterator",c=l.asyncIterator||"@@asyncIterator",u=l.toStringTag||"@@toStringTag";function d(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof v?t:v,a=Object.create(o.prototype),l=new L(n||[]);return i(a,"_invoke",{value:w(e,r,l)}),a}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var h={};function v(){}function y(){}function g(){}var m={};d(m,s,(function(){return this}));var b=Object.getPrototypeOf,N=b&&b(b(S([])));N&&N!==r&&a.call(N,s)&&(m=N);var k=g.prototype=v.prototype=Object.create(m);function T(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function r(o,i,l,s){var c=p(e[o],e,i);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==n(d)&&a.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,l,s)}),(function(e){r("throw",e,l,s)})):t.resolve(d).then((function(e){u.value=e,l(u)}),(function(e){return r("throw",e,l,s)}))}s(c.arg)}var o;i(this,"_invoke",{value: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 w(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return{value:void 0,done:!0}}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var l=P(i,r);if(l){if(l===h)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=p(e,t,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===h)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function P(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,P(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=p(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,h;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}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 S(e){if(e){var t=e[s];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(a.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:E}}function E(){return{value:void 0,done:!0}}return y.prototype=g,i(k,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:y,configurable:!0}),y.displayName=d(g,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,d(e,u,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},T(x.prototype),d(x.prototype,c,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new x(f(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},T(k),d(k,u,"Generator"),d(k,s,(function(){return this})),d(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=S,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(V),!e)for(var t in this)"t"===t.charAt(0)&&a.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},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 t=this;function r(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var l=a.call(o,"catchLoc"),s=a.call(o,"finallyLoc");if(l&&s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):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),h},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),h}},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,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},7425:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},2841:(e,t,r)=>{var n=r(7609)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},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 f={};return(()=>{"use strict";d.r(f),d.d(f,{BkCascader:()=>P,BkCascaderPanel:()=>v,default:()=>C});var e=d(4212),t=d(748),r=d(210),n=d(2717),o=d(4061),a=d(6870),i=d(5537),l=d.n(i),s=d(7739),c=d.n(s);d(2841),Symbol("BkSelect"),Symbol("BkOptionGroup");var u=d(5800),p=d.n(u);function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}const v=(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,l=(0,n.useLocale)("select"),s=r.store,c=(0,t.reactive)({list:[r.store.getNodes()]}),u=(0,t.ref)([]),d=(0,t.ref)([]),f=function(e){return"number"==typeof e?"".concat(e,"px"):e},p=f(r.height),v=f(r.width),y=function(e){var t=[];if(s.config.multiple){var r,n=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(l)throw a}}}}(e);try{for(n.s();!(r=n.n()).done;){var o=r.value;o.length>t.length&&(t=o)}}catch(e){n.e(e)}finally{n.f()}}else t=e;t.forEach((function(e){var t=s.getNodeById(e);m(t)}))},g=function(e){if(!e.isDisabled){if(e.config.multiple){var t=s.config.checkAnyLevel?s.getCheckedNodes():s.getCheckedLeafNodes();d.value=t.map((function(e){return e.path}))}else d.value=e.path;i("update:modelValue",d.value)}},m=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);s.config.isRemote&&!e.isLeaf&&(e.loading=!0,s.config.remoteMethod(e,(function(t){s.appendNodes(t,e||null),c.list.push(e.children),u.value.push(e),e.loading=!1})))}},b=l.value.noData,N=function(e,t){e.setNodeCheck(t||!1),g(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=[]),y(e),d.value=e}(e)}),{immediate:!0}),(0,t.watch)((function(){return r.store}),(function(e){c.list=[e.getNodes()]})),{menus:c,activePath:u,nodeExpandHandler:m,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&&m(e),n&&!o&&g(e),e.isLeaf&&!o&&g(e)},onMouseenter:function(){"hover"===r&&m(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:N,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:v,panelHeight:p,searchPanelEvents:function(e){var t=e.config.multiple;return{onClick:function(r){if(t)return r.stopPropagation(),void N(e,!e.checked);m(e),e.isLeaf&&!t&&g(e)}}},expandByNodeList:y,noDataText:b}},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 y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function m(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,(o=n.key,a=void 0,a=function(e,t){if("object"!==g(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==g(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o),"symbol"===g(a)?a:String(a)),n)}var o,a}function b(e,t,r){return t&&m(e.prototype,t),r&&m(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function N(e){return!!e.data.disabled||(1!==e.level?N(e.parent):e.data.disabled)}const k=function(){function t(e,r,n){y(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 b(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 N(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){this.config.checkAnyLevel?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 T=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 x=function(){function t(e){var r=this;y(this,t);var n=e.list;this.data=n,this.config=e,this.nodes=this.data.map((function(e){return new k(e,r.config)}))}return b(t,[{key:"getNodes",value:function(){return this.nodes}},{key:"clearChecked",value:function(){this.getFlattedNodes().forEach((function(e){e.setNodeCheck(!1),e.isIndeterminate=!1}))}},{key:"removeTag",value:function(t){this.getFlattedNodes().find((function(r){return!!(0,e.arrayEqual)(t,r.path)&&(r.setNodeCheck(!1),!0)}))}},{key:"getFlattedNodes",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return T(this.nodes,e)}},{key:"setNodesCheck",value:function(t){var r=this;this.getFlattedNodes().forEach((function(n){n.setNodeCheck(!1);var o=t.find((function(t){return(0,e.arrayEqual)(n.path,t)}));o&&r.getNodeByValue(o).setNodeCheck(!0)}))}},{key:"getCheckedNodes",value:function(){return this.getFlattedNodes().filter((function(e){return e.checked}))}},{key:"getCheckedLeafNodes",value:function(){return this.getFlattedNodes().filter((function(e){return e.isLeaf&&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 k(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}(),w=(0,t.defineComponent)({name:"Cascader",directives:{bkTooltips:o.bkTooltips},components:{CascaderPanel:v,BkPopover:l(),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(""),filterMethod:e.PropTypes.func.def(null),scrollHeight:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]).def(216),scrollWidth:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]).def("auto"),customTextFillback:e.PropTypes.func.def(null),customTagsFillback:e.PropTypes.func.def(null),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=o.slots,l=(0,n.useLocale)("select"),s=r.separator,c=r.multiple,u=function(){var e=(0,t.ref)(!1);return{isHover:e,setHover:function(){e.value=!0},cancelHover:function(){e.value=!1}}}(),d=u.isHover,f=u.setHover,p=u.cancelHover,h=(0,t.ref)(new x(r)),v=(0,t.ref)(""),y=(0,t.ref)([]),g=(0,t.toRefs)(r).modelValue,m=(0,t.ref)(),b=(0,t.ref)(""),N=(0,t.ref)([]),k=(0,t.ref)(!1),T=(0,t.ref)(!1),w=(0,t.ref)(!1),P=(0,t.computed)({get:function(){return g.value},set:function(e){a("update:modelValue",e)}}),C=(0,t.ref)(null),V=(0,t.ref)(null),L=(0,t.ref)(null),S=(0,t.computed)((function(){return r.placeholder?r.placeholder:l.value.pleaseSelect})),E=(0,t.computed)((function(){return r.customTextFillback?r.customTextFillback(r.modelValue,h.value.getFlattedNodes()):v.value})),O=function(e){return r.showCompleteName?e.pathNames.join(s):e.pathNames[e.pathNames.length-1]},j=function(e){var t;if(c)return h.value.setNodesCheck(e),y.value=h.value.getCheckedNodes().filter((function(e){return h.value.config.checkAnyLevel||e.isLeaf})).map((function(e){return{text:O(e),key:e.id}})),void(v.value=y.value.map((function(e){return e.text})).join(", "));r.checkAnyLevel||null===(t=null==C?void 0:C.value)||void 0===t||t.hide();var n=h.value.getNodeByValue(e);v.value=n?O(n):"",b.value=v.value},I=(0,e.debounce)(200,(function(e){var t=e.target;if(b.value=t.value,""!==b.value){k.value=!0,k.value=!0;var n=r.filterMethod?r.filterMethod:function(e){return(r.checkAnyLevel||e.isLeaf)&&e.pathNames.join(r.separator).includes(b.value)},o=h.value.getFlattedNodes().filter((function(e){return n(e,b.value)}));N.value=o,!(null==C?void 0:C.value.isShow)&&(null==C||C.value.show())}else k.value=!1})),F=function(){a("focus")};(0,t.watch)((function(){return r.modelValue}),(function(e,t){var r;j(e),a("update:modelValue",e),void 0!==t&&a("change",e),null===(r=null==L?void 0:L.value)||void 0===r||r.focus()}),{immediate:!0}),(0,t.watch)((function(){return r.list}),(function(){h.value=new x(r),j(r.modelValue)}),{deep:!0,immediate:!0});var _=(0,t.computed)((function(){return r.customTagsFillback?r.customTagsFillback(r.modelValue,h.value.getFlattedNodes()):y.value.map((function(e){return e.text}))})),q=(0,t.computed)((function(){return r.collapseTags?r.collapseTags&&w.value:r.collapseTags})),A=(0,t.computed)((function(){return r.collapseTags?r.collapseTags&&T.value:r.collapseTags})),H=i.trigger?{overflowTagIndex:null}: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}}(V,A,_),M=H.overflowTagIndex;return{calcuPlaceholder:S,bkCascaderRef:V,inputRef:L,overflowTagIndex:M,isCollapse:q,isFocus:w,store:h,updateValue:j,selectedText:v,checkedValue:P,handleClear:function(e){e.stopPropagation(),h.value.clearChecked(),b.value="",j([]),a("update:modelValue",[]),a("clear",JSON.parse(JSON.stringify(r.modelValue)))},isHover:d,setHover:f,popover:C,cancelHover:p,selectedTags:y,removeTag:function(e,t,r){r.stopPropagation();var n=JSON.parse(JSON.stringify(e)),o=n.splice(t,1)[0];T.value=!0,h.value.removeTag(o),j(n),a("update:modelValue",h.value.getCheckedNodes().map((function(e){return e.path}))),setTimeout((function(){T.value=w.value}))},cascaderPanel:m,popoverChangeEmitter:function(e){a("toggle",e.isShow),T.value=e.isShow,w.value=e.isShow,(0,t.nextTick)((function(){var t;e&&(null===(t=L.value)||void 0===t||t.focus())})),e.isShow&&F(),e.isShow||(k.value=!1)},searchKey:b,suggestions:N,isFiltering:k,searchInputHandler:I,focusEmitter:F,tagList:_,isEdit:T,displayText:E}},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)(l(),{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.displayText]):(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.displayText])])},content:function(){return(0,t.createVNode)("div",{class:(0,e.resolveClassName)("cascader-popover")},[(0,t.createVNode)(v,{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 P=(0,e.withInstallProps)(w,{CascaderPanel:v});const C=P})(),f})()));
|
@@ -0,0 +1 @@
|
|
1
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
@@ -12,21 +12,26 @@ export interface INode {
|
|
12
12
|
children?: (null)[] | null;
|
13
13
|
config: IConfig;
|
14
14
|
data: IData;
|
15
|
-
|
15
|
+
leaf: boolean;
|
16
16
|
id: string;
|
17
17
|
level: number;
|
18
18
|
loading: boolean;
|
19
|
+
loaded: boolean;
|
19
20
|
name: string;
|
20
21
|
parent?: INode;
|
21
22
|
isDisabled: boolean;
|
23
|
+
isIndeterminate: boolean;
|
22
24
|
isLeaf: boolean;
|
23
25
|
pathNames: string[];
|
24
26
|
path: string[];
|
25
27
|
setNodeCheck(status: boolean): void;
|
28
|
+
broadcast(event: string, check: boolean): void;
|
29
|
+
emit(event: string): void;
|
26
30
|
}
|
27
31
|
export interface IData {
|
28
32
|
id: string;
|
29
33
|
name: string;
|
34
|
+
leaf?: boolean;
|
30
35
|
disabled?: boolean;
|
31
36
|
children?: IData[];
|
32
37
|
}
|
@@ -41,4 +46,6 @@ export interface IConfig {
|
|
41
46
|
nameKey: string;
|
42
47
|
showCompleteName: boolean;
|
43
48
|
trigger: string;
|
49
|
+
separator: string;
|
50
|
+
remoteMethod: Function;
|
44
51
|
}
|
package/lib/cascader/node.d.ts
CHANGED
@@ -7,9 +7,11 @@ declare class Node implements INode {
|
|
7
7
|
id: string;
|
8
8
|
name: string;
|
9
9
|
loading: boolean;
|
10
|
+
loaded: boolean;
|
10
11
|
checked: boolean;
|
12
|
+
isIndeterminate: boolean;
|
11
13
|
children?: null[];
|
12
|
-
|
14
|
+
leaf: boolean;
|
13
15
|
pathNodes: INode[];
|
14
16
|
path: string[];
|
15
17
|
pathNames: string[];
|
@@ -17,7 +19,12 @@ declare class Node implements INode {
|
|
17
19
|
constructor(node: IData, config: any, parent?: any);
|
18
20
|
initState(): void;
|
19
21
|
get isLeaf(): boolean;
|
20
|
-
get isDisabled():
|
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;
|
21
28
|
setNodeCheck(status: boolean): void;
|
22
29
|
calculateNodesPath(): INode[];
|
23
30
|
}
|
package/lib/cascader/store.d.ts
CHANGED
@@ -5,11 +5,23 @@ declare class Store {
|
|
5
5
|
nodes: INode[];
|
6
6
|
constructor(props: any);
|
7
7
|
getNodes(): INode[];
|
8
|
+
/** 清空所有checked */
|
9
|
+
clearChecked(): void;
|
10
|
+
/** 移除某一个Tag的check状态 */
|
11
|
+
removeTag(tag: string[]): void;
|
8
12
|
/** 拍平节点,方便筛选 */
|
9
13
|
getFlattedNodes(leafOnly?: boolean): any;
|
14
|
+
/** 根据传入节点设置节点check状态 */
|
15
|
+
setNodesCheck(nodes: Array<string[]>): void;
|
10
16
|
/** 获取多选下,被选中(checked)的节点 */
|
11
17
|
getCheckedNodes(): any;
|
18
|
+
/** 获取多选下,被选中(checked),且为叶子节点的节点 */
|
19
|
+
getCheckedLeafNodes(): any;
|
12
20
|
/** 根据值获得node实例 */
|
13
|
-
getNodeByValue(value: string[]): INode;
|
21
|
+
getNodeByValue(value: Array<number | string | string[]>): INode;
|
22
|
+
getNodeById(id: number | string): INode;
|
23
|
+
/** 插入单个节点 */
|
24
|
+
appendNode(nodeData: IData, parentNode: IData): void;
|
25
|
+
appendNodes(nodeDataList: IData[], parentNode: IData): void;
|
14
26
|
}
|
15
27
|
export default Store;
|
@@ -11,8 +11,13 @@ 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
|
-
export
|
20
|
+
export type CheckboxGroupProps = Readonly<ExtractPropTypes<typeof checkboxGroupProps>>;
|
16
21
|
declare const _default: import("vue").DefineComponent<{
|
17
22
|
name: import("vue-types").VueTypeValidableDef<string> & {
|
18
23
|
default: string;
|
@@ -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[];
|
47
|
-
|
62
|
+
withValidate: boolean;
|
63
|
+
}, {}>;
|
48
64
|
export default _default;
|
@@ -1,33 +1,52 @@
|
|
1
|
+
.bk-checkbox-group {
|
2
|
+
display: inline-flex;
|
3
|
+
letter-spacing: normal;
|
4
|
+
}
|
1
5
|
.bk-checkbox {
|
2
6
|
display: inline-flex;
|
3
7
|
justify-self: center;
|
4
|
-
|
8
|
+
align-items: center;
|
5
9
|
font-size: 14px;
|
6
|
-
line-height: 18px;
|
7
10
|
letter-spacing: normal;
|
8
11
|
color: #63656e;
|
9
12
|
cursor: pointer;
|
10
13
|
user-select: none;
|
11
14
|
}
|
15
|
+
.bk-checkbox ~ .bk-checkbox {
|
16
|
+
margin-left: 30px;
|
17
|
+
}
|
12
18
|
.bk-checkbox.is-checked .bk-checkbox-input {
|
13
19
|
background: #3a84ff;
|
14
20
|
border-color: #3a84ff;
|
15
21
|
transition: all 0.1s;
|
16
22
|
}
|
23
|
+
.bk-checkbox.is-checked .bk-checkbox-input.small::after {
|
24
|
+
width: 3px;
|
25
|
+
height: 6px;
|
26
|
+
}
|
17
27
|
.bk-checkbox.is-checked .bk-checkbox-input::after {
|
18
28
|
position: absolute;
|
19
|
-
top:
|
20
|
-
left:
|
29
|
+
top: 50%;
|
30
|
+
left: 50%;
|
21
31
|
width: 4px;
|
22
32
|
height: 8px;
|
23
33
|
border: 2px solid #fff;
|
24
34
|
border-top: 0;
|
25
35
|
border-left: 0;
|
26
36
|
content: '';
|
27
|
-
transform: scaleY(1) rotate(45deg);
|
37
|
+
transform: translate(-50%, -60%) scaleY(1) rotate(45deg);
|
28
38
|
transform-origin: center;
|
29
39
|
}
|
30
|
-
.bk-checkbox.is-indeterminated .bk-checkbox-input
|
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 {
|
31
50
|
position: absolute;
|
32
51
|
top: 50%;
|
33
52
|
left: 50%;
|
@@ -51,19 +70,26 @@
|
|
51
70
|
background: #dcdee5;
|
52
71
|
}
|
53
72
|
.bk-checkbox.is-disabled.is-checked .bk-checkbox-input {
|
54
|
-
background: #
|
73
|
+
background: #a3c5fd;
|
74
|
+
border-color: #a3c5fd;
|
55
75
|
}
|
56
|
-
.bk-checkbox .bk-checkbox-input {
|
76
|
+
.bk-checkbox.is-disabled.is-checked .bk-checkbox-input::after {
|
77
|
+
background: #a3c5fd;
|
78
|
+
}
|
79
|
+
.bk-checkbox-input {
|
57
80
|
position: relative;
|
58
81
|
display: inline-block;
|
59
82
|
width: 16px;
|
60
83
|
height: 16px;
|
61
|
-
margin-right: 5px;
|
62
84
|
vertical-align: middle;
|
63
85
|
border: 1px solid #979ba5;
|
64
86
|
border-radius: 2px;
|
65
87
|
}
|
66
|
-
.bk-checkbox
|
88
|
+
.bk-checkbox-input.small {
|
89
|
+
width: 14px;
|
90
|
+
height: 14px;
|
91
|
+
}
|
92
|
+
.bk-checkbox-original {
|
67
93
|
position: absolute;
|
68
94
|
top: 0;
|
69
95
|
left: 0;
|
@@ -71,7 +97,8 @@
|
|
71
97
|
width: 0;
|
72
98
|
height: 0;
|
73
99
|
}
|
74
|
-
.bk-checkbox
|
100
|
+
.bk-checkbox-label {
|
75
101
|
display: inline-block;
|
102
|
+
margin-left: 6px;
|
76
103
|
vertical-align: middle;
|
77
104
|
}
|
@@ -1,8 +1,6 @@
|
|
1
1
|
import type { ExtractPropTypes } from 'vue';
|
2
2
|
export declare const checkboxProps: {
|
3
|
-
modelValue: import("vue-types").VueTypeDef<string | number | boolean
|
4
|
-
default: string | number | boolean;
|
5
|
-
};
|
3
|
+
modelValue: import("vue-types").VueTypeDef<string | number | boolean>;
|
6
4
|
label: import("vue-types").VueTypeDef<string | number | boolean>;
|
7
5
|
trueLabel: import("vue-types").VueTypeDef<string | number | boolean> & {
|
8
6
|
default: string | number | boolean;
|
@@ -26,13 +24,18 @@ export declare const checkboxProps: {
|
|
26
24
|
beforeChange: import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
|
27
25
|
default: (...args: any[]) => any;
|
28
26
|
};
|
29
|
-
size: import("vue-types").VueTypeDef<
|
27
|
+
size: import("vue-types").VueTypeDef<"small" | "large" | "default"> & {
|
28
|
+
default: "small" | "large" | "default";
|
29
|
+
};
|
30
|
+
immediateEmitChange: import("vue-types").VueTypeValidableDef<boolean> & {
|
31
|
+
default: boolean;
|
32
|
+
} & {
|
33
|
+
default: boolean;
|
34
|
+
};
|
30
35
|
};
|
31
|
-
export
|
36
|
+
export type CheckboxProps = Readonly<ExtractPropTypes<typeof checkboxProps>>;
|
32
37
|
declare const _default: import("vue").DefineComponent<{
|
33
|
-
modelValue: import("vue-types").VueTypeDef<string | number | boolean
|
34
|
-
default: string | number | boolean;
|
35
|
-
};
|
38
|
+
modelValue: import("vue-types").VueTypeDef<string | number | boolean>;
|
36
39
|
label: import("vue-types").VueTypeDef<string | number | boolean>;
|
37
40
|
trueLabel: import("vue-types").VueTypeDef<string | number | boolean> & {
|
38
41
|
default: string | number | boolean;
|
@@ -56,8 +59,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
56
59
|
beforeChange: import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
|
57
60
|
default: (...args: any[]) => any;
|
58
61
|
};
|
59
|
-
size: import("vue-types").VueTypeDef<
|
62
|
+
size: import("vue-types").VueTypeDef<"small" | "large" | "default"> & {
|
63
|
+
default: "small" | "large" | "default";
|
64
|
+
};
|
65
|
+
immediateEmitChange: import("vue-types").VueTypeValidableDef<boolean> & {
|
66
|
+
default: boolean;
|
67
|
+
} & {
|
68
|
+
default: boolean;
|
69
|
+
};
|
60
70
|
}, {
|
71
|
+
inputRef: import("vue").Ref<any>;
|
61
72
|
isFocus: import("vue").Ref<boolean>;
|
62
73
|
isChecked: import("vue").Ref<boolean>;
|
63
74
|
isDisabled: import("vue").ComputedRef<boolean>;
|
@@ -65,10 +76,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
65
76
|
handleBlur: () => void;
|
66
77
|
handleFocus: () => void;
|
67
78
|
handleChange: (event: Event) => void;
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
79
|
+
size: "small" | "large" | "default";
|
80
|
+
resolveClassName: (cls: string) => string;
|
81
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
82
|
+
'update:modelValue': (value: CheckboxProps['modelValue']) => boolean;
|
83
|
+
change: (value: CheckboxProps['modelValue']) => boolean;
|
84
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
85
|
+
modelValue: import("vue-types").VueTypeDef<string | number | boolean>;
|
72
86
|
label: import("vue-types").VueTypeDef<string | number | boolean>;
|
73
87
|
trueLabel: import("vue-types").VueTypeDef<string | number | boolean> & {
|
74
88
|
default: string | number | boolean;
|
@@ -92,17 +106,25 @@ declare const _default: import("vue").DefineComponent<{
|
|
92
106
|
beforeChange: import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
|
93
107
|
default: (...args: any[]) => any;
|
94
108
|
};
|
95
|
-
size: import("vue-types").VueTypeDef<
|
109
|
+
size: import("vue-types").VueTypeDef<"small" | "large" | "default"> & {
|
110
|
+
default: "small" | "large" | "default";
|
111
|
+
};
|
112
|
+
immediateEmitChange: import("vue-types").VueTypeValidableDef<boolean> & {
|
113
|
+
default: boolean;
|
114
|
+
} & {
|
115
|
+
default: boolean;
|
116
|
+
};
|
96
117
|
}>> & {
|
97
|
-
onChange?: (
|
98
|
-
"onUpdate:modelValue"?: (
|
118
|
+
onChange?: (value: string | number | boolean) => any;
|
119
|
+
"onUpdate:modelValue"?: (value: string | number | boolean) => any;
|
99
120
|
}, {
|
100
121
|
disabled: boolean;
|
101
|
-
|
122
|
+
size: "small" | "large" | "default";
|
102
123
|
trueLabel: string | number | boolean;
|
103
124
|
falseLabel: string | number | boolean;
|
104
125
|
checked: boolean;
|
105
126
|
indeterminate: boolean;
|
106
127
|
beforeChange: (...args: any[]) => any;
|
107
|
-
|
128
|
+
immediateEmitChange: boolean;
|
129
|
+
}, {}>;
|
108
130
|
export default _default;
|
@@ -1,41 +1,67 @@
|
|
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
9
|
display: inline-flex;
|
5
10
|
justify-self: center;
|
6
|
-
|
11
|
+
align-items: center;
|
7
12
|
font-size: 14px;
|
8
|
-
line-height: 18px;
|
9
13
|
letter-spacing: normal;
|
10
14
|
color: #63656e;
|
11
15
|
cursor: pointer;
|
12
16
|
user-select: none;
|
13
17
|
|
18
|
+
& ~ .@{bk-prefix}-checkbox {
|
19
|
+
margin-left: 30px;
|
20
|
+
}
|
21
|
+
|
14
22
|
&.is-checked {
|
15
|
-
|
23
|
+
.@{bk-prefix}-checkbox-input {
|
16
24
|
background: @primary-color;
|
17
25
|
border-color: @primary-color;
|
18
26
|
transition: all .1s;
|
19
27
|
|
28
|
+
&.small {
|
29
|
+
&::after {
|
30
|
+
width: 3px;
|
31
|
+
height: 6px;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
20
35
|
&::after {
|
21
36
|
position: absolute;
|
22
|
-
top:
|
23
|
-
left:
|
37
|
+
top: 50%;
|
38
|
+
left: 50%;
|
24
39
|
width: 4px;
|
25
40
|
height: 8px;
|
26
41
|
border: 2px solid #fff;
|
27
42
|
border-top: 0;
|
28
43
|
border-left: 0;
|
29
44
|
content: '';
|
30
|
-
transform: scaleY(1) rotate(45deg);
|
45
|
+
transform: translate(-50%, -60%) scaleY(1) rotate(45deg);
|
31
46
|
transform-origin: center;
|
32
47
|
}
|
33
48
|
}
|
34
49
|
}
|
35
50
|
|
36
51
|
&.is-indeterminated {
|
37
|
-
|
38
|
-
|
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 {
|
39
65
|
position: absolute;
|
40
66
|
top: 50%;
|
41
67
|
left: 50%;
|
@@ -54,7 +80,7 @@
|
|
54
80
|
color: #c4c6cc;
|
55
81
|
cursor: not-allowed;
|
56
82
|
|
57
|
-
|
83
|
+
.@{bk-prefix}-checkbox-input {
|
58
84
|
background: #fafbfd;
|
59
85
|
border-color: @disable-color;
|
60
86
|
|
@@ -64,35 +90,44 @@
|
|
64
90
|
}
|
65
91
|
|
66
92
|
&.is-checked {
|
67
|
-
|
68
|
-
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
|
+
}
|
69
100
|
}
|
70
101
|
}
|
71
102
|
}
|
103
|
+
}
|
72
104
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
border-radius: 2px;
|
82
|
-
|
83
|
-
}
|
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;
|
84
113
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
left: 0;
|
89
|
-
z-index: -1;
|
90
|
-
width: 0;
|
91
|
-
height: 0;
|
114
|
+
&.small {
|
115
|
+
width: 14px;
|
116
|
+
height: 14px;
|
92
117
|
}
|
118
|
+
}
|
93
119
|
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
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;
|
98
133
|
}
|