bkui-vue 0.0.1-beta.3 → 0.0.1-beta.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -19
- package/README_EN.md +93 -0
- package/dist/bkui-vue.cjs.js +18095 -2770
- package/dist/bkui-vue.esm.js +18052 -2776
- package/dist/bkui-vue.umd.js +18097 -2772
- package/dist/style.css +4114 -259
- package/lib/alert/alert.d.ts +24 -15
- package/lib/alert/alert.variable.css +32 -0
- package/lib/alert/index.d.ts +180 -0
- package/lib/alert/index.js +1 -1
- package/lib/animate-number/animate-number.d.ts +12 -7
- package/lib/animate-number/index.d.ts +97 -0
- package/lib/animate-number/index.js +1 -1
- package/lib/backtop/backtop.d.ts +27 -13
- package/lib/backtop/backtop.variable.css +32 -0
- package/lib/backtop/index.d.ts +166 -0
- package/lib/backtop/index.js +10 -1
- package/lib/badge/badge.d.ts +40 -19
- package/lib/badge/badge.variable.css +32 -0
- package/lib/badge/index.d.ts +217 -0
- package/lib/badge/index.js +1 -1
- package/lib/breadcrumb/breadcrumb-item.d.ts +13 -9
- package/lib/breadcrumb/breadcrumb.css +10 -1
- package/lib/breadcrumb/breadcrumb.d.ts +37 -9
- package/lib/breadcrumb/breadcrumb.less +13 -2
- package/lib/breadcrumb/breadcrumb.variable.css +42 -1
- package/lib/breadcrumb/index.d.ts +194 -0
- package/lib/breadcrumb/index.js +1 -1
- package/lib/button/button-group.d.ts +3 -5
- package/lib/button/button.css +9 -0
- package/lib/button/button.d.ts +57 -28
- package/lib/button/button.less +23 -15
- package/lib/button/button.variable.css +41 -0
- package/lib/button/index.d.ts +226 -0
- package/lib/button/index.js +1 -1
- package/lib/card/card.d.ts +30 -15
- package/lib/card/card.variable.css +32 -0
- package/lib/card/index.d.ts +187 -0
- package/lib/card/index.js +1 -1
- package/lib/checkbox/checkbox-group.d.ts +13 -9
- package/lib/checkbox/checkbox.d.ts +31 -22
- package/lib/checkbox/checkbox.variable.css +32 -0
- package/lib/checkbox/common.d.ts +1 -1
- package/lib/checkbox/index.d.ts +261 -0
- package/lib/checkbox/index.js +1 -1
- package/lib/checkbox/type.d.ts +7 -6
- package/lib/code-diff/code-diff.css +186 -0
- package/lib/code-diff/code-diff.d.ts +80 -0
- package/lib/code-diff/code-diff.less +238 -0
- package/lib/code-diff/code-diff.variable.css +279 -0
- package/lib/code-diff/index.d.ts +154 -0
- package/lib/code-diff/index.js +1 -0
- package/lib/collapse/collapse.css +8 -0
- package/lib/collapse/collapse.d.ts +50 -18
- package/lib/collapse/collapse.less +10 -0
- package/lib/collapse/collapse.variable.css +8 -0
- package/lib/collapse/index.d.ts +166 -0
- package/lib/collapse/index.js +1 -1
- package/lib/components.d.ts +39 -0
- package/lib/date-picker/date-picker.css +407 -0
- package/lib/date-picker/date-picker.d.ts +294 -0
- package/lib/date-picker/date-picker.less +526 -0
- package/lib/date-picker/date-picker.variable.css +500 -0
- package/lib/date-picker/fecha.d.ts +6 -0
- package/lib/date-picker/index.d.ts +713 -0
- package/lib/date-picker/index.js +1 -0
- package/lib/date-picker/interface.d.ts +22 -0
- package/lib/date-picker/props.d.ts +111 -0
- package/lib/date-picker/utils.d.ts +97 -0
- package/lib/dialog/dialog.d.ts +57 -27
- package/lib/dialog/index.d.ts +286 -0
- package/lib/dialog/index.js +1 -1
- package/lib/directives/clickoutside.d.ts +3 -0
- package/lib/directives/index.d.ts +3 -0
- package/lib/directives/index.js +14 -14
- package/lib/directives/tooltips.d.ts +17 -0
- package/lib/divider/divider.css +38 -0
- package/lib/divider/divider.d.ts +48 -0
- package/lib/divider/divider.less +53 -0
- package/lib/divider/divider.variable.css +131 -0
- package/lib/divider/index.d.ts +142 -0
- package/lib/divider/index.js +1 -0
- package/lib/divider/props.d.ts +21 -0
- package/lib/dropdown/dropdown-item.d.ts +19 -0
- package/lib/dropdown/dropdown-menu.d.ts +16 -0
- package/lib/dropdown/dropdown.css +43 -0
- package/lib/dropdown/dropdown.d.ts +61 -0
- package/lib/dropdown/dropdown.less +54 -0
- package/lib/dropdown/dropdown.variable.css +136 -0
- package/lib/dropdown/index.d.ts +192 -0
- package/lib/dropdown/index.js +1 -0
- package/lib/exception/exception.d.ts +11 -9
- package/lib/exception/exception.variable.css +32 -0
- package/lib/exception/index.d.ts +96 -0
- package/lib/exception/index.js +1 -1
- package/lib/fixed-navbar/fixed-navbar.d.ts +15 -9
- package/lib/fixed-navbar/fixed-navbar.variable.css +32 -0
- package/lib/fixed-navbar/index.d.ts +112 -0
- package/lib/fixed-navbar/index.js +1 -1
- package/lib/form/common.d.ts +3 -0
- package/lib/form/form-item.d.ts +145 -0
- package/lib/form/form.css +48 -0
- package/lib/form/form.d.ts +64 -0
- package/lib/form/form.less +63 -0
- package/lib/form/form.variable.css +48 -0
- package/lib/form/index.d.ts +246 -0
- package/lib/form/index.js +1 -0
- package/lib/form/type.d.ts +21 -0
- package/lib/form/validator.d.ts +8 -0
- package/lib/icon/angle-double-down-line.d.ts +4 -0
- package/lib/icon/angle-double-down-line.js +15 -0
- package/lib/icon/angle-double-left-line.d.ts +4 -0
- package/lib/icon/angle-double-left-line.js +15 -0
- package/lib/icon/angle-double-left.d.ts +4 -0
- package/lib/icon/angle-double-left.js +15 -0
- package/lib/icon/angle-double-right-line.d.ts +4 -0
- package/lib/icon/angle-double-right-line.js +15 -0
- package/lib/icon/angle-double-right.d.ts +4 -0
- package/lib/icon/angle-double-right.js +15 -0
- package/lib/icon/angle-double-up-line.d.ts +4 -0
- package/lib/icon/angle-double-up-line.js +15 -0
- package/lib/icon/angle-down-fill.d.ts +4 -0
- package/lib/icon/angle-down-fill.js +15 -0
- package/lib/icon/angle-down-line.d.ts +4 -0
- package/lib/icon/angle-down-line.js +15 -0
- package/lib/icon/angle-down.d.ts +4 -0
- package/lib/icon/angle-down.js +15 -0
- package/lib/icon/angle-left.d.ts +4 -0
- package/lib/icon/angle-left.js +15 -0
- package/lib/icon/angle-right.d.ts +4 -0
- package/lib/icon/angle-right.js +15 -0
- package/lib/icon/angle-up-fill.d.ts +4 -0
- package/lib/icon/angle-up-fill.js +15 -0
- package/lib/icon/angle-up.d.ts +4 -0
- package/lib/icon/angle-up.js +15 -0
- package/lib/icon/arrows-left.d.ts +4 -0
- package/lib/icon/arrows-left.js +15 -0
- package/lib/icon/arrows-right.d.ts +4 -0
- package/lib/icon/arrows-right.js +15 -0
- package/lib/icon/bk.d.ts +4 -0
- package/lib/icon/bk.js +15 -0
- package/lib/icon/circle.d.ts +4 -0
- package/lib/icon/circle.js +15 -0
- package/lib/icon/close.d.ts +4 -0
- package/lib/icon/close.js +15 -0
- package/lib/icon/code.d.ts +4 -0
- package/lib/icon/code.js +15 -0
- package/lib/icon/cog-shape.d.ts +4 -0
- package/lib/icon/cog-shape.js +15 -0
- package/lib/icon/collapse-left.d.ts +4 -0
- package/lib/icon/collapse-left.js +15 -0
- package/lib/icon/copy.d.ts +4 -0
- package/lib/icon/copy.js +15 -0
- package/lib/icon/done.d.ts +4 -0
- package/lib/icon/done.js +15 -0
- package/lib/icon/down-shape.d.ts +4 -0
- package/lib/icon/down-shape.js +15 -0
- package/lib/icon/down-small.d.ts +4 -0
- package/lib/icon/down-small.js +15 -0
- package/lib/icon/ellipsis.d.ts +4 -0
- package/lib/icon/ellipsis.js +15 -0
- package/lib/icon/error.d.ts +4 -0
- package/lib/icon/error.js +15 -0
- package/lib/icon/eye.d.ts +4 -0
- package/lib/icon/eye.js +15 -0
- package/lib/icon/folder-open.d.ts +4 -0
- package/lib/icon/folder-open.js +15 -0
- package/lib/icon/folder-shape-open.d.ts +4 -0
- package/lib/icon/folder-shape-open.js +15 -0
- package/lib/icon/folder-shape.d.ts +4 -0
- package/lib/icon/folder-shape.js +15 -0
- package/lib/icon/folder.d.ts +4 -0
- package/lib/icon/folder.js +15 -0
- package/lib/icon/help-document-fill.d.ts +4 -0
- package/lib/icon/help-document-fill.js +15 -0
- package/lib/icon/help-fill.d.ts +4 -0
- package/lib/icon/help-fill.js +15 -0
- package/lib/icon/help.d.ts +4 -0
- package/lib/icon/help.js +15 -0
- package/lib/icon/icon.d.ts +12 -0
- package/lib/icon/icon.js +15 -0
- package/lib/icon/index.d.ts +53 -0
- package/lib/icon/index.js +1 -1
- package/lib/icon/info-line.d.ts +4 -0
- package/lib/icon/info-line.js +15 -0
- package/lib/icon/info.d.ts +4 -0
- package/lib/icon/info.js +15 -0
- package/lib/icon/left-shape.d.ts +4 -0
- package/lib/icon/left-shape.js +15 -0
- package/lib/icon/play-shape.d.ts +4 -0
- package/lib/icon/play-shape.js +15 -0
- package/lib/icon/plus.d.ts +4 -0
- package/lib/icon/plus.js +15 -0
- package/lib/icon/qq.d.ts +4 -0
- package/lib/icon/qq.js +15 -0
- package/lib/icon/right-shape.d.ts +4 -0
- package/lib/icon/right-shape.js +15 -0
- package/lib/icon/search.d.ts +4 -0
- package/lib/icon/search.js +15 -0
- package/lib/icon/share.d.ts +4 -0
- package/lib/icon/share.js +15 -0
- package/lib/icon/spinner.d.ts +4 -0
- package/lib/icon/spinner.js +15 -0
- package/lib/icon/success.d.ts +4 -0
- package/lib/icon/success.js +15 -0
- package/lib/icon/switcher-loading.d.ts +4 -0
- package/lib/icon/switcher-loading.js +15 -0
- package/lib/icon/text-file.d.ts +4 -0
- package/lib/icon/text-file.js +15 -0
- package/lib/icon/tree-application-shape.d.ts +4 -0
- package/lib/icon/tree-application-shape.js +15 -0
- package/lib/icon/unvisible.d.ts +4 -0
- package/lib/icon/unvisible.js +15 -0
- package/lib/icon/up-shape.d.ts +4 -0
- package/lib/icon/up-shape.js +15 -0
- package/lib/icon/warn.d.ts +4 -0
- package/lib/icon/warn.js +15 -0
- package/lib/icon/weixin.d.ts +4 -0
- package/lib/icon/weixin.js +15 -0
- package/lib/index.d.ts +4 -0
- package/lib/input/index.d.ts +417 -0
- package/lib/input/index.js +2 -2
- package/lib/input/input.css +20 -2
- package/lib/input/input.d.ts +97 -45
- package/lib/input/input.less +28 -5
- package/lib/input/input.variable.css +52 -2
- package/lib/link/index.d.ts +164 -0
- package/lib/link/index.js +1 -1
- package/lib/link/link.d.ts +25 -13
- package/lib/link/link.variable.css +32 -0
- package/lib/loading/index.d.ts +164 -0
- package/lib/loading/index.js +1 -1
- package/lib/loading/loading.css +108 -73
- package/lib/loading/loading.d.ts +61 -20
- package/lib/loading/loading.less +73 -58
- package/lib/loading/loading.variable.css +140 -73
- package/lib/menu/index.d.ts +188 -0
- package/lib/menu/index.js +1 -0
- package/lib/menu/menu-group.d.ts +14 -0
- package/lib/menu/menu-item.d.ts +16 -0
- package/lib/menu/menu.css +182 -0
- package/lib/menu/menu.d.ts +64 -0
- package/lib/menu/menu.less +180 -0
- package/lib/menu/menu.variable.css +275 -0
- package/lib/menu/submenu.css +3 -0
- package/lib/menu/submenu.d.ts +22 -0
- package/lib/menu/submenu.less +5 -0
- package/lib/menu/submenu.variable.css +96 -0
- package/lib/menu/utils.d.ts +41 -0
- package/lib/message/index.d.ts +2 -0
- package/lib/message/index.js +1 -0
- package/lib/message/message.css +53 -0
- package/lib/message/message.less +61 -0
- package/lib/message/message.variable.css +146 -0
- package/lib/message/messageConstructor.d.ts +73 -0
- package/lib/modal/index.d.ts +214 -0
- package/lib/modal/index.js +1 -1
- package/lib/modal/modal.d.ts +33 -15
- package/lib/modal/props.mixin.d.ts +5 -1
- package/lib/navigation/index.d.ts +2 -0
- package/lib/navigation/index.js +1 -0
- package/lib/navigation/navigation-title.d.ts +25 -0
- package/lib/navigation/navigation.css +184 -0
- package/lib/navigation/navigation.d.ts +111 -0
- package/lib/navigation/navigation.less +210 -0
- package/lib/navigation/navigation.variable.css +277 -0
- package/lib/notify/index.d.ts +2 -0
- package/lib/notify/index.js +1 -0
- package/lib/notify/notify.css +49 -0
- package/lib/notify/notify.less +58 -0
- package/lib/notify/notify.variable.css +142 -0
- package/lib/notify/notifyConstructor.d.ts +91 -0
- package/lib/pagination/index.d.ts +395 -0
- package/lib/pagination/index.js +1 -0
- package/lib/pagination/pagination.css +179 -0
- package/lib/pagination/pagination.d.ts +220 -0
- package/lib/pagination/pagination.less +201 -0
- package/lib/pagination/pagination.variable.css +272 -0
- package/lib/pagination/type.d.ts +6 -0
- package/lib/pagination/use-limit.d.ts +8 -0
- package/lib/pagination/use-list.d.ts +8 -0
- package/lib/pagination/use-small-list.d.ts +5 -0
- package/lib/pagination/use-total.d.ts +5 -0
- package/lib/popover/index.d.ts +287 -0
- package/lib/popover/index.js +1 -1
- package/lib/popover/popover.css +23 -14
- package/lib/popover/popover.d.ts +75 -46
- package/lib/popover/popover.less +57 -46
- package/lib/popover/popover.variable.css +55 -14
- package/lib/popover/props.d.ts +77 -0
- package/lib/preset.d.ts +7 -0
- package/lib/process/index.d.ts +205 -0
- package/lib/process/index.js +15 -0
- package/lib/process/process.css +138 -0
- package/lib/process/process.d.ts +131 -0
- package/lib/process/process.less +178 -0
- package/lib/process/process.variable.css +231 -0
- package/lib/progress/index.d.ts +398 -0
- package/lib/progress/index.js +1 -1
- package/lib/progress/progress.css +0 -3
- package/lib/progress/progress.d.ts +88 -35
- package/lib/progress/progress.less +0 -4
- package/lib/progress/progress.variable.css +32 -3
- package/lib/radio/common.d.ts +1 -1
- package/lib/radio/index.d.ts +277 -0
- package/lib/radio/index.js +1 -1
- package/lib/radio/radio-button.d.ts +24 -16
- package/lib/radio/radio-group.d.ts +11 -10
- package/lib/radio/radio.css +8 -2
- package/lib/radio/radio.d.ts +23 -13
- package/lib/radio/radio.less +9 -2
- package/lib/radio/radio.variable.css +40 -2
- package/lib/radio/type.d.ts +1 -1
- package/lib/rate/index.d.ts +113 -0
- package/lib/rate/index.js +1 -1
- package/lib/rate/rate.d.ts +13 -10
- package/lib/rate/star.d.ts +33 -16
- package/lib/resize-layout/index.d.ts +336 -0
- package/lib/resize-layout/index.js +1 -0
- package/lib/resize-layout/resize-layout.css +189 -0
- package/lib/resize-layout/resize-layout.d.ts +127 -0
- package/lib/resize-layout/resize-layout.less +233 -0
- package/lib/resize-layout/resize-layout.variable.css +282 -0
- package/lib/select/common.d.ts +23 -17
- package/lib/select/index.d.ts +1347 -0
- package/lib/select/index.js +15 -1
- package/lib/select/option.d.ts +12 -19
- package/lib/select/optionGroup.d.ts +54 -0
- package/lib/select/select.css +243 -17
- package/lib/select/select.d.ts +268 -155
- package/lib/select/select.less +245 -46
- package/lib/select/select.variable.css +275 -17
- package/lib/select/type.d.ts +31 -0
- package/lib/shared/{bk-helper-core.d.ts → helper.d.ts} +6 -1
- package/lib/shared/index.d.ts +51 -0
- package/lib/shared/index.js +1 -1
- package/lib/shared/{bk-mask-manager.d.ts → mask-manager.d.ts} +32 -3
- package/lib/shared/{bk-pop-manager.d.ts → pop-manager.d.ts} +8 -1
- package/lib/shared/{bk-popover.d.ts → popover.d.ts} +57 -6
- package/lib/shared/utils.d.ts +6 -0
- package/lib/shared/vue-types.d.ts +8 -7
- package/lib/shared/z-index-manager.d.ts +6 -1
- package/lib/sideslider/index.d.ts +206 -0
- package/lib/sideslider/index.js +1 -1
- package/lib/sideslider/sideslider.d.ts +39 -18
- package/lib/sideslider/sideslider.variable.css +32 -0
- package/{changelog.config.js → lib/slider/index.d.ts} +2 -8
- package/lib/slider/index.js +15 -0
- package/lib/slider/slider-button.d.ts +80 -0
- package/lib/slider/slider.css +149 -0
- package/lib/slider/slider.d.ts +201 -0
- package/lib/slider/slider.less +179 -0
- package/lib/slider/slider.variable.css +242 -0
- package/lib/steps/index.d.ts +250 -0
- package/lib/steps/index.js +15 -0
- package/lib/steps/steps.css +288 -0
- package/lib/steps/steps.d.ts +161 -0
- package/lib/steps/steps.less +324 -0
- package/lib/steps/steps.variable.css +381 -0
- package/lib/styles/index.d.ts +47 -0
- package/lib/styles/index.js +1 -1
- package/lib/styles/mixins/popper.css +43 -0
- package/lib/styles/mixins/popper.less +52 -0
- package/lib/styles/mixins/popper.variable.css +43 -0
- package/lib/styles/mixins/size.less +9 -0
- package/lib/styles/reset.css +273 -0
- package/lib/styles/reset.less +313 -0
- package/lib/styles/reset.variable.css +273 -0
- package/lib/styles/themes/themes.less +52 -2
- package/lib/swiper/index.d.ts +181 -0
- package/lib/swiper/index.js +1 -0
- package/lib/swiper/swiper.css +91 -0
- package/lib/swiper/swiper.d.ts +65 -0
- package/lib/swiper/swiper.less +107 -0
- package/lib/swiper/swiper.variable.css +91 -0
- package/lib/switcher/index.d.ts +286 -0
- package/lib/switcher/index.js +1 -1
- package/lib/switcher/switcher.css +149 -135
- package/lib/switcher/switcher.d.ts +48 -32
- package/lib/switcher/switcher.less +210 -154
- package/lib/switcher/switcher.variable.css +181 -135
- package/lib/tab/index.d.ts +443 -0
- package/lib/tab/index.js +1 -0
- package/lib/tab/props.d.ts +191 -0
- package/lib/tab/tab-nav.d.ts +165 -0
- package/lib/tab/tab-panel.d.ts +73 -0
- package/lib/tab/tab.css +148 -0
- package/lib/tab/tab.d.ts +140 -0
- package/lib/tab/tab.less +222 -0
- package/lib/tab/tab.variable.css +241 -0
- package/lib/table/const.d.ts +4 -0
- package/lib/table/index.d.ts +278 -0
- package/lib/table/index.js +10 -1
- package/lib/table/props.d.ts +117 -0
- package/lib/table/render.d.ts +82 -0
- package/lib/table/table.css +90 -0
- package/lib/table/table.d.ts +83 -37
- package/lib/table/table.less +116 -1
- package/lib/table/table.variable.css +122 -0
- package/lib/table/utils.d.ts +69 -0
- package/lib/tag/index.d.ts +229 -0
- package/lib/tag/index.js +1 -1
- package/lib/tag/tag.css +97 -0
- package/lib/tag/tag.d.ts +83 -53
- package/lib/tag/tag.less +110 -2
- package/lib/tag/tag.variable.css +129 -0
- package/lib/tag-input/common.d.ts +24 -0
- package/lib/tag-input/index.d.ts +2 -0
- package/lib/tag-input/index.js +1 -0
- package/lib/tag-input/list-tag-render.d.ts +47 -0
- package/lib/tag-input/tag-input.css +208 -0
- package/lib/tag-input/tag-input.d.ts +374 -0
- package/lib/tag-input/tag-input.less +250 -0
- package/lib/tag-input/tag-input.variable.css +301 -0
- package/lib/tag-input/tag-props.d.ts +131 -0
- package/lib/tag-input/tag-render.d.ts +38 -0
- package/lib/timeline/index.d.ts +129 -0
- package/lib/timeline/index.js +1 -0
- package/lib/timeline/timeline.css +235 -0
- package/lib/timeline/timeline.d.ts +81 -0
- package/lib/timeline/timeline.less +239 -0
- package/lib/timeline/timeline.variable.css +328 -0
- package/lib/transfer/index.d.ts +351 -0
- package/lib/transfer/index.js +1 -0
- package/lib/transfer/transfer.css +158 -0
- package/lib/transfer/transfer.d.ts +185 -0
- package/lib/transfer/transfer.less +171 -0
- package/lib/transfer/transfer.variable.css +251 -0
- package/lib/tree/index.d.ts +279 -0
- package/lib/tree/index.js +1 -0
- package/lib/tree/props.d.ts +89 -0
- package/lib/tree/tree.css +50 -0
- package/lib/tree/tree.d.ts +121 -0
- package/lib/tree/tree.less +63 -0
- package/lib/tree/tree.variable.css +143 -0
- package/lib/tree/util.d.ts +70 -0
- package/lib/use-form.d.ts +3 -0
- package/lib/use-message.d.ts +2 -0
- package/lib/virtual-render/index.d.ts +556 -0
- package/lib/virtual-render/index.js +10 -0
- package/lib/virtual-render/props.d.ts +157 -0
- package/lib/virtual-render/v-virtual-render.d.ts +7 -0
- package/lib/virtual-render/virtual-render.css +40 -0
- package/lib/virtual-render/virtual-render.d.ts +244 -0
- package/lib/virtual-render/virtual-render.less +51 -0
- package/lib/virtual-render/virtual-render.variable.css +40 -0
- package/package.json +71 -54
- package/lib/checkbox-group/index.js +0 -1
- package/lib/radio-button/index.js +0 -1
- package/lib/radio-group/index.js +0 -1
- package/lib/table/common.d.ts +0 -3
- package/lib/table/table-layout.d.ts +0 -14
- package/lib/table/type.d.ts +0 -12
package/lib/tag/tag.variable.css
CHANGED
@@ -1,10 +1,12 @@
|
|
1
1
|
:root {
|
2
2
|
--bk-prefix: bk;
|
3
|
+
--popover-max-height: 216px;
|
3
4
|
--primary-color: #3a84ff;
|
4
5
|
--success-color: #2dcb56;
|
5
6
|
--warning-color: #ff9c01;
|
6
7
|
--danger-color: #ea3636;
|
7
8
|
--default-color: #63656e;
|
9
|
+
--gray-color: #979ba5;
|
8
10
|
--light-gray: #c4c6cc;
|
9
11
|
--white-color: white;
|
10
12
|
--disable-color: #dcdee5;
|
@@ -58,4 +60,131 @@
|
|
58
60
|
--link-success-disabled-color: #94f5a4;
|
59
61
|
--link-warning-disabled-color: #ffd695;
|
60
62
|
--link-danger-disabled-color: #fd9c9c;
|
63
|
+
--message-color: var(--default-color);
|
64
|
+
--message-primary-bg-color: #f0f8ff;
|
65
|
+
--message-primary-border-color: #e1ecff;
|
66
|
+
--message-warning-bg-color: #fff4e2;
|
67
|
+
--message-warning-border-color: #ffe8c3;
|
68
|
+
--message-success-bg-color: #f2fff4;
|
69
|
+
--message-success-border-color: #dcffe2;
|
70
|
+
--message-danger-bg-color: #ffeded;
|
71
|
+
--message-danger-border-color: #ffdddd;
|
72
|
+
--slider-default-bg: #dcdee5;
|
73
|
+
--slider-disable-bar-bg: #979ba5;
|
74
|
+
--menu-bg-color: #182132;
|
75
|
+
--submenu-bg-color: #151d2c;
|
76
|
+
--menu-active-bg-color: linear-gradient(90deg, #3f87ff 0%, #3a84ff 100%);
|
77
|
+
--menu-color: #96a2b9;
|
78
|
+
--menu-group-color: var(--default-color);
|
79
|
+
--menu-width: 260px;
|
80
|
+
--menu-collapse-width: 60px;
|
81
|
+
--menu-active-color: white;
|
82
|
+
--nav-header-bg-color: #182132;
|
83
|
+
--nav-bg-color: #182132;
|
84
|
+
--date-picker-disabled-bg: #fafbfd;
|
85
|
+
--date-picker-dropdown-mb: 4px;
|
86
|
+
--date-picker-dropdown-bg: #fff;
|
87
|
+
--table-bg-color: var(--white-color);
|
88
|
+
--table-border-color: #dcdee5;
|
89
|
+
--table-head-bg-color: #fafbfd;
|
90
|
+
--table-head-font-color: #313238;
|
91
|
+
--table-body-font-color: #575961;
|
92
|
+
--table-row-hover-bg-color: #f5f7fa;
|
93
|
+
}
|
94
|
+
.bk-tag {
|
95
|
+
display: inline-flex;
|
96
|
+
align-items: center;
|
97
|
+
height: 22px;
|
98
|
+
padding: 0 10px;
|
99
|
+
margin: 2px 6px 2px 0px;
|
100
|
+
font-size: 12px;
|
101
|
+
line-height: 22px;
|
102
|
+
color: var(--default-color);
|
103
|
+
cursor: default;
|
104
|
+
background-color: rgba(151, 155, 165, 0.1);
|
105
|
+
border-color: rgba(217, 220, 230, 0.6);
|
106
|
+
box-sizing: border-box;
|
107
|
+
}
|
108
|
+
.bk-tag.bk-tag-success {
|
109
|
+
color: #14a568;
|
110
|
+
border-color: rgba(20, 165, 104, 0.3);
|
111
|
+
background-color: rgba(20, 165, 104, 0.1);
|
112
|
+
}
|
113
|
+
.bk-tag.bk-tag-success.bk-tag-filled {
|
114
|
+
background-color: #14a568;
|
115
|
+
}
|
116
|
+
.bk-tag.bk-tag-info {
|
117
|
+
color: var(--primary-color);
|
118
|
+
border-color: rgba(58, 132, 255, 0.3);
|
119
|
+
background-color: rgba(58, 132, 255, 0.1);
|
120
|
+
}
|
121
|
+
.bk-tag.bk-tag-info.bk-tag-filled {
|
122
|
+
background-color: var(--primary-color);
|
123
|
+
}
|
124
|
+
.bk-tag.bk-tag-warning {
|
125
|
+
color: #fe9c00;
|
126
|
+
border-color: rgba(254, 165, 0, 0.3);
|
127
|
+
background-color: rgba(254, 156, 0, 0.1);
|
128
|
+
}
|
129
|
+
.bk-tag.bk-tag-warning.bk-tag-filled {
|
130
|
+
background-color: #fe9c00;
|
131
|
+
}
|
132
|
+
.bk-tag.bk-tag-danger {
|
133
|
+
color: var(--danger-color);
|
134
|
+
border-color: rgba(234, 53, 54, 0.3);
|
135
|
+
background-color: rgba(234, 53, 54, 0.1);
|
136
|
+
}
|
137
|
+
.bk-tag.bk-tag-danger.bk-tag-filled {
|
138
|
+
background-color: var(--danger-color);
|
139
|
+
}
|
140
|
+
.bk-tag:hover {
|
141
|
+
opacity: 0.8;
|
142
|
+
}
|
143
|
+
.bk-tag.bk-tag-filled {
|
144
|
+
color: #fff;
|
145
|
+
background-color: #979ba5;
|
146
|
+
}
|
147
|
+
.bk-tag.bk-tag-stroke {
|
148
|
+
padding: 0 9px;
|
149
|
+
line-height: 20px;
|
150
|
+
border-style: solid;
|
151
|
+
border-width: 1px;
|
152
|
+
}
|
153
|
+
.bk-tag.bk-tag-closable {
|
154
|
+
padding: 0 4px 0 10px;
|
155
|
+
}
|
156
|
+
.bk-tag.bk-tag-checkable {
|
157
|
+
cursor: pointer;
|
158
|
+
background: none;
|
159
|
+
}
|
160
|
+
.bk-tag.bk-tag-checkable:hover {
|
161
|
+
background: rgba(151, 155, 165, 0.15);
|
162
|
+
}
|
163
|
+
.bk-tag.bk-tag-check {
|
164
|
+
color: #fff;
|
165
|
+
background: var(--primary-color);
|
166
|
+
}
|
167
|
+
.bk-tag.bk-tag-check:hover {
|
168
|
+
color: #fff;
|
169
|
+
background: var(--primary-color);
|
170
|
+
opacity: 1;
|
171
|
+
}
|
172
|
+
.bk-tag .bk-tag-text {
|
173
|
+
flex: 1;
|
174
|
+
overflow: hidden;
|
175
|
+
text-overflow: ellipsis;
|
176
|
+
white-space: nowrap;
|
177
|
+
}
|
178
|
+
.bk-tag .bk-tag-icon {
|
179
|
+
flex-shrink: 0;
|
180
|
+
margin-right: 4px;
|
181
|
+
font-size: 14px;
|
182
|
+
line-height: 0;
|
183
|
+
}
|
184
|
+
.bk-tag .bk-tag-close {
|
185
|
+
flex-shrink: 0;
|
186
|
+
margin-left: 4px;
|
187
|
+
font-size: 12px;
|
188
|
+
line-height: 0;
|
189
|
+
cursor: pointer;
|
61
190
|
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { Ref } from 'vue';
|
2
|
+
import type { TagProps } from './tag-props';
|
3
|
+
export declare const INPUT_MIN_WIDTH = 12;
|
4
|
+
export declare function useDebouncedRef<T>(value: any, delay?: number): Ref<T>;
|
5
|
+
export declare function usePage(pageSize: Ref<number>): {
|
6
|
+
pageState: {
|
7
|
+
curPage: number;
|
8
|
+
totalSize: number;
|
9
|
+
totalPage: number;
|
10
|
+
pageSize: number;
|
11
|
+
isPageLoading: boolean;
|
12
|
+
curPageList: any[];
|
13
|
+
renderListPaged: any[];
|
14
|
+
};
|
15
|
+
initPage: (allList?: any[]) => void;
|
16
|
+
pageChange: (page: number) => void;
|
17
|
+
};
|
18
|
+
export declare function useFlatList(props: TagProps): any[];
|
19
|
+
/**
|
20
|
+
* 获取字符长度,汉字两个字节
|
21
|
+
* @param str 需要计算长度的字符
|
22
|
+
* @returns 字符长度
|
23
|
+
*/
|
24
|
+
export declare const getCharLength: (str: string) => number;
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("../directives"),require("../icon"),require("../loading"),require("../popover"),require("../shared")):"function"==typeof define&&define.amd?define(["exports","vue","../directives","../icon","../loading","../popover","../shared"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e.Directives,e["@bkui-vue/icon/icons"],e.Loading,e.Popover,e.Shared)}(this,(function(e,t,r,o,a,n,l){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=i(a),u=i(n);function c(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var p={exports:{}};!function(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}(p);var d=c(p.exports),f={exports:{}},g={exports:{}};!function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports}(g);var v={exports:{}};!function(e){e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o,a,n=[],l=!0,i=!1;try{for(r=r.call(e);!(l=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);l=!0);}catch(e){i=!0,a=e}finally{try{l||null==r.return||r.return()}finally{if(i)throw a}}return n}},e.exports.__esModule=!0,e.exports.default=e.exports}(v);var h={exports:{}},y={exports:{}};!function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o},e.exports.__esModule=!0,e.exports.default=e.exports}(y),function(e){var t=y.exports;e.exports=function(e,r){if(e){if("string"==typeof e)return t(e,r);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?t(e,r):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}(h);var m={exports:{}};!function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports}(m),function(e){var t=g.exports,r=v.exports,o=h.exports,a=m.exports;e.exports=function(e,n){return t(e)||r(e,n)||o(e,n)||a()},e.exports.__esModule=!0,e.exports.default=e.exports}(f);var x=c(f.exports),T={exports:{}};!function(e){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports}(T);var b=c(T.exports),L={exports:{}},w={exports:{}};!function(e){var t=y.exports;e.exports=function(e){if(Array.isArray(e))return t(e)},e.exports.__esModule=!0,e.exports.default=e.exports}(w);var P={exports:{}};!function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports}(P);var I={exports:{}};!function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports}(I),function(e){var t=w.exports,r=P.exports,o=h.exports,a=I.exports;e.exports=function(e){return t(e)||r(e)||o(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports}(L);var C=c(L.exports),S=12;var K=function(e){for(var t=e.length,r=0,o=0;o<t;o++)0!=(65280&e.charCodeAt(o))&&(r+=1),r+=1;return r},k=t.defineComponent({name:"ListTagRender",props:{node:l.PropTypes.object,searchKey:l.PropTypes.oneOfType([l.PropTypes.string,l.PropTypes.arrayOf(l.PropTypes.string)]),displayKey:l.PropTypes.string,searchKeyword:l.PropTypes.string,tpl:{type:Function,default:null}},render:function(){var e=this,r=function(t){if(e.searchKeyword){var r=new RegExp("(".concat(e.searchKeyword,")"),"i");return t.replace(r,'<strong class="highlight-text">$1</strong>')}return t};if(this.tpl)return this.tpl(this.node,r,t.h,this);var o=this.node[this.displayKey];return t.createVNode("div",{class:"bk-selector-node"},[t.createVNode("span",{class:"text",innerHTML:r(o)},[o])])}}),V=t.defineComponent({name:"TagRender",props:{node:l.PropTypes.object,displayKey:l.PropTypes.string,tpl:{type:Function,default:null}},render:function(){return this.tpl?this.tpl(this.node,t.h,this):t.createVNode("div",{class:"tag"},[t.createVNode("span",{class:"text"},[this.node[this.displayKey]])])}}),_=t.defineComponent({name:"BkTagInput",directives:{bkTooltips:r.bkTooltips},props:{modelValue:l.PropTypes.arrayOf(l.PropTypes.string).def([]),placeholder:l.PropTypes.string.def("请输入并按 Enter 结束"),list:l.PropTypes.arrayOf(l.PropTypes.object).def([]),disabled:l.PropTypes.bool.def(!1),tooltipKey:l.PropTypes.string.def(""),saveKey:l.PropTypes.string.def("id"),displayKey:l.PropTypes.string.def("name"),hasDeleteIcon:l.PropTypes.bool.def(!1),clearable:l.PropTypes.bool.def(!0),trigger:l.PropTypes.commonType(["focus","search"]).def("search"),searchKey:l.PropTypes.oneOfType([l.PropTypes.string,l.PropTypes.arrayOf(l.PropTypes.string)]).def("name"),useGroup:l.PropTypes.bool.def(!1),allowCreate:l.PropTypes.bool.def(!1),maxData:l.PropTypes.number.def(-1),maxResult:l.PropTypes.number.def(10),contentMaxHeight:l.PropTypes.number.def(300),contentWidth:l.PropTypes.number.def(190),separator:l.PropTypes.string.def(""),allowNextFocus:l.PropTypes.bool.def(!0),allowAutoMatch:l.PropTypes.bool.def(!1),showClearOnlyHover:l.PropTypes.bool.def(!1),leftSpace:l.PropTypes.number.def(0),createTagValidator:{type:Function,default:null},filterCallback:{type:Function,default:null},tagTpl:{type:Function,default:null},tpl:{type:Function,default:null},pasteFn:{type:Function,default:null}},emits:["update:modelValue","change","select","blur","remove","removeAll"],setup:function(e,r){var o=r.emit,a=t.reactive({isEdit:!1,isHover:!1,focusItemIndex:e.allowCreate?-1:0}),n=t.reactive({isShow:!1,width:190,modifiers:[{name:"offset",options:{offset:[0,4]}}]}),l=function(e){var r=t.reactive({curPage:1,totalSize:0,totalPage:0,pageSize:e,isPageLoading:!1,curPageList:[],renderListPaged:[]});return{pageState:r,initPage:function(){var e,t,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];r.curPage=1,r.totalSize=o.length,r.totalPage=Math.ceil(r.totalSize/r.pageSize)||1;var a=[];if(r.pageSize>0)for(var n=0;n<r.totalSize;n+=r.pageSize)a.push(o.slice(n,n+r.pageSize));(e=r.renderListPaged).splice.apply(e,[0,r.renderListPaged.length].concat(a)),(t=r.curPageList).splice.apply(t,[0,r.curPageList.length].concat(C(r.renderListPaged[r.curPage-1]||[])))},pageChange:function(e){var t;r.curPage=e,(t=r.curPageList).splice.apply(t,[r.curPageList.length,0].concat(C(r.renderListPaged[r.curPage-1]||[]))),r.isPageLoading=!1}}}(t.toRefs(e).maxResult),i=l.pageState,s=l.initPage,u=l.pageChange,c=function(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,a=e;return t.customRef((function(e,t){return{get:function(){return e(),a},set:function(e){clearTimeout(r),r=setTimeout((function(){a=e,t()}),o)}}}))}("",150),p=t.ref(null),f=t.ref(null),g=t.ref(null),v=t.ref(null),h=t.ref(null),y=t.ref(null),m=t.ref(null),T=t.computed((function(){return!e.disabled&&e.hasDeleteIcon})),L=t.computed((function(){return 1===e.maxData})),w=t.computed((function(){return 0===A.selectedTagList.length&&""===c.value&&!a.isEdit})),P=t.computed((function(){return e.clearable&&!e.disabled&&0!==A.selectedTagList.length&&(!e.showClearOnlyHover||a.isHover)})),I=t.computed((function(){return{"bk-tag-input-trigger":!0,active:a.isEdit,disabled:e.disabled}}));t.watch([function(){return C(e.modelValue)},function(){return C(e.list)}],(function(){E()})),t.watch(c,(function(t){var r=0!==i.curPageList.length;""!==t&&r||""===t&&"focus"===e.trigger?n.isShow=!0:"focus"===e.trigger&&r||(n.isShow=!1)})),t.watch((function(){return n.isShow}),(function(e){k(),e&&h.value&&(t.nextTick((function(){h.value.scrollTop=0})),h.value.removeEventListener("scroll",V),h.value.addEventListener("scroll",V))}));var k=function(){var e,t,r=L.value?0:null===(e=v.value)||void 0===e?void 0:e.offsetLeft;n.modifiers=[{name:"offset",options:{offset:[r,4]}}],null===(t=y.value)||void 0===t||t.update()},V=function(){if(!i.isPageLoading&&0!==h.value.scrollTop){var e=h.value;if(e.scrollTop+e.offsetHeight>=e.scrollHeight){var t=i.curPage+1;t<=i.totalPage&&(i.isPageLoading=!0,setTimeout((function(){u(t)}),500))}}},_=function(){var e;return Array.from((null===(e=g.value)||void 0===e?void 0:e.childNodes)||[]).filter((function(e){return e.nodeType!==Node.TEXT_NODE}))},N=function(r){if(!e.disabled){if(null==r?void 0:r.target){var o=r.target.className;(o.indexOf("bk-tag-input-trigger")>-1||o.indexOf("tag-list")>-1)&&g.value.appendChild(v.value)}clearTimeout(m.value),L.value&&R.value.length&&(A.tagListCache=C(R.value),A.selectedTagListCache=C(A.selectedTagList),c.value=A.selectedTagListCache[0][e.saveKey],W(A.selectedTagList[0],0),H()),a.isEdit=!0,t.nextTick((function(){var t;null===(t=p.value)||void 0===t||t.focus(),"focus"===e.trigger&&0!==A.localList.length&&(D(),n.isShow?k():n.isShow=!0)}))}},A=t.reactive({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),R=t.computed((function(){return A.selectedTagList.map((function(t){return t[e.saveKey]}))})),M=function(e){var r=t.toRefs(e),o=r.useGroup,a=r.saveKey,n=r.displayKey,l=r.list,i=t.reactive([]);return t.watch([o,a,n,l],(function(){var e=l.value;o.value&&(e=l.value.reduce((function(e,t){var r=[];return t.children&&(r=t.children.map((function(e){return Object.assign({group:{groupId:t[a.value],groupName:t[n.value]}},e)}))),e.concat(r)}),[])),i.splice.apply(i,[0,i.length].concat(C(e)))}),{immediate:!0,deep:!0}),i}(e),O=t.computed((function(){if(e.useGroup){var t={};return i.curPageList.forEach((function(e,r){e.__index__=r,t[e.group.groupId]||(t[e.group.groupId]={id:e.group.groupId,name:e.group.groupName,children:[]}),t[e.group.groupId].children.push(e)})),Object.keys(t).map((function(e){return t[e]}))}return i.curPageList})),E=function(){var t=e.saveKey,r=e.modelValue,o=e.displayKey,a=e.allowCreate,n=e.trigger;A.selectedTagList=[],A.localList=C(M),r.length&&(r.forEach((function(e){var r=A.localList.find((function(r){return e===r[t]}));if(void 0!==r)A.selectedTagList.push(r);else if(a&&!R.value.includes(e)){var n;A.selectedTagList.push((b(n={},t,e),b(n,o,e),n))}})),L.value||(A.localList=A.localList.filter((function(e){return!r.includes(e[t])})))),"focus"===n&&D()},D=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=e.searchKey,o=e.filterCallback,a=t.toLowerCase(),n=[];if("function"==typeof o)n=o(a,r,A.localList)||[];else if(Array.isArray(r)){var l=r.map((function(e){return A.localList.filter((function(t){return-1!==t[e].toLowerCase().indexOf(a)}))}));n=Array.from(new Set(l.flat()))}else n=A.localList.filter((function(e){return-1!==e[r].toLowerCase().indexOf(a)}));s(n)};t.onMounted((function(){E()}));var j=function(){c.value=""},F=function(){if(L.value)return 0;var e=_().findIndex((function(e){return"tagInputItem"===e.id}));return e>=0?e:0},z=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t&&e){var o=t;r&&(o=t.nextElementSibling||null),t.parentNode.insertBefore(e,o)}},H=function(t){var r=e.maxData,o=e.trigger,l=e.allowCreate;if(-1===r||r>R.value.length){var i=((null==t?void 0:t.target)?t.target:c).value,s=K(i);s?(D(i),p.value.style.width="".concat(s*S,"px")):"focus"===o&&D()}else B(),c.value="",n.isShow=!1;a.isEdit=!0,a.focusItemIndex=l?-1:0},B=function(){m.value=setTimeout((function(){var t=c.value;if(j(),a.isEdit=!1,L.value){var r=x(A.tagListCache,1)[0];t&&t===r&&A.selectedTagListCache.length?U(A.selectedTagListCache[0],"select"):G("remove")}else if(e.allowAutoMatch&&t){var l=i.curPageList.find((function(r){return Array.isArray(e.searchKey)?e.searchKey.map((function(e){return r[e]})).includes(t):r[e.searchKey]===t}));l?q(l,"select"):e.allowCreate&&q(t,"custom")}n.isShow=!1,o("blur",t,R.value)}),50)},q=function(e,t,r){null==r||r.stopPropagation(),e&&!e.disabled&&(L.value&&(A.tagListCache=[],A.selectedTagListCache=[],A.selectedTagList=[]),U(e,t),G("select"),j(),n.isShow=!1)},G=function(e){o("change",R.value),o(e),o("update:modelValue",R.value)},Z=function(){var e=h.value.clientHeight,r=h.value.getBoundingClientRect().y;t.nextTick((function(){var t=h.value.querySelector(".bk-selector-actived");if(t){var o=t.clientHeight,a=t.getBoundingClientRect().y;a<r&&(h.value.scrollTop=h.value.scrollTop-(r-a));var n=a+o-r;n>e&&(h.value.scrollTop=h.value.scrollTop+n-e)}}))},U=function(r,o){if(!(A.selectedTagList.length>=e.maxData&&-1!==e.maxData)){var a,n=e.separator,l=e.saveKey,i=e.displayKey,s=e.createTagValidator,u=F(),c=1,f=!1,g=function(e){return"function"!=typeof s||s(e)},h=function(e){return A.localList.find((function(t){return t[l]===e}))};if("custom"===o)if(n){var y,m=r.split(n),x=(m=m.filter((function(e){return(null==e?void 0:e.trim())&&!R.value.includes(e)&&g(e)}))).map((function(e){var t;return h(e)||(b(t={},l,e),b(t,i,e),t)}));if(m.length)(y=A.selectedTagList).splice.apply(y,[u,0].concat(C(x))),c=x.length,f=!0}else{var T="object"===d(r);if(void 0!==(a=(a=T?r[l]:r.trim()).replace(/\s+/g,""))&&!R.value.includes(a)&&g(a)){var w,P=h(a)||(T?r:(b(w={},l,a),b(w,i,a),w));A.selectedTagList.splice(u,0,P),f=!0}}else r&&(void 0===(a=r[l])||R.value.includes(a)||(A.selectedTagList.splice(u,0,r),f=!0));f&&t.nextTick((function(){for(var t=1;t<=c;t++){var r=_()[u+t];z(r,v.value)}p.value.style.width="".concat(S,"px"),L.value||(e.allowNextFocus&&N(),A.localList=A.localList.filter((function(e){return!R.value.includes(e[l])})))}))}},W=function(t,r){A.selectedTagList.splice(r,1);var o=M.some((function(r){return r===t[e.saveKey]}));(e.allowCreate&&o||!e.allowCreate)&&!L.value&&A.localList.push(t)};return Object.assign(Object.assign(Object.assign(Object.assign({popoverProps:n},t.toRefs(a)),t.toRefs(A)),t.toRefs(i)),{isShowPlaceholder:w,isShowClear:P,curInputValue:c,formatList:M,renderList:O,showTagClose:T,tagInputRef:p,bkTagSelectorRef:f,tagListRef:g,tagInputItemRef:v,selectorListRef:h,popoverRef:y,triggerClass:I,focusInputTrigger:N,activeClass:function(t,r){var o={"bk-selector-actived":!1,"bk-selector-selected":R.value.includes(t[e.saveKey])};return e.useGroup?o["bk-selector-actived"]=t.__index__===a.focusItemIndex:o["bk-selector-actived"]=r===a.focusItemIndex,o},handleInput:H,handleFocus:function(){var t;n.width=L.value?null===(t=f.value)||void 0===t?void 0:t.clientWidth:e.contentWidth},handleBlur:B,handleTagSelected:q,handleTagRemove:function(e,t,r){null==r||r.stopPropagation(),W(e,t),j(),G("remove"),p.value.style.width="".concat(S,"px")},handleClear:function(t){t.stopPropagation();var r=A.selectedTagList;A.selectedTagList=[];var o,a=M.filter((function(t){return r.some((function(r){return r[e.saveKey]===t[e.saveKey]}))}));(!e.allowCreate||0===a.length)&&e.allowCreate||L.value||(o=A.localList).push.apply(o,C(a));G("removeAll")},tagFocus:function(t){e.disabled||(z(v.value,t.currentTarget,!0),p.value.style.width="".concat(S,"px"),n.isShow&&k())},handleKeydown:function(t){if(!i.isPageLoading){var r=t.target.value,o=K(r),l=F(),s=_();switch(t.code){case"ArrowUp":if(t.preventDefault(),!n.isShow)return;a.focusItemIndex=a.focusItemIndex-1,a.focusItemIndex=a.focusItemIndex<0?-1:a.focusItemIndex,-1===a.focusItemIndex&&(a.focusItemIndex=i.curPageList.length-1),Z();break;case"ArrowDown":if(t.preventDefault(),!n.isShow)return;a.focusItemIndex=a.focusItemIndex+1,a.focusItemIndex=a.focusItemIndex>i.curPageList.length-1?i.curPageList.length:a.focusItemIndex,a.focusItemIndex===i.curPageList.length&&(a.focusItemIndex=0),Z();break;case"ArrowLeft":if(a.isEdit=!0,!o){if(l<1)return;z(v.value,s[l-1]),N()}break;case"ArrowRight":if(a.isEdit=!0,!o){if(l===s.length-1)return;z(s[l+1],v.value),N()}break;case"Enter":case"NumpadEnter":!e.allowCreate&&n.isShow||e.allowCreate&&a.focusItemIndex>=0&&n.isShow?q(i.curPageList[a.focusItemIndex],"select",t):e.allowCreate&&q(c.value,"custom",t),t.preventDefault();break;case"Backspace":0===l||c.value||function(t,r){var o=_();z(v.value,o[t-1]),A.selectedTagList.splice(t-1,1),N();var a=M.some((function(t){return t===r[e.saveKey]}));(e.allowCreate&&a||!e.allowCreate)&&!L.value&&A.localList.push(r),p.value="".concat(S,"px"),G("remove")}(l,A.selectedTagList[l-1])}}},handlePaste:function(t){if(t.preventDefault(),L.value)return!1;var r=e.maxData,o=e.saveKey,a=e.pasteFn,n=t.clipboardData.getData("text"),l=a?a(n):function(t){var r=[];return t.split(";").forEach((function(t){if(t.match(/^[a-zA-Z][a-zA-Z_]+/g)){var o,a=t.match(/^[a-zA-Z][a-zA-Z_]+/g).join("");r.push((b(o={},e.saveKey,a),b(o,e.displayKey,a),o))}})),r}(n),i=l.map((function(e){return e[o]}));if(i.length){var s=_(),u=F(),c=A.localList.map((function(e){return e[o]}));if(i=i.filter((function(e){return(null==e?void 0:e.trim())&&!R.value.includes(e)&&c.includes(e)})),-1!==r){var d=A.selectedTagList.length;if(d<r){var f=r-d;i.length>f&&(i=C(i.slice(0,f)))}else i=[]}var g,h=A.localList.filter((function(e){return i.includes(e[o])}));if(i.length)(g=A.selectedTagList).splice.apply(g,[u,0].concat(C(h))),z(v.value,s[u]),p.value.style.width="".concat(S,"px"),A.localList=A.localList.filter((function(e){return!i.includes(e[o])})),G("select"),N()}}})},render:function(){var e=this;return t.createVNode("div",{class:"bk-tag-input",ref:"bkTagSelectorRef",onClick:this.focusInputTrigger,onMouseenter:function(){return e.isHover=!0},onMouseleave:function(){return e.isHover=!1}},[t.createVNode(u.default,{ref:"popoverRef",theme:"light",trigger:"manual",placement:"bottom-start",arrow:!1,width:this.popoverProps.width,isShow:this.popoverProps.isShow,modifiers:this.popoverProps.modifiers},{default:function(){return t.createVNode("div",{class:e.triggerClass},[t.createVNode("ul",{class:"tag-list",ref:"tagListRef",style:{marginLeft:"".concat(e.leftSpace,"px")}},[e.selectedTagList.map((function(r,a){var n={boundary:"window",theme:"light",distance:12,content:r[e.tooltipKey],disabled:!e.tooltipKey};return t.withDirectives(t.createVNode("li",{class:"tag-item",onClick:e.tagFocus},[t.createVNode(V,{node:r,tpl:e.tagTpl,displayKey:e.displayKey},null),e.showTagClose?t.createVNode(o.Error,{class:"remove-tag",onClick:e.handleTagRemove.bind(e,r,a)},null):null]),[[t.resolveDirective("bk-tooltips"),n]])})),t.withDirectives(t.createVNode("li",{ref:"tagInputItemRef",id:"tagInputItem",class:"tag-input-item",role:"input"},[t.withDirectives(t.createVNode("input",{type:"text",class:"tag-input",ref:"tagInputRef","onUpdate:modelValue":function(t){return e.curInputValue=t},onInput:e.handleInput,onFocus:e.handleFocus,onBlur:e.handleBlur,onKeydown:e.handleKeydown,onPaste:e.handlePaste},null),[[t.vModelText,e.curInputValue]])]),[[t.vShow,e.isEdit]])]),t.withDirectives(t.createVNode("p",{class:"placeholder"},[e.placeholder]),[[t.vShow,e.isShowPlaceholder]]),e.isShowClear?t.createVNode(o.Close,{class:"clear-icon",onClick:e.handleClear},null):null])},content:function(){return t.createVNode("div",{class:"bk-selector-list"},[t.createVNode("ul",{ref:"selectorListRef",style:{"max-height":"".concat(e.contentMaxHeight,"px")},class:"outside-ul"},[e.useGroup?e.renderList.map((function(r){return t.createVNode("li",{class:"bk-selector-group-item"},[t.createVNode("span",{class:"group-name"},[r.name,t.createTextVNode(" ("),r.children.length,t.createTextVNode(")")]),t.createVNode("ul",{class:"bk-selector-group-list-item"},[r.children.map((function(r,o){return t.createVNode("li",{class:["bk-selector-list-item",{disabled:r.disabled},e.activeClass(r,o)],onClick:e.handleTagSelected.bind(e,r,"select")},[t.createVNode(k,{node:r,displayKey:e.displayKey,tpl:e.tpl,searchKey:e.searchKey,searchKeyword:e.curInputValue},null)])}))])])})):e.renderList.map((function(r,o){return t.createVNode("li",{class:["bk-selector-list-item",{disabled:r.disabled},e.activeClass(r,o)],onClick:e.handleTagSelected.bind(e,r,"select")},[t.createVNode(k,{node:r,displayKey:e.displayKey,tpl:e.tpl,searchKey:e.searchKey,searchKeyword:e.curInputValue},null)])})),e.isPageLoading?t.createVNode("li",{class:"bk-selector-list-item loading"},[t.createVNode(s.default,{theme:"primary",size:a.BkLoadingSize.Small},null)]):null])])}})])}});_.install=function(e){e.component(_.name,_)},e.default=_,Object.defineProperty(e,"__esModule",{value:!0})}));
|
@@ -0,0 +1,47 @@
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
2
|
+
node: import("vue-types").VueTypeValidableDef<{
|
3
|
+
[key: string]: any;
|
4
|
+
}> & {
|
5
|
+
default: () => {
|
6
|
+
[key: string]: any;
|
7
|
+
};
|
8
|
+
};
|
9
|
+
searchKey: import("vue-types").VueTypeDef<string | string[]>;
|
10
|
+
displayKey: import("vue-types").VueTypeValidableDef<string> & {
|
11
|
+
default: string;
|
12
|
+
};
|
13
|
+
searchKeyword: import("vue-types").VueTypeValidableDef<string> & {
|
14
|
+
default: string;
|
15
|
+
};
|
16
|
+
tpl: {
|
17
|
+
type: FunctionConstructor;
|
18
|
+
default: any;
|
19
|
+
};
|
20
|
+
}, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
21
|
+
node: import("vue-types").VueTypeValidableDef<{
|
22
|
+
[key: string]: any;
|
23
|
+
}> & {
|
24
|
+
default: () => {
|
25
|
+
[key: string]: any;
|
26
|
+
};
|
27
|
+
};
|
28
|
+
searchKey: import("vue-types").VueTypeDef<string | string[]>;
|
29
|
+
displayKey: import("vue-types").VueTypeValidableDef<string> & {
|
30
|
+
default: string;
|
31
|
+
};
|
32
|
+
searchKeyword: import("vue-types").VueTypeValidableDef<string> & {
|
33
|
+
default: string;
|
34
|
+
};
|
35
|
+
tpl: {
|
36
|
+
type: FunctionConstructor;
|
37
|
+
default: any;
|
38
|
+
};
|
39
|
+
}>>, {
|
40
|
+
displayKey: string;
|
41
|
+
tpl: Function;
|
42
|
+
node: {
|
43
|
+
[key: string]: any;
|
44
|
+
};
|
45
|
+
searchKeyword: string;
|
46
|
+
}>;
|
47
|
+
export default _default;
|
@@ -0,0 +1,208 @@
|
|
1
|
+
.bk-tag-input {
|
2
|
+
position: relative;
|
3
|
+
min-height: 32px;
|
4
|
+
}
|
5
|
+
.bk-tag-input .bk-popover-reference {
|
6
|
+
display: block;
|
7
|
+
}
|
8
|
+
.bk-tag-input .bk-tag-input-trigger {
|
9
|
+
position: relative;
|
10
|
+
display: flex;
|
11
|
+
min-height: 32px;
|
12
|
+
padding: 0 0 0 5px;
|
13
|
+
overflow: hidden;
|
14
|
+
font-size: 12px;
|
15
|
+
cursor: pointer;
|
16
|
+
background: white;
|
17
|
+
border: 1px solid #c4c6cc;
|
18
|
+
border-radius: 2px;
|
19
|
+
align-items: center;
|
20
|
+
justify-content: space-between;
|
21
|
+
}
|
22
|
+
.bk-tag-input .bk-tag-input-trigger.active {
|
23
|
+
border-color: #3a84ff;
|
24
|
+
}
|
25
|
+
.bk-tag-input .bk-tag-input-trigger.disabled {
|
26
|
+
cursor: not-allowed;
|
27
|
+
background: #fafbfd;
|
28
|
+
border-color: #dcdee5;
|
29
|
+
}
|
30
|
+
.bk-tag-input .bk-tag-input-trigger .tag-list {
|
31
|
+
display: inline-flex;
|
32
|
+
max-height: 135px;
|
33
|
+
padding: 0;
|
34
|
+
margin: 0;
|
35
|
+
overflow: auto;
|
36
|
+
align-items: center;
|
37
|
+
flex-wrap: wrap;
|
38
|
+
}
|
39
|
+
.bk-tag-input .bk-tag-input-trigger .tag-list > li {
|
40
|
+
display: inline-flex;
|
41
|
+
height: 22px;
|
42
|
+
margin: 4px 5px 4px 0;
|
43
|
+
overflow: hidden;
|
44
|
+
font-size: 12px;
|
45
|
+
border: solid 1px transparent;
|
46
|
+
border-radius: 2px;
|
47
|
+
align-items: center;
|
48
|
+
}
|
49
|
+
.bk-tag-input .bk-tag-input-trigger .tag-list > li.tag-item {
|
50
|
+
background: #f0f1f5;
|
51
|
+
border-color: #f0f1f5;
|
52
|
+
}
|
53
|
+
.bk-tag-input .bk-tag-input-trigger .tag-list .remove-tag {
|
54
|
+
flex-shrink: 0;
|
55
|
+
margin-right: 5px;
|
56
|
+
font-size: 14px;
|
57
|
+
line-height: 0;
|
58
|
+
}
|
59
|
+
.bk-tag-input .bk-tag-input-trigger .tag-list .tag {
|
60
|
+
max-width: 190px;
|
61
|
+
overflow: hidden;
|
62
|
+
text-overflow: ellipsis;
|
63
|
+
word-break: break-all;
|
64
|
+
white-space: nowrap;
|
65
|
+
flex: 1;
|
66
|
+
}
|
67
|
+
.bk-tag-input .bk-tag-input-trigger .tag-list .text {
|
68
|
+
padding: 0 5px;
|
69
|
+
line-height: 20px;
|
70
|
+
color: #63656e;
|
71
|
+
background-color: #f0f1f5;
|
72
|
+
border-radius: 2px;
|
73
|
+
box-sizing: border-box;
|
74
|
+
}
|
75
|
+
.bk-tag-input .bk-tag-input-trigger .tag-list .tag-input {
|
76
|
+
width: 10px;
|
77
|
+
height: 22px;
|
78
|
+
max-width: 295px;
|
79
|
+
padding: 0;
|
80
|
+
border: 0;
|
81
|
+
outline: none;
|
82
|
+
box-sizing: border-box;
|
83
|
+
}
|
84
|
+
.bk-tag-input .bk-tag-input-trigger .placeholder {
|
85
|
+
position: absolute;
|
86
|
+
top: 0;
|
87
|
+
left: 8px;
|
88
|
+
padding: 0;
|
89
|
+
margin: 0;
|
90
|
+
line-height: 30px;
|
91
|
+
color: #c4c6cc;
|
92
|
+
}
|
93
|
+
.bk-tag-input .bk-tag-input-trigger .clear-icon {
|
94
|
+
margin-right: 5px;
|
95
|
+
font-size: 14px;
|
96
|
+
line-height: 0;
|
97
|
+
color: #c4c6cc;
|
98
|
+
cursor: pointer;
|
99
|
+
}
|
100
|
+
.bk-tag-input .bk-tag-input-trigger .clear-icon:hover {
|
101
|
+
color: #979ba5;
|
102
|
+
}
|
103
|
+
.bk-tag-input .bk-popover-content {
|
104
|
+
padding: 0;
|
105
|
+
}
|
106
|
+
.bk-selector-list {
|
107
|
+
min-width: 150px;
|
108
|
+
}
|
109
|
+
.bk-selector-list .outside-ul {
|
110
|
+
max-height: 160px;
|
111
|
+
padding: 0;
|
112
|
+
padding: 6px 0;
|
113
|
+
margin: 0;
|
114
|
+
overflow-y: auto;
|
115
|
+
list-style: none;
|
116
|
+
background-color: white;
|
117
|
+
border: 1px solid #dcdee5;
|
118
|
+
border-radius: 2px;
|
119
|
+
}
|
120
|
+
.bk-selector-list .outside-ul::-webkit-scrollbar {
|
121
|
+
width: 6px;
|
122
|
+
height: 6px;
|
123
|
+
}
|
124
|
+
.bk-selector-list .outside-ul::-webkit-scrollbar-thumb {
|
125
|
+
min-height: 24px;
|
126
|
+
background-color: #dcdee5;
|
127
|
+
border-radius: 3px;
|
128
|
+
}
|
129
|
+
.bk-selector-list .bk-selector-group-item {
|
130
|
+
list-style: none;
|
131
|
+
}
|
132
|
+
.bk-selector-list .bk-selector-group-item .group-name {
|
133
|
+
padding-left: 11px;
|
134
|
+
font-size: 12px;
|
135
|
+
line-height: 32px;
|
136
|
+
color: #979ba5;
|
137
|
+
}
|
138
|
+
.bk-selector-list .bk-selector-group-list-item {
|
139
|
+
padding: 0;
|
140
|
+
margin: 0;
|
141
|
+
list-style: none;
|
142
|
+
}
|
143
|
+
.bk-selector-list .bk-selector-list-item {
|
144
|
+
position: relative;
|
145
|
+
width: 100%;
|
146
|
+
cursor: pointer;
|
147
|
+
background-color: white;
|
148
|
+
border-right: #c4c6cc;
|
149
|
+
border-left: #c4c6cc;
|
150
|
+
}
|
151
|
+
.bk-selector-list .bk-selector-list-item:first-child {
|
152
|
+
border-top: #c4c6cc;
|
153
|
+
}
|
154
|
+
.bk-selector-list .bk-selector-list-item:last-child {
|
155
|
+
border-bottom: #c4c6cc;
|
156
|
+
}
|
157
|
+
.bk-selector-list .bk-selector-list-item.bk-selector-selected {
|
158
|
+
background-color: #f4f6fa;
|
159
|
+
}
|
160
|
+
.bk-selector-list .bk-selector-list-item.bk-selector-selected .selected-icon {
|
161
|
+
display: inline-block;
|
162
|
+
}
|
163
|
+
.bk-selector-list .bk-selector-list-item.bk-selector-actived {
|
164
|
+
background-color: #f4f6fa;
|
165
|
+
}
|
166
|
+
.bk-selector-list .bk-selector-list-item:hover {
|
167
|
+
background-color: #eaf3ff;
|
168
|
+
}
|
169
|
+
.bk-selector-list .bk-selector-list-item.disabled {
|
170
|
+
cursor: not-allowed;
|
171
|
+
background: white;
|
172
|
+
}
|
173
|
+
.bk-selector-list .bk-selector-list-item.disabled .text {
|
174
|
+
color: #c4c6cc;
|
175
|
+
}
|
176
|
+
.bk-selector-list .bk-selector-list-item.loading {
|
177
|
+
padding: 5px 0 3px;
|
178
|
+
text-align: center;
|
179
|
+
}
|
180
|
+
.bk-selector-list .bk-selector-list-item .loading {
|
181
|
+
position: relative;
|
182
|
+
width: 100%;
|
183
|
+
height: 40px;
|
184
|
+
font-size: 14px;
|
185
|
+
cursor: default;
|
186
|
+
}
|
187
|
+
.bk-selector-list .bk-selector-list-item .text {
|
188
|
+
padding: 0 10px;
|
189
|
+
overflow: hidden;
|
190
|
+
font-size: 12px;
|
191
|
+
line-height: 32px;
|
192
|
+
color: #63656e;
|
193
|
+
text-overflow: ellipsis;
|
194
|
+
white-space: nowrap;
|
195
|
+
}
|
196
|
+
.bk-selector-list .bk-selector-list-item .bk-selector-tools {
|
197
|
+
position: absolute;
|
198
|
+
top: 10px;
|
199
|
+
right: 0;
|
200
|
+
display: none;
|
201
|
+
font-size: 12px;
|
202
|
+
}
|
203
|
+
.bk-selector-list .bk-selector-list-item .bk-selector-tools .bk-selector-list-icon {
|
204
|
+
margin-right: 14px;
|
205
|
+
}
|
206
|
+
.bk-selector-list .bk-selector-list-item .highlight-text {
|
207
|
+
color: #3a84ff;
|
208
|
+
}
|