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
@@ -0,0 +1,107 @@
|
|
1
|
+
.bk-swiper-home {
|
2
|
+
position: relative;
|
3
|
+
overflow: hidden;
|
4
|
+
|
5
|
+
&:hover .bk-swiper-nav {
|
6
|
+
display: block;
|
7
|
+
}
|
8
|
+
}
|
9
|
+
|
10
|
+
.bk-swiper-main {
|
11
|
+
display: flex;
|
12
|
+
height: 100%;
|
13
|
+
overflow: hidden;
|
14
|
+
|
15
|
+
&.bk-transition {
|
16
|
+
transition: .5s cubic-bezier(.42, 0, .58, 1);
|
17
|
+
}
|
18
|
+
|
19
|
+
.bk-swiper-card {
|
20
|
+
height: 100%;
|
21
|
+
padding: 0;
|
22
|
+
margin: 0;
|
23
|
+
}
|
24
|
+
|
25
|
+
.bk-swiper-img {
|
26
|
+
display: inline-block;
|
27
|
+
width: 100%;
|
28
|
+
height: 100%;
|
29
|
+
margin: 0;
|
30
|
+
background-position: center;
|
31
|
+
background-repeat: no-repeat;
|
32
|
+
background-size: cover;
|
33
|
+
}
|
34
|
+
|
35
|
+
.bk-swiper-link {
|
36
|
+
cursor: pointer;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
.bk-swiper-index {
|
41
|
+
position: absolute;
|
42
|
+
right: 0;
|
43
|
+
bottom: 10px;
|
44
|
+
left: 0;
|
45
|
+
display: flex;
|
46
|
+
padding: 0;
|
47
|
+
margin: 0;
|
48
|
+
justify-content: center;
|
49
|
+
|
50
|
+
li {
|
51
|
+
width: 11px;
|
52
|
+
height: 4px;
|
53
|
+
margin: 0 3px;
|
54
|
+
list-style-type: none;
|
55
|
+
background: #63656e;
|
56
|
+
border-radius: 2px;
|
57
|
+
transition: width .525s;
|
58
|
+
|
59
|
+
&.bk-current-index {
|
60
|
+
width: 17px;
|
61
|
+
background: #c5c7d1;
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}
|
65
|
+
|
66
|
+
.bk-swiper-nav {
|
67
|
+
position: absolute;
|
68
|
+
top: calc(50% - 15px);
|
69
|
+
display: none;
|
70
|
+
width: 30px;
|
71
|
+
height: 30px;
|
72
|
+
cursor: pointer;
|
73
|
+
background: rgba(31,45,61,.4);
|
74
|
+
border-radius: 50%;
|
75
|
+
|
76
|
+
.bk-swiper-nav-icon {
|
77
|
+
position: absolute;
|
78
|
+
top: 9px;
|
79
|
+
left: 11px;
|
80
|
+
width: 10px;
|
81
|
+
height: 10px;
|
82
|
+
border-bottom: 2px solid #fff;
|
83
|
+
border-left: 2px solid #fff;
|
84
|
+
}
|
85
|
+
|
86
|
+
&.bk-nav-prev {
|
87
|
+
left: 14px;
|
88
|
+
transform: rotate(45deg);
|
89
|
+
|
90
|
+
&:hover {
|
91
|
+
transform: rotate(45deg);
|
92
|
+
}
|
93
|
+
}
|
94
|
+
|
95
|
+
&.bk-nav-next {
|
96
|
+
right: 14px;
|
97
|
+
transform: rotate(225deg);
|
98
|
+
|
99
|
+
&:hover {
|
100
|
+
transform: rotate(225deg);
|
101
|
+
}
|
102
|
+
}
|
103
|
+
|
104
|
+
&:hover {
|
105
|
+
background: rgba(31,45,61,.6);
|
106
|
+
}
|
107
|
+
}
|
@@ -0,0 +1,91 @@
|
|
1
|
+
.bk-swiper-home {
|
2
|
+
position: relative;
|
3
|
+
overflow: hidden;
|
4
|
+
}
|
5
|
+
.bk-swiper-home:hover .bk-swiper-nav {
|
6
|
+
display: block;
|
7
|
+
}
|
8
|
+
.bk-swiper-main {
|
9
|
+
display: flex;
|
10
|
+
height: 100%;
|
11
|
+
overflow: hidden;
|
12
|
+
}
|
13
|
+
.bk-swiper-main.bk-transition {
|
14
|
+
transition: 0.5s cubic-bezier(0.42, 0, 0.58, 1);
|
15
|
+
}
|
16
|
+
.bk-swiper-main .bk-swiper-card {
|
17
|
+
height: 100%;
|
18
|
+
padding: 0;
|
19
|
+
margin: 0;
|
20
|
+
}
|
21
|
+
.bk-swiper-main .bk-swiper-img {
|
22
|
+
display: inline-block;
|
23
|
+
width: 100%;
|
24
|
+
height: 100%;
|
25
|
+
margin: 0;
|
26
|
+
background-position: center;
|
27
|
+
background-repeat: no-repeat;
|
28
|
+
background-size: cover;
|
29
|
+
}
|
30
|
+
.bk-swiper-main .bk-swiper-link {
|
31
|
+
cursor: pointer;
|
32
|
+
}
|
33
|
+
.bk-swiper-index {
|
34
|
+
position: absolute;
|
35
|
+
right: 0;
|
36
|
+
bottom: 10px;
|
37
|
+
left: 0;
|
38
|
+
display: flex;
|
39
|
+
padding: 0;
|
40
|
+
margin: 0;
|
41
|
+
justify-content: center;
|
42
|
+
}
|
43
|
+
.bk-swiper-index li {
|
44
|
+
width: 11px;
|
45
|
+
height: 4px;
|
46
|
+
margin: 0 3px;
|
47
|
+
list-style-type: none;
|
48
|
+
background: #63656e;
|
49
|
+
border-radius: 2px;
|
50
|
+
transition: width 0.525s;
|
51
|
+
}
|
52
|
+
.bk-swiper-index li.bk-current-index {
|
53
|
+
width: 17px;
|
54
|
+
background: #c5c7d1;
|
55
|
+
}
|
56
|
+
.bk-swiper-nav {
|
57
|
+
position: absolute;
|
58
|
+
top: calc(50% - 15px);
|
59
|
+
display: none;
|
60
|
+
width: 30px;
|
61
|
+
height: 30px;
|
62
|
+
cursor: pointer;
|
63
|
+
background: rgba(31, 45, 61, 0.4);
|
64
|
+
border-radius: 50%;
|
65
|
+
}
|
66
|
+
.bk-swiper-nav .bk-swiper-nav-icon {
|
67
|
+
position: absolute;
|
68
|
+
top: 9px;
|
69
|
+
left: 11px;
|
70
|
+
width: 10px;
|
71
|
+
height: 10px;
|
72
|
+
border-bottom: 2px solid #fff;
|
73
|
+
border-left: 2px solid #fff;
|
74
|
+
}
|
75
|
+
.bk-swiper-nav.bk-nav-prev {
|
76
|
+
left: 14px;
|
77
|
+
transform: rotate(45deg);
|
78
|
+
}
|
79
|
+
.bk-swiper-nav.bk-nav-prev:hover {
|
80
|
+
transform: rotate(45deg);
|
81
|
+
}
|
82
|
+
.bk-swiper-nav.bk-nav-next {
|
83
|
+
right: 14px;
|
84
|
+
transform: rotate(225deg);
|
85
|
+
}
|
86
|
+
.bk-swiper-nav.bk-nav-next:hover {
|
87
|
+
transform: rotate(225deg);
|
88
|
+
}
|
89
|
+
.bk-swiper-nav:hover {
|
90
|
+
background: rgba(31, 45, 61, 0.6);
|
91
|
+
}
|
@@ -0,0 +1,286 @@
|
|
1
|
+
declare const BkSwitcher: {
|
2
|
+
new (...args: any[]): {
|
3
|
+
$: import("vue").ComponentInternalInstance;
|
4
|
+
$data: {};
|
5
|
+
$props: Partial<{
|
6
|
+
theme: string;
|
7
|
+
value: string | number | boolean;
|
8
|
+
extCls: string;
|
9
|
+
disabled: boolean;
|
10
|
+
modelValue: string | number | boolean;
|
11
|
+
showText: boolean;
|
12
|
+
isOutline: boolean;
|
13
|
+
onText: string;
|
14
|
+
offText: string;
|
15
|
+
isSquare: boolean;
|
16
|
+
preCheck: (...args: any[]) => any;
|
17
|
+
trueValue: string | number | boolean;
|
18
|
+
falseValue: string | number | boolean;
|
19
|
+
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
20
|
+
theme: import("vue-types").VueTypeDef<string> & {
|
21
|
+
default: string;
|
22
|
+
};
|
23
|
+
size: import("vue-types").VueTypeDef<string>;
|
24
|
+
disabled: import("vue-types").VueTypeValidableDef<boolean> & {
|
25
|
+
default: boolean;
|
26
|
+
};
|
27
|
+
showText: import("vue-types").VueTypeValidableDef<boolean> & {
|
28
|
+
default: boolean;
|
29
|
+
};
|
30
|
+
isOutline: import("vue-types").VueTypeValidableDef<boolean> & {
|
31
|
+
default: boolean;
|
32
|
+
};
|
33
|
+
onText: import("vue-types").VueTypeValidableDef<string> & {
|
34
|
+
default: string;
|
35
|
+
} & {
|
36
|
+
default: string;
|
37
|
+
};
|
38
|
+
offText: import("vue-types").VueTypeValidableDef<string> & {
|
39
|
+
default: string;
|
40
|
+
} & {
|
41
|
+
default: string;
|
42
|
+
};
|
43
|
+
isSquare: import("vue-types").VueTypeValidableDef<boolean> & {
|
44
|
+
default: boolean;
|
45
|
+
};
|
46
|
+
extCls: import("vue-types").VueTypeValidableDef<string> & {
|
47
|
+
default: string;
|
48
|
+
};
|
49
|
+
preCheck: import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
|
50
|
+
default: (...args: any[]) => any;
|
51
|
+
} & {
|
52
|
+
default: (...args: any[]) => any;
|
53
|
+
};
|
54
|
+
trueValue: import("vue-types").VueTypeDef<string | number | boolean> & {
|
55
|
+
default: string | number | boolean;
|
56
|
+
};
|
57
|
+
falseValue: import("vue-types").VueTypeDef<string | number | boolean> & {
|
58
|
+
default: string | number | boolean;
|
59
|
+
};
|
60
|
+
value: import("vue-types").VueTypeDef<string | number | boolean> & {
|
61
|
+
default: string | number | boolean;
|
62
|
+
};
|
63
|
+
modelValue: import("vue-types").VueTypeDef<string | number | boolean> & {
|
64
|
+
default: string | number | boolean;
|
65
|
+
};
|
66
|
+
}>> & {
|
67
|
+
onChange?: (...args: any[]) => any;
|
68
|
+
"onUpdate:modelValue"?: (...args: any[]) => any;
|
69
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "theme" | "value" | "extCls" | "disabled" | "modelValue" | "showText" | "isOutline" | "onText" | "offText" | "isSquare" | "preCheck" | "trueValue" | "falseValue">;
|
70
|
+
$attrs: {
|
71
|
+
[x: string]: unknown;
|
72
|
+
};
|
73
|
+
$refs: {
|
74
|
+
[x: string]: unknown;
|
75
|
+
};
|
76
|
+
$slots: Readonly<{
|
77
|
+
[name: string]: import("vue").Slot;
|
78
|
+
}>;
|
79
|
+
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>;
|
80
|
+
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>;
|
81
|
+
$emit: (event: "change" | "update:modelValue", ...args: any[]) => void;
|
82
|
+
$el: any;
|
83
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
84
|
+
theme: import("vue-types").VueTypeDef<string> & {
|
85
|
+
default: string;
|
86
|
+
};
|
87
|
+
size: import("vue-types").VueTypeDef<string>;
|
88
|
+
disabled: import("vue-types").VueTypeValidableDef<boolean> & {
|
89
|
+
default: boolean;
|
90
|
+
};
|
91
|
+
showText: import("vue-types").VueTypeValidableDef<boolean> & {
|
92
|
+
default: boolean;
|
93
|
+
};
|
94
|
+
isOutline: import("vue-types").VueTypeValidableDef<boolean> & {
|
95
|
+
default: boolean;
|
96
|
+
};
|
97
|
+
onText: import("vue-types").VueTypeValidableDef<string> & {
|
98
|
+
default: string;
|
99
|
+
} & {
|
100
|
+
default: string;
|
101
|
+
};
|
102
|
+
offText: import("vue-types").VueTypeValidableDef<string> & {
|
103
|
+
default: string;
|
104
|
+
} & {
|
105
|
+
default: string;
|
106
|
+
};
|
107
|
+
isSquare: import("vue-types").VueTypeValidableDef<boolean> & {
|
108
|
+
default: boolean;
|
109
|
+
};
|
110
|
+
extCls: import("vue-types").VueTypeValidableDef<string> & {
|
111
|
+
default: string;
|
112
|
+
};
|
113
|
+
preCheck: import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
|
114
|
+
default: (...args: any[]) => any;
|
115
|
+
} & {
|
116
|
+
default: (...args: any[]) => any;
|
117
|
+
};
|
118
|
+
trueValue: import("vue-types").VueTypeDef<string | number | boolean> & {
|
119
|
+
default: string | number | boolean;
|
120
|
+
};
|
121
|
+
falseValue: import("vue-types").VueTypeDef<string | number | boolean> & {
|
122
|
+
default: string | number | boolean;
|
123
|
+
};
|
124
|
+
value: import("vue-types").VueTypeDef<string | number | boolean> & {
|
125
|
+
default: string | number | boolean;
|
126
|
+
};
|
127
|
+
modelValue: import("vue-types").VueTypeDef<string | number | boolean> & {
|
128
|
+
default: string | number | boolean;
|
129
|
+
};
|
130
|
+
}>> & {
|
131
|
+
onChange?: (...args: any[]) => any;
|
132
|
+
"onUpdate:modelValue"?: (...args: any[]) => any;
|
133
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], string, {
|
134
|
+
theme: string;
|
135
|
+
value: string | number | boolean;
|
136
|
+
extCls: string;
|
137
|
+
disabled: boolean;
|
138
|
+
modelValue: string | number | boolean;
|
139
|
+
showText: boolean;
|
140
|
+
isOutline: boolean;
|
141
|
+
onText: string;
|
142
|
+
offText: string;
|
143
|
+
isSquare: boolean;
|
144
|
+
preCheck: (...args: any[]) => any;
|
145
|
+
trueValue: string | number | boolean;
|
146
|
+
falseValue: string | number | boolean;
|
147
|
+
}> & {
|
148
|
+
beforeCreate?: (() => void) | (() => void)[];
|
149
|
+
created?: (() => void) | (() => void)[];
|
150
|
+
beforeMount?: (() => void) | (() => void)[];
|
151
|
+
mounted?: (() => void) | (() => void)[];
|
152
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
153
|
+
updated?: (() => void) | (() => void)[];
|
154
|
+
activated?: (() => void) | (() => void)[];
|
155
|
+
deactivated?: (() => void) | (() => void)[];
|
156
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
157
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
158
|
+
destroyed?: (() => void) | (() => void)[];
|
159
|
+
unmounted?: (() => void) | (() => void)[];
|
160
|
+
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
161
|
+
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
162
|
+
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>, info: string) => boolean | void)[];
|
163
|
+
};
|
164
|
+
$forceUpdate: () => void;
|
165
|
+
$nextTick: typeof import("vue").nextTick;
|
166
|
+
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean>): import("vue").WatchStopHandle;
|
167
|
+
} & Readonly<import("vue").ExtractPropTypes<{
|
168
|
+
theme: import("vue-types").VueTypeDef<string> & {
|
169
|
+
default: string;
|
170
|
+
};
|
171
|
+
size: import("vue-types").VueTypeDef<string>;
|
172
|
+
disabled: import("vue-types").VueTypeValidableDef<boolean> & {
|
173
|
+
default: boolean;
|
174
|
+
};
|
175
|
+
showText: import("vue-types").VueTypeValidableDef<boolean> & {
|
176
|
+
default: boolean;
|
177
|
+
};
|
178
|
+
isOutline: import("vue-types").VueTypeValidableDef<boolean> & {
|
179
|
+
default: boolean;
|
180
|
+
};
|
181
|
+
onText: import("vue-types").VueTypeValidableDef<string> & {
|
182
|
+
default: string;
|
183
|
+
} & {
|
184
|
+
default: string;
|
185
|
+
};
|
186
|
+
offText: import("vue-types").VueTypeValidableDef<string> & {
|
187
|
+
default: string;
|
188
|
+
} & {
|
189
|
+
default: string;
|
190
|
+
};
|
191
|
+
isSquare: import("vue-types").VueTypeValidableDef<boolean> & {
|
192
|
+
default: boolean;
|
193
|
+
};
|
194
|
+
extCls: import("vue-types").VueTypeValidableDef<string> & {
|
195
|
+
default: string;
|
196
|
+
};
|
197
|
+
preCheck: import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
|
198
|
+
default: (...args: any[]) => any;
|
199
|
+
} & {
|
200
|
+
default: (...args: any[]) => any;
|
201
|
+
};
|
202
|
+
trueValue: import("vue-types").VueTypeDef<string | number | boolean> & {
|
203
|
+
default: string | number | boolean;
|
204
|
+
};
|
205
|
+
falseValue: import("vue-types").VueTypeDef<string | number | boolean> & {
|
206
|
+
default: string | number | boolean;
|
207
|
+
};
|
208
|
+
value: import("vue-types").VueTypeDef<string | number | boolean> & {
|
209
|
+
default: string | number | boolean;
|
210
|
+
};
|
211
|
+
modelValue: import("vue-types").VueTypeDef<string | number | boolean> & {
|
212
|
+
default: string | number | boolean;
|
213
|
+
};
|
214
|
+
}>> & {
|
215
|
+
onChange?: (...args: any[]) => any;
|
216
|
+
"onUpdate:modelValue"?: (...args: any[]) => any;
|
217
|
+
} & import("vue").ShallowUnwrapRef<() => JSX.Element> & {} & {} & import("vue").ComponentCustomProperties;
|
218
|
+
__isFragment?: never;
|
219
|
+
__isTeleport?: never;
|
220
|
+
__isSuspense?: never;
|
221
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
222
|
+
theme: import("vue-types").VueTypeDef<string> & {
|
223
|
+
default: string;
|
224
|
+
};
|
225
|
+
size: import("vue-types").VueTypeDef<string>;
|
226
|
+
disabled: import("vue-types").VueTypeValidableDef<boolean> & {
|
227
|
+
default: boolean;
|
228
|
+
};
|
229
|
+
showText: import("vue-types").VueTypeValidableDef<boolean> & {
|
230
|
+
default: boolean;
|
231
|
+
};
|
232
|
+
isOutline: import("vue-types").VueTypeValidableDef<boolean> & {
|
233
|
+
default: boolean;
|
234
|
+
};
|
235
|
+
onText: import("vue-types").VueTypeValidableDef<string> & {
|
236
|
+
default: string;
|
237
|
+
} & {
|
238
|
+
default: string;
|
239
|
+
};
|
240
|
+
offText: import("vue-types").VueTypeValidableDef<string> & {
|
241
|
+
default: string;
|
242
|
+
} & {
|
243
|
+
default: string;
|
244
|
+
};
|
245
|
+
isSquare: import("vue-types").VueTypeValidableDef<boolean> & {
|
246
|
+
default: boolean;
|
247
|
+
};
|
248
|
+
extCls: import("vue-types").VueTypeValidableDef<string> & {
|
249
|
+
default: string;
|
250
|
+
};
|
251
|
+
preCheck: import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
|
252
|
+
default: (...args: any[]) => any;
|
253
|
+
} & {
|
254
|
+
default: (...args: any[]) => any;
|
255
|
+
};
|
256
|
+
trueValue: import("vue-types").VueTypeDef<string | number | boolean> & {
|
257
|
+
default: string | number | boolean;
|
258
|
+
};
|
259
|
+
falseValue: import("vue-types").VueTypeDef<string | number | boolean> & {
|
260
|
+
default: string | number | boolean;
|
261
|
+
};
|
262
|
+
value: import("vue-types").VueTypeDef<string | number | boolean> & {
|
263
|
+
default: string | number | boolean;
|
264
|
+
};
|
265
|
+
modelValue: import("vue-types").VueTypeDef<string | number | boolean> & {
|
266
|
+
default: string | number | boolean;
|
267
|
+
};
|
268
|
+
}>> & {
|
269
|
+
onChange?: (...args: any[]) => any;
|
270
|
+
"onUpdate:modelValue"?: (...args: any[]) => any;
|
271
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", {
|
272
|
+
theme: string;
|
273
|
+
value: string | number | boolean;
|
274
|
+
extCls: string;
|
275
|
+
disabled: boolean;
|
276
|
+
modelValue: string | number | boolean;
|
277
|
+
showText: boolean;
|
278
|
+
isOutline: boolean;
|
279
|
+
onText: string;
|
280
|
+
offText: string;
|
281
|
+
isSquare: boolean;
|
282
|
+
preCheck: (...args: any[]) => any;
|
283
|
+
trueValue: string | number | boolean;
|
284
|
+
falseValue: string | number | boolean;
|
285
|
+
}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("@vue/runtime-core").Plugin;
|
286
|
+
export default BkSwitcher;
|
package/lib/switcher/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("
|
1
|
+
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("../shared"),require("vue"),require("../icon")):"function"==typeof define&&define.amd?define(["exports","../shared","vue","../icon"],o):o((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Shared,e.Vue,e["@bkui-vue/icon/icons"])}(this,(function(e,o,t,r){"use strict";function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var u={exports:{}};!function(e){e.exports=function(e,o,t){return o in e?Object.defineProperty(e,o,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[o]=t,e},e.exports.__esModule=!0,e.exports.default=e.exports}(u);var s=n(u.exports),i=t.defineComponent({name:"Switcher",props:{theme:o.PropTypes.theme().def(""),size:o.PropTypes.size(),disabled:o.PropTypes.bool,showText:o.PropTypes.bool,isOutline:o.PropTypes.bool,onText:o.PropTypes.string.def("ON"),offText:o.PropTypes.string.def("OFF"),isSquare:o.PropTypes.bool,extCls:o.PropTypes.string,preCheck:o.PropTypes.func.def(void 0),trueValue:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.number,o.PropTypes.bool]).def(!0),falseValue:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.number,o.PropTypes.bool]).def(!1),value:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.number,o.PropTypes.bool]).def(!1),modelValue:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.number,o.PropTypes.bool]).def(!1)},emits:["update:modelValue","change"],setup:function(e,o){var n=o.emit,u=t.ref(!1),i=t.computed((function(){return e.trueValue===l.value})),p=t.ref(!1!==e.modelValue),l=t.computed((function(){return p.value?e.modelValue:e.value})),a=t.computed((function(){var o,t=(s(o={},e.extCls,!!e.extCls),s(o,"bk-switcher",!0),s(o,"bk-switcher-outline",e.isOutline),s(o,"bk-switcher-square",e.isSquare),s(o,"show-label",e.showText),s(o,"is-disabled",e.disabled),s(o,"is-checked",i.value),s(o,"is-unchecked",!i.value),s(o,"is-loading",u.value),s(o,"primary","primary"===e.theme),o);e.size&&!e.showText&&(t["bk-switcher-".concat(e.size)]=!0);return e.size||(t["bk-switcher-nomal"]=!0),t}));t.watch((function(){return e.modelValue}),(function(){p.value=!0})),t.watch((function(){return e.value}),(function(){p.value=!1}));var f=function(o){if(o.stopPropagation(),o.preventDefault(),!e.disabled&&!u.value){var t=i.value?e.falseValue:e.trueValue,r=!i.value,s=function(){n("update:modelValue",t),n("change",r)},p=!0;if("function"==typeof e.preCheck&&"function"==typeof(p=e.preCheck(t)).then)return u.value=!0,p.then((function(){s()})).finally((function(){u.value=!1}));p&&s()}};return function(){return t.createVNode("div",{class:a.value,onClick:f,tabindex:"0",onKeydown:f},[u.value?t.createVNode(r.SwitcherLoading,{class:"bk-switcher-loading"},null):"",e.showText?t.createVNode("span",{class:"switcher-text"},[i.value?e.onText:e.offText]):""])}}}),p=o.withInstall(i);e.default=p,Object.defineProperty(e,"__esModule",{value:!0})}));
|