bkui-vue 0.0.1-beta.45 → 0.0.1-beta.451
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/License.txt +14 -0
- package/dist/index.cjs.js +160 -35
- package/dist/index.esm.js +35562 -14524
- package/dist/index.umd.js +160 -35
- package/dist/locale/en.esm.js +2 -0
- package/dist/locale/en.esm.js.map +1 -0
- package/dist/locale/en.umd.js +2 -0
- package/dist/locale/en.umd.js.map +1 -0
- package/dist/locale/zh-cn.esm.js +2 -0
- package/dist/locale/zh-cn.esm.js.map +1 -0
- package/dist/locale/zh-cn.umd.js +2 -0
- package/dist/locale/zh-cn.umd.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -0
- package/lib/affix/affix.css +3 -0
- package/lib/affix/affix.d.ts +47 -0
- package/lib/affix/affix.less +5 -0
- package/lib/affix/affix.variable.css +125 -0
- package/lib/affix/index.d.ts +143 -0
- package/lib/affix/index.js +1 -0
- package/lib/alert/alert.css +9 -3
- package/lib/alert/alert.d.ts +5 -5
- package/lib/alert/alert.less +29 -20
- package/lib/alert/alert.variable.css +41 -7
- package/lib/alert/index.d.ts +11 -11
- package/lib/alert/index.js +1 -1
- package/lib/animate-number/animate-number.d.ts +1 -1
- package/lib/animate-number/index.d.ts +4 -4
- package/lib/backtop/backtop.css +8 -0
- package/lib/backtop/backtop.d.ts +3 -3
- package/lib/backtop/backtop.less +8 -0
- package/lib/backtop/backtop.variable.css +40 -4
- package/lib/backtop/index.d.ts +10 -10
- package/lib/backtop/index.js +1 -1
- package/lib/badge/badge.css +7 -10
- package/lib/badge/badge.d.ts +28 -7
- package/lib/badge/badge.less +9 -11
- package/lib/badge/badge.variable.css +39 -14
- package/lib/badge/index.d.ts +68 -18
- package/lib/badge/index.js +1 -1
- package/lib/breadcrumb/breadcrumb-item.d.ts +4 -2
- package/lib/breadcrumb/breadcrumb.css +51 -0
- package/lib/breadcrumb/breadcrumb.variable.css +88 -9
- package/lib/breadcrumb/index.d.ts +4 -2
- package/lib/breadcrumb/index.js +1 -1
- package/lib/button/button-group.d.ts +2 -2
- package/lib/button/button.css +85 -50
- package/lib/button/button.d.ts +44 -24
- package/lib/button/button.less +72 -42
- package/lib/button/button.variable.css +117 -54
- package/lib/button/index.d.ts +74 -44
- package/lib/button/index.js +1 -1
- package/lib/card/card.css +97 -2
- package/lib/card/card.d.ts +47 -6
- package/lib/card/card.less +50 -2
- package/lib/card/card.variable.css +133 -10
- package/lib/card/index.d.ts +113 -17
- package/lib/card/index.js +1 -1
- package/lib/cascader/cascader-panel.d.ts +101 -0
- package/lib/cascader/cascader.css +316 -0
- package/lib/cascader/cascader.d.ts +342 -0
- package/lib/cascader/cascader.less +283 -0
- package/lib/cascader/cascader.variable.css +438 -0
- package/lib/cascader/index.d.ts +961 -0
- package/lib/cascader/index.js +1 -0
- package/lib/cascader/interface.d.ts +51 -0
- package/lib/cascader/node.d.ts +31 -0
- package/lib/cascader/store.d.ts +25 -0
- package/lib/checkbox/checkbox-group.d.ts +16 -0
- package/lib/checkbox/checkbox.css +51 -11
- package/lib/checkbox/checkbox.d.ts +36 -24
- package/lib/checkbox/checkbox.less +85 -32
- package/lib/checkbox/checkbox.variable.css +83 -15
- package/lib/checkbox/common.d.ts +4 -3
- package/lib/checkbox/index.d.ts +70 -38
- package/lib/checkbox/index.js +1 -1
- package/lib/checkbox/type.d.ts +2 -6
- package/lib/code-diff/code-diff.css +27 -7
- package/lib/code-diff/code-diff.d.ts +1 -1
- package/lib/code-diff/code-diff.less +42 -7
- package/lib/code-diff/code-diff.variable.css +59 -11
- package/lib/code-diff/index.js +1 -1
- package/lib/collapse/collapse-panel.d.ts +103 -0
- package/lib/collapse/collapse.css +69 -14
- package/lib/collapse/collapse.d.ts +66 -52
- package/lib/collapse/collapse.less +112 -30
- package/lib/collapse/collapse.variable.css +191 -14
- package/lib/collapse/index.d.ts +266 -20
- package/lib/collapse/index.js +1 -1
- package/lib/collapse/props.d.ts +131 -0
- package/lib/collapse/utils.d.ts +11 -0
- package/lib/collapse-transition/collapse-transition.css +93 -0
- package/lib/collapse-transition/collapse-transition.d.ts +15 -0
- package/lib/collapse-transition/collapse-transition.less +111 -0
- package/lib/collapse-transition/collapse-transition.variable.css +215 -0
- package/lib/collapse-transition/index.d.ts +2 -0
- package/lib/collapse-transition/index.js +1 -0
- package/lib/color-picker/color-picker.css +275 -0
- package/lib/color-picker/color-picker.d.ts +144 -0
- package/lib/color-picker/color-picker.less +325 -0
- package/lib/color-picker/color-picker.variable.css +397 -0
- package/lib/color-picker/components/color-input.d.ts +42 -0
- package/lib/color-picker/components/hue-slider.d.ts +41 -0
- package/lib/color-picker/components/input-container.d.ts +42 -0
- package/lib/color-picker/components/recommend-colors.d.ts +51 -0
- package/lib/color-picker/components/saturation-panel.d.ts +41 -0
- package/lib/color-picker/index.d.ts +254 -0
- package/lib/color-picker/index.js +1 -0
- package/lib/color-picker/utils.d.ts +37 -0
- package/lib/components.d.ts +31 -8
- package/lib/components.js +1 -0
- package/lib/config-provider/config-provider.css +0 -0
- package/lib/config-provider/config-provider.d.ts +384 -0
- package/lib/config-provider/config-provider.less +1 -0
- package/lib/config-provider/config-provider.variable.css +122 -0
- package/lib/config-provider/index.d.ts +585 -0
- package/lib/config-provider/index.js +1 -0
- package/lib/config-provider/token.d.ts +122 -0
- package/lib/config-provider/use-global-config.d.ts +5 -0
- package/lib/config-provider/use-locale.d.ts +3 -0
- package/lib/config-provider/use-prefix.d.ts +9 -0
- package/lib/container/col.d.ts +51 -0
- package/lib/container/container.css +91 -0
- package/lib/container/container.d.ts +83 -0
- package/lib/container/container.less +20 -0
- package/lib/container/container.variable.css +213 -0
- package/lib/container/index.d.ts +223 -0
- package/lib/container/index.js +1 -0
- package/lib/container/row.d.ts +4 -0
- package/lib/date-picker/base/confirm.d.ts +74 -0
- package/lib/date-picker/base/date-table.d.ts +96 -0
- package/lib/date-picker/base/month-table.d.ts +117 -0
- package/lib/date-picker/base/picker-dropdown.d.ts +74 -0
- package/lib/date-picker/base/time-spinner.d.ts +170 -0
- package/lib/date-picker/base/year-table.d.ts +117 -0
- package/lib/date-picker/date-picker.css +28 -1
- package/lib/date-picker/date-picker.d.ts +49 -20
- package/lib/date-picker/date-picker.less +106 -74
- package/lib/date-picker/date-picker.variable.css +60 -5
- package/lib/date-picker/index.d.ts +121 -54
- package/lib/date-picker/index.js +1 -1
- package/lib/date-picker/interface.d.ts +11 -1
- package/lib/date-picker/panel/date-range.d.ts +328 -0
- package/lib/date-picker/panel/date.d.ts +206 -0
- package/lib/date-picker/panel/time-range.d.ts +489 -0
- package/lib/date-picker/panel/time.d.ts +448 -0
- package/lib/date-picker/props.d.ts +55 -5
- package/lib/date-picker/time-picker.d.ts +381 -0
- package/lib/date-picker/utils.d.ts +22 -2
- package/lib/dialog/dialog.css +136 -24
- package/lib/dialog/dialog.d.ts +245 -58
- package/lib/dialog/dialog.less +100 -38
- package/lib/dialog/dialog.variable.css +258 -24
- package/lib/dialog/index.d.ts +545 -126
- package/lib/dialog/index.js +1 -1
- package/lib/dialog/props.d.ts +122 -0
- package/lib/directives/ellipsis.d.ts +7 -0
- package/lib/directives/index.d.ts +2 -0
- package/lib/directives/index.js +1 -1
- package/lib/directives/tooltips.d.ts +2 -1
- package/lib/dist.index.js +1 -0
- package/lib/divider/divider.d.ts +15 -15
- package/lib/divider/divider.variable.css +32 -4
- package/lib/divider/index.d.ts +34 -34
- package/lib/divider/index.js +1 -1
- package/lib/divider/props.d.ts +6 -6
- package/lib/dropdown/dropdown.css +13 -7
- package/lib/dropdown/dropdown.d.ts +46 -14
- package/lib/dropdown/dropdown.less +47 -34
- package/lib/dropdown/dropdown.variable.css +45 -11
- package/lib/dropdown/index.d.ts +99 -35
- package/lib/dropdown/index.js +1 -1
- package/lib/exception/exception.css +40 -14
- package/lib/exception/exception.d.ts +31 -11
- package/lib/exception/exception.less +59 -22
- package/lib/exception/exception.variable.css +72 -18
- package/lib/exception/index.d.ts +43 -26
- package/lib/exception/index.js +1 -1
- package/lib/exception/typings/index.d.ts +4 -0
- package/lib/fixed-navbar/fixed-navbar.d.ts +16 -2
- package/lib/fixed-navbar/fixed-navbar.variable.css +32 -4
- package/lib/fixed-navbar/index.d.ts +40 -5
- package/lib/fixed-navbar/index.js +1 -1
- package/lib/form/compose-form-item.d.ts +16 -0
- package/lib/form/form-item.d.ts +22 -7
- package/lib/form/form.css +103 -15
- package/lib/form/form.d.ts +48 -14
- package/lib/form/form.less +152 -46
- package/lib/form/form.variable.css +225 -15
- package/lib/form/index.d.ts +121 -35
- package/lib/form/index.js +1 -1
- package/lib/form/type.d.ts +11 -8
- package/lib/form/utils.d.ts +2 -0
- package/lib/form/validator.d.ts +1 -0
- package/lib/hooks.d.ts +1 -0
- package/lib/hooks.js +1 -0
- package/lib/icon/angle-double-down-line.js +1 -1
- package/lib/icon/angle-double-left-line.js +1 -1
- package/lib/icon/angle-double-left.js +1 -1
- package/lib/icon/angle-double-right-line.js +1 -1
- package/lib/icon/angle-double-right.js +1 -1
- package/lib/icon/angle-double-up-line.js +1 -1
- package/lib/icon/angle-down-fill.js +1 -1
- package/lib/icon/angle-down-line.js +1 -1
- package/lib/icon/angle-down.js +1 -1
- package/lib/icon/angle-left.js +1 -1
- package/lib/icon/angle-right.js +1 -1
- package/lib/icon/angle-up-fill.js +1 -1
- package/lib/icon/angle-up.js +1 -1
- package/lib/icon/archive-fill.d.ts +4 -0
- package/lib/icon/archive-fill.js +1 -0
- package/lib/icon/arrows-left.js +1 -1
- package/lib/icon/arrows-right.js +1 -1
- package/lib/icon/audio-fill.d.ts +4 -0
- package/lib/icon/audio-fill.js +1 -0
- package/lib/icon/bk.js +1 -1
- package/lib/icon/circle.js +1 -1
- package/lib/icon/close-line.d.ts +4 -0
- package/lib/icon/close-line.js +1 -0
- package/lib/icon/close.js +1 -1
- package/lib/icon/code.js +1 -1
- package/lib/icon/cog-shape.js +1 -1
- package/lib/icon/collapse-left.js +1 -1
- package/lib/icon/copy.js +1 -1
- package/lib/icon/data-shape.d.ts +4 -0
- package/lib/icon/data-shape.js +1 -0
- package/lib/icon/del.d.ts +4 -0
- package/lib/icon/del.js +1 -0
- package/lib/icon/doc-fill.d.ts +4 -0
- package/lib/icon/doc-fill.js +1 -0
- package/lib/icon/done.js +1 -1
- package/lib/icon/down-shape.js +1 -1
- package/lib/icon/down-small.js +1 -1
- package/lib/icon/edit-line.d.ts +4 -0
- package/lib/icon/edit-line.js +1 -0
- package/lib/icon/ellipsis.js +1 -1
- package/lib/icon/enlarge-line.d.ts +4 -0
- package/lib/icon/enlarge-line.js +1 -0
- package/lib/icon/error.js +1 -1
- package/lib/icon/excel-fill.d.ts +4 -0
- package/lib/icon/excel-fill.js +1 -0
- package/lib/icon/exclamation-circle-shape.d.ts +4 -0
- package/lib/icon/exclamation-circle-shape.js +1 -0
- package/lib/icon/eye.js +1 -1
- package/lib/icon/filliscreen-line.d.ts +4 -0
- package/lib/icon/filliscreen-line.js +1 -0
- package/lib/icon/folder-open.js +1 -1
- package/lib/icon/folder-shape-open.js +1 -1
- package/lib/icon/folder-shape.js +1 -1
- package/lib/icon/folder.js +1 -1
- package/lib/icon/funnel.d.ts +4 -0
- package/lib/icon/funnel.js +1 -0
- package/lib/icon/help-document-fill.js +1 -1
- package/lib/icon/help-fill.js +1 -1
- package/lib/icon/help.js +1 -1
- package/lib/icon/image-fill.d.ts +4 -0
- package/lib/icon/img-error.d.ts +4 -0
- package/lib/icon/img-error.js +1 -0
- package/lib/icon/img-placehoulder.d.ts +4 -0
- package/lib/icon/img-placehoulder.js +1 -0
- package/lib/icon/index.d.ts +79 -53
- package/lib/icon/index.js +1 -1
- package/lib/icon/info-line.js +1 -1
- package/lib/icon/info.js +1 -1
- package/lib/icon/left-shape.js +1 -1
- package/lib/icon/left-turn-line.d.ts +4 -0
- package/lib/icon/left-turn-line.js +1 -0
- package/lib/icon/narrow-line.d.ts +4 -0
- package/lib/icon/narrow-line.js +1 -0
- package/lib/icon/original.d.ts +4 -0
- package/lib/icon/original.js +1 -0
- package/lib/icon/pdf-fill.d.ts +4 -0
- package/lib/icon/pdf-fill.js +1 -0
- package/lib/icon/play-shape.js +1 -1
- package/lib/icon/plus.js +1 -1
- package/lib/icon/ppt-fill.d.ts +4 -0
- package/lib/icon/ppt-fill.js +1 -0
- package/lib/icon/qq.js +1 -1
- package/lib/icon/right-shape.js +1 -1
- package/lib/icon/right-turn-line.d.ts +4 -0
- package/lib/icon/right-turn-line.js +1 -0
- package/lib/icon/search.js +1 -1
- package/lib/icon/share.js +1 -1
- package/lib/icon/spinner.js +1 -1
- package/lib/icon/success.js +1 -1
- package/lib/icon/switcher-loading.js +1 -1
- package/lib/icon/text-file.js +1 -1
- package/lib/icon/text-fill.d.ts +4 -0
- package/lib/icon/text-fill.js +1 -0
- package/lib/icon/transfer.d.ts +4 -0
- package/lib/icon/transfer.js +1 -0
- package/lib/icon/tree-application-shape.js +1 -1
- package/lib/icon/unfull-screen.d.ts +4 -0
- package/lib/icon/unfull-screen.js +1 -0
- package/lib/icon/unvisible.js +1 -1
- package/lib/icon/up-shape.js +1 -1
- package/lib/icon/upload.d.ts +4 -0
- package/lib/icon/upload.js +1 -0
- package/lib/icon/video-fill.d.ts +4 -0
- package/lib/icon/video-fill.js +1 -0
- package/lib/icon/warn.js +1 -1
- package/lib/icon/weixin.js +1 -1
- package/lib/image/image-viewer.css +142 -0
- package/lib/image/image-viewer.d.ts +73 -0
- package/lib/image/image-viewer.less +168 -0
- package/lib/image/image-viewer.variable.css +142 -0
- package/lib/image/image.css +37 -0
- package/lib/image/image.d.ts +93 -0
- package/lib/image/image.less +44 -0
- package/lib/image/image.variable.css +37 -0
- package/lib/image/index.d.ts +246 -0
- package/lib/image/index.js +1 -0
- package/lib/image/props.d.ts +71 -0
- package/lib/index.d.ts +3 -1
- package/lib/index.js +1 -0
- package/lib/info-box/index.d.ts +7 -0
- package/lib/info-box/index.js +1 -0
- package/lib/info-box/info-box.css +37 -0
- package/lib/info-box/info-box.d.ts +28 -0
- package/lib/info-box/info-box.less +51 -0
- package/lib/info-box/info-box.variable.css +159 -0
- package/lib/input/index.d.ts +175 -90
- package/lib/input/index.js +1 -1
- package/lib/input/input.css +183 -19
- package/lib/input/input.d.ts +119 -36
- package/lib/input/input.less +112 -18
- package/lib/input/input.variable.css +246 -55
- package/lib/link/index.d.ts +29 -21
- package/lib/link/index.js +1 -1
- package/lib/link/link.css +12 -12
- package/lib/link/link.d.ts +10 -8
- package/lib/link/link.less +16 -14
- package/lib/link/link.variable.css +44 -16
- package/lib/loading/directive.d.ts +14 -0
- package/lib/loading/index.d.ts +135 -19
- package/lib/loading/index.js +1 -1
- package/lib/loading/loading.css +86 -33
- package/lib/loading/loading.d.ts +94 -12
- package/lib/loading/loading.less +27 -23
- package/lib/loading/loading.variable.css +134 -53
- package/lib/locale/index.d.ts +3 -0
- package/lib/locale/index.js +1 -0
- package/lib/locale/lang/en.d.ts +120 -0
- package/lib/locale/lang/zh-cn.d.ts +3 -0
- package/lib/menu/index.d.ts +16 -24
- package/lib/menu/index.js +1 -1
- package/lib/menu/menu.css +51 -0
- package/lib/menu/menu.d.ts +7 -16
- package/lib/menu/menu.variable.css +101 -22
- package/lib/menu/submenu.variable.css +32 -4
- package/lib/message/index.js +1 -1
- package/lib/message/message.css +17 -5
- package/lib/message/message.less +21 -6
- package/lib/message/message.variable.css +49 -9
- package/lib/message/messageConstructor.d.ts +14 -11
- package/lib/modal/index.d.ts +470 -78
- package/lib/modal/index.js +1 -1
- package/lib/modal/modal.css +63 -1
- package/lib/modal/modal.d.ts +177 -30
- package/lib/modal/modal.less +39 -3
- package/lib/modal/modal.variable.css +185 -1
- package/lib/modal/props.mixin.d.ts +74 -13
- package/lib/navigation/index.d.ts +310 -1
- package/lib/navigation/index.js +1 -1
- package/lib/navigation/navigation.css +1 -1
- package/lib/navigation/navigation.d.ts +11 -2
- package/lib/navigation/navigation.less +1 -1
- package/lib/navigation/navigation.variable.css +33 -5
- package/lib/notify/index.js +1 -1
- package/lib/notify/notify.css +25 -5
- package/lib/notify/notify.less +29 -6
- package/lib/notify/notify.variable.css +57 -9
- package/lib/notify/notifyConstructor.d.ts +62 -21
- package/lib/overflow-title/components/overflow-title.d.ts +57 -0
- package/lib/overflow-title/directive/overflow-title.d.ts +3 -0
- package/lib/overflow-title/index.d.ts +170 -0
- package/lib/overflow-title/index.js +1 -0
- package/lib/overflow-title/overflow.css +11 -0
- package/lib/overflow-title/overflow.less +13 -0
- package/lib/overflow-title/overflow.variable.css +11 -0
- package/lib/overflow-title/props.d.ts +43 -0
- package/lib/overflow-title/utils/getActualWidthByCanvas.d.ts +3 -0
- package/lib/overflow-title/utils/getActualWidthByDom.d.ts +3 -0
- package/lib/pagination/index.d.ts +35 -20
- package/lib/pagination/index.js +1 -1
- package/lib/pagination/pagination.css +54 -28
- package/lib/pagination/pagination.d.ts +18 -8
- package/lib/pagination/pagination.less +59 -30
- package/lib/pagination/pagination.variable.css +86 -32
- package/lib/pagination/use-limit.d.ts +3 -1
- package/lib/pagination/use-total.d.ts +3 -1
- package/lib/plugin-popover/index.d.ts +27 -0
- package/lib/plugin-popover/index.js +1 -0
- package/lib/plugins/index.d.ts +1 -0
- package/lib/plugins/index.js +1 -0
- package/lib/pop-confirm/index.d.ts +246 -0
- package/lib/pop-confirm/index.js +1 -0
- package/lib/pop-confirm/pop-confirm.css +28 -0
- package/lib/pop-confirm/pop-confirm.d.ts +95 -0
- package/lib/pop-confirm/pop-confirm.less +34 -0
- package/lib/pop-confirm/pop-confirm.variable.css +150 -0
- package/lib/pop-confirm/props.d.ts +67 -0
- package/lib/popover/arrow.d.ts +2 -0
- package/lib/popover/const.d.ts +16 -0
- package/lib/popover/content.d.ts +43 -0
- package/lib/popover/index.d.ts +504 -97
- package/lib/popover/index.js +1 -1
- package/lib/popover/plugin-popover.d.ts +12 -0
- package/lib/popover/popover.css +10 -50
- package/lib/popover/popover.d.ts +222 -43
- package/lib/popover/popover.less +19 -66
- package/lib/popover/popover.variable.css +42 -54
- package/lib/popover/props.d.ts +110 -30
- package/lib/popover/reference.d.ts +2 -0
- package/lib/popover/root.d.ts +16 -0
- package/lib/popover/use-floating.d.ts +34 -0
- package/lib/popover/use-platform.d.ts +30 -0
- package/lib/popover/use-popover-init.d.ts +23 -0
- package/lib/popover/use-popper-id.d.ts +6 -0
- package/lib/popover/utils.d.ts +8 -0
- package/lib/popover2/index.d.ts +44 -0
- package/lib/popover2/index.js +1 -0
- package/lib/popover2/popover.d.ts +2 -0
- package/lib/preset.d.ts +252 -2
- package/lib/preset.js +1 -0
- package/lib/process/index.d.ts +9 -9
- package/lib/process/index.js +1 -1
- package/lib/process/process.css +22 -0
- package/lib/process/process.d.ts +2 -2
- package/lib/process/process.less +30 -2
- package/lib/process/process.variable.css +54 -4
- package/lib/progress/index.d.ts +31 -31
- package/lib/progress/index.js +1 -1
- package/lib/progress/progress.css +51 -0
- package/lib/progress/progress.d.ts +12 -12
- package/lib/progress/progress.variable.css +87 -8
- package/lib/radio/common.d.ts +5 -5
- package/lib/radio/index.d.ts +36 -18
- package/lib/radio/index.js +1 -1
- package/lib/radio/radio-button.d.ts +7 -8
- package/lib/radio/radio-group.d.ts +26 -0
- package/lib/radio/radio.css +137 -66
- package/lib/radio/radio.d.ts +4 -4
- package/lib/radio/radio.less +262 -173
- package/lib/radio/radio.variable.css +172 -73
- package/lib/radio/type.d.ts +9 -4
- package/lib/rate/index.d.ts +28 -5
- package/lib/rate/index.js +1 -1
- package/lib/rate/rate.d.ts +13 -2
- package/lib/rate/star.d.ts +1 -1
- package/lib/resize-layout/index.d.ts +18 -18
- package/lib/resize-layout/index.js +1 -1
- package/lib/resize-layout/resize-layout.css +6 -15
- package/lib/resize-layout/resize-layout.d.ts +7 -7
- package/lib/resize-layout/resize-layout.less +10 -19
- package/lib/resize-layout/resize-layout.variable.css +38 -19
- package/lib/search-select/index.d.ts +891 -0
- package/lib/search-select/index.js +1 -0
- package/lib/search-select/input.d.ts +101 -0
- package/lib/search-select/menu.d.ts +77 -0
- package/lib/search-select/search-select.css +427 -0
- package/lib/search-select/search-select.d.ts +361 -0
- package/lib/search-select/search-select.less +384 -0
- package/lib/search-select/search-select.variable.css +549 -0
- package/lib/search-select/selected.d.ts +155 -0
- package/lib/search-select/utils.d.ts +88 -0
- package/lib/select/common.d.ts +5 -12
- package/lib/select/index.d.ts +1816 -691
- package/lib/select/index.js +1 -1
- package/lib/select/option.d.ts +18 -4
- package/lib/select/optionGroup.d.ts +1 -1
- package/lib/select/select.css +202 -113
- package/lib/select/select.d.ts +715 -147
- package/lib/select/select.less +335 -197
- package/lib/select/select.variable.css +234 -117
- package/lib/select/selectTagInput.d.ts +94 -0
- package/lib/select/type.d.ts +21 -13
- package/lib/shared/dom.d.ts +3 -0
- package/lib/shared/helper.d.ts +9 -0
- package/lib/shared/hooks/use-form-item.d.ts +2 -0
- package/lib/shared/hooks/use-form.d.ts +2 -0
- package/lib/shared/index.d.ts +32 -7
- package/lib/shared/index.js +1 -1
- package/lib/shared/mask-manager.d.ts +19 -5
- package/lib/shared/pop-manager.d.ts +16 -5
- package/lib/shared/popover.d.ts +6 -2
- package/lib/shared/token.d.ts +4 -0
- package/lib/shared/utils.d.ts +19 -0
- package/lib/shared/vue-types.d.ts +107 -7
- package/lib/sideslider/index.d.ts +343 -69
- package/lib/sideslider/index.js +1 -1
- package/lib/sideslider/sideslider.css +58 -11
- package/lib/sideslider/sideslider.d.ts +160 -31
- package/lib/sideslider/sideslider.less +75 -14
- package/lib/sideslider/sideslider.variable.css +90 -15
- package/lib/slider/index.d.ts +414 -1
- package/lib/slider/index.js +1 -1
- package/lib/slider/slider-button.d.ts +2 -1
- package/lib/slider/slider.d.ts +4 -4
- package/lib/slider/slider.variable.css +32 -4
- package/lib/steps/index.d.ts +52 -52
- package/lib/steps/index.js +1 -1
- package/lib/steps/steps.css +15 -3
- package/lib/steps/steps.d.ts +32 -32
- package/lib/steps/steps.less +24 -3
- package/lib/steps/steps.variable.css +47 -7
- package/lib/styles/index.d.ts +10 -1
- package/lib/styles/mixins/clearfix.css +8 -0
- package/lib/styles/mixins/clearfix.less +10 -0
- package/lib/styles/mixins/clearfix.variable.css +8 -0
- package/lib/styles/mixins/mixins.css +51 -0
- package/lib/styles/mixins/mixins.less +2 -0
- package/lib/styles/mixins/mixins.variable.css +51 -0
- package/lib/styles/mixins/popper.css +1 -1
- package/lib/styles/mixins/popper.less +12 -11
- package/lib/styles/mixins/popper.variable.css +123 -1
- package/lib/styles/mixins/scroll.css +17 -0
- package/lib/styles/mixins/scroll.less +22 -0
- package/lib/styles/mixins/scroll.variable.css +139 -0
- package/lib/styles/reset.css +36 -0
- package/lib/styles/reset.less +26 -2
- package/lib/styles/reset.variable.css +36 -0
- package/lib/styles/themes/themes.less +42 -4
- package/lib/switcher/index.d.ts +42 -30
- package/lib/switcher/index.js +1 -1
- package/lib/switcher/switcher.css +57 -6
- package/lib/switcher/switcher.d.ts +19 -13
- package/lib/switcher/switcher.less +5 -26
- package/lib/switcher/switcher.variable.css +106 -27
- package/lib/tab/index.d.ts +121 -67
- package/lib/tab/index.js +1 -1
- package/lib/tab/props.d.ts +93 -41
- package/lib/tab/tab-nav.d.ts +50 -14
- package/lib/tab/tab-panel.d.ts +14 -7
- package/lib/tab/tab.css +151 -55
- package/lib/tab/tab.d.ts +42 -21
- package/lib/tab/tab.less +179 -86
- package/lib/tab/tab.variable.css +183 -59
- package/lib/table/cache.d.ts +6 -0
- package/lib/table/components/index.d.ts +3 -0
- package/lib/table/components/table-cell.d.ts +51 -0
- package/lib/table/components/table-column.d.ts +299 -0
- package/lib/table/components/table-row.d.ts +2 -0
- package/lib/table/const.d.ts +125 -1
- package/lib/table/index.d.ts +1375 -48
- package/lib/table/index.js +1 -1
- package/lib/table/plugins/body-empty.d.ts +36 -0
- package/lib/table/plugins/col-group.d.ts +38 -0
- package/lib/table/plugins/common.d.ts +6 -0
- package/lib/table/plugins/head-filter.css +84 -0
- package/lib/table/plugins/head-filter.d.ts +26 -0
- package/lib/table/plugins/head-filter.less +110 -0
- package/lib/table/plugins/head-filter.variable.css +206 -0
- package/lib/table/plugins/head-sort.css +26 -0
- package/lib/table/plugins/head-sort.d.ts +29 -0
- package/lib/table/plugins/head-sort.less +32 -0
- package/lib/table/plugins/head-sort.variable.css +148 -0
- package/lib/table/plugins/index.d.ts +5 -0
- package/lib/table/plugins/settings.css +147 -0
- package/lib/table/plugins/settings.d.ts +37 -0
- package/lib/table/plugins/settings.less +181 -0
- package/lib/table/plugins/settings.variable.css +269 -0
- package/lib/table/plugins/use-active-columns.d.ts +16 -0
- package/lib/table/plugins/use-column-resize.d.ts +15 -0
- package/lib/table/plugins/use-fixed-column.d.ts +26 -0
- package/lib/table/plugins/use-pagination.d.ts +16 -0
- package/lib/table/plugins/use-scroll-loading.d.ts +5 -0
- package/lib/table/props.d.ts +358 -11
- package/lib/table/render.d.ts +54 -31
- package/lib/table/table.css +1250 -38
- package/lib/table/table.d.ts +258 -18
- package/lib/table/table.less +314 -42
- package/lib/table/table.variable.css +1291 -51
- package/lib/table/use-column.d.ts +12 -0
- package/lib/table/use-common.d.ts +113 -0
- package/lib/table/utils.d.ts +60 -13
- package/lib/table-column/index.d.ts +790 -0
- package/lib/table-column/index.js +1 -0
- package/lib/tag/index.d.ts +29 -29
- package/lib/tag/index.js +1 -1
- package/lib/tag/tag.css +46 -13
- package/lib/tag/tag.d.ts +12 -12
- package/lib/tag/tag.less +46 -10
- package/lib/tag/tag.variable.css +78 -17
- package/lib/tag-input/common.d.ts +13 -1
- package/lib/tag-input/index.d.ts +1406 -1
- package/lib/tag-input/index.js +1 -1
- package/lib/tag-input/list-tag-render.d.ts +0 -3
- package/lib/tag-input/tag-input.css +23 -26
- package/lib/tag-input/tag-input.d.ts +303 -44
- package/lib/tag-input/tag-input.less +102 -104
- package/lib/tag-input/tag-input.variable.css +55 -30
- package/lib/tag-input/tag-props.d.ts +141 -7
- package/lib/tag-input/tag-render.d.ts +30 -4
- package/lib/time-picker/index.d.ts +904 -0
- package/lib/time-picker/index.js +1 -0
- package/lib/time-picker/time-picker.css +215 -0
- package/lib/time-picker/time-picker.less +260 -0
- package/lib/time-picker/time-picker.variable.css +337 -0
- package/lib/timeline/index.d.ts +6 -6
- package/lib/timeline/index.js +1 -1
- package/lib/timeline/timeline.css +16 -9
- package/lib/timeline/timeline.d.ts +1 -1
- package/lib/timeline/timeline.less +22 -9
- package/lib/timeline/timeline.variable.css +48 -13
- package/lib/transfer/const.d.ts +5 -0
- package/lib/transfer/index.d.ts +247 -150
- package/lib/transfer/index.js +1 -1
- package/lib/transfer/props.d.ts +59 -0
- package/lib/transfer/transfer.css +153 -92
- package/lib/transfer/transfer.d.ts +101 -95
- package/lib/transfer/transfer.less +142 -112
- package/lib/transfer/transfer.variable.css +191 -102
- package/lib/tree/constant.d.ts +62 -0
- package/lib/tree/index.d.ts +379 -60
- package/lib/tree/index.js +1 -1
- package/lib/tree/props.d.ts +124 -0
- package/lib/tree/tree.css +181 -9
- package/lib/tree/tree.d.ts +172 -19
- package/lib/tree/tree.less +54 -3
- package/lib/tree/tree.variable.css +213 -13
- package/lib/tree/use-empty.d.ts +6 -0
- package/lib/tree/use-node-action.d.ts +12 -0
- package/lib/tree/use-node-async.d.ts +5 -0
- package/lib/tree/use-node-attribute.d.ts +33 -0
- package/lib/tree/use-node-drag.d.ts +3 -0
- package/lib/tree/use-search.d.ts +11 -0
- package/lib/tree/use-tree-init.d.ts +15 -0
- package/lib/tree/util.d.ts +4 -6
- package/lib/upload/index.d.ts +566 -0
- package/lib/upload/index.js +1 -0
- package/lib/upload/props.d.ts +111 -0
- package/lib/upload/upload-list.d.ts +47 -0
- package/lib/upload/upload-trigger.d.ts +51 -0
- package/lib/upload/upload.css +427 -0
- package/lib/upload/upload.d.ts +246 -0
- package/lib/upload/upload.less +466 -0
- package/lib/upload/upload.type.d.ts +78 -0
- package/lib/upload/upload.variable.css +549 -0
- package/lib/upload/use-ajax-upload.d.ts +3 -0
- package/lib/upload/use-file-handler.d.ts +44 -0
- package/lib/virtual-render/index.d.ts +50 -4
- package/lib/virtual-render/index.js +1 -1
- package/lib/virtual-render/props.d.ts +15 -0
- package/lib/virtual-render/use-tag-render.d.ts +7 -0
- package/lib/virtual-render/v-virtual-render.d.ts +0 -1
- package/lib/virtual-render/virtual-render.css +17 -17
- package/lib/virtual-render/virtual-render.d.ts +23 -1
- package/lib/virtual-render/virtual-render.less +2 -23
- package/lib/virtual-render/virtual-render.variable.css +139 -17
- package/lib/volar.components.d.ts +102 -0
- package/package.json +59 -26
- package/LICENSE.txt +0 -22
- package/lib/form/common.d.ts +0 -3
- package/lib/use-form.d.ts +0 -3
package/lib/slider/index.d.ts
CHANGED
@@ -23,5 +23,418 @@
|
|
23
23
|
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
24
24
|
* IN THE SOFTWARE.
|
25
25
|
*/
|
26
|
-
|
26
|
+
declare const Slider: {
|
27
|
+
new (...args: any[]): {
|
28
|
+
$: import("vue").ComponentInternalInstance;
|
29
|
+
$data: {};
|
30
|
+
$props: Partial<{
|
31
|
+
height: string;
|
32
|
+
extCls: string;
|
33
|
+
vertical: boolean;
|
34
|
+
range: boolean;
|
35
|
+
step: number;
|
36
|
+
showInput: boolean;
|
37
|
+
customContent: Record<string, any>;
|
38
|
+
disable: boolean;
|
39
|
+
showTip: boolean;
|
40
|
+
maxValue: number;
|
41
|
+
minValue: number;
|
42
|
+
showInterval: boolean;
|
43
|
+
showIntervalLabel: boolean;
|
44
|
+
showButtonLabel: boolean;
|
45
|
+
showBetweenLabel: boolean;
|
46
|
+
formatterLabel: Function;
|
47
|
+
formatterButtonLabel: Function;
|
48
|
+
formatterTipLabel: Function;
|
49
|
+
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
50
|
+
modelValue: import("vue-types").VueTypeDef<number | unknown[]>;
|
51
|
+
extCls: {
|
52
|
+
type: StringConstructor;
|
53
|
+
default: string;
|
54
|
+
};
|
55
|
+
vertical: {
|
56
|
+
type: BooleanConstructor;
|
57
|
+
default: boolean;
|
58
|
+
};
|
59
|
+
height: {
|
60
|
+
type: StringConstructor;
|
61
|
+
default: string;
|
62
|
+
};
|
63
|
+
disable: {
|
64
|
+
type: BooleanConstructor;
|
65
|
+
default: boolean;
|
66
|
+
};
|
67
|
+
showTip: {
|
68
|
+
type: BooleanConstructor;
|
69
|
+
default: boolean;
|
70
|
+
};
|
71
|
+
maxValue: {
|
72
|
+
type: NumberConstructor[];
|
73
|
+
default: number;
|
74
|
+
};
|
75
|
+
minValue: {
|
76
|
+
type: NumberConstructor[];
|
77
|
+
default: number;
|
78
|
+
};
|
79
|
+
step: {
|
80
|
+
type: NumberConstructor[];
|
81
|
+
default: number;
|
82
|
+
};
|
83
|
+
range: {
|
84
|
+
type: BooleanConstructor;
|
85
|
+
default: boolean;
|
86
|
+
};
|
87
|
+
showInterval: {
|
88
|
+
type: BooleanConstructor;
|
89
|
+
default: boolean;
|
90
|
+
};
|
91
|
+
showIntervalLabel: {
|
92
|
+
type: BooleanConstructor;
|
93
|
+
default: boolean;
|
94
|
+
};
|
95
|
+
showButtonLabel: {
|
96
|
+
type: BooleanConstructor;
|
97
|
+
default: boolean;
|
98
|
+
};
|
99
|
+
showBetweenLabel: {
|
100
|
+
type: BooleanConstructor;
|
101
|
+
default: boolean;
|
102
|
+
};
|
103
|
+
showInput: {
|
104
|
+
type: BooleanConstructor;
|
105
|
+
default: boolean;
|
106
|
+
};
|
107
|
+
customContent: {
|
108
|
+
type: ObjectConstructor;
|
109
|
+
default: any;
|
110
|
+
};
|
111
|
+
formatterLabel: {
|
112
|
+
type: FunctionConstructor;
|
113
|
+
default: (value: number) => number;
|
114
|
+
};
|
115
|
+
formatterButtonLabel: {
|
116
|
+
type: FunctionConstructor;
|
117
|
+
default: (value: number) => number;
|
118
|
+
};
|
119
|
+
formatterTipLabel: {
|
120
|
+
type: FunctionConstructor;
|
121
|
+
default: (value: number) => number;
|
122
|
+
};
|
123
|
+
}>> & {
|
124
|
+
onChange?: (...args: any[]) => any;
|
125
|
+
"onUpdate:modelValue"?: (...args: any[]) => any;
|
126
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "height" | "extCls" | "vertical" | "range" | "step" | "showInput" | "customContent" | "disable" | "showTip" | "maxValue" | "minValue" | "showInterval" | "showIntervalLabel" | "showButtonLabel" | "showBetweenLabel" | "formatterLabel" | "formatterButtonLabel" | "formatterTipLabel">;
|
127
|
+
$attrs: {
|
128
|
+
[x: string]: unknown;
|
129
|
+
};
|
130
|
+
$refs: {
|
131
|
+
[x: string]: unknown;
|
132
|
+
};
|
133
|
+
$slots: Readonly<{
|
134
|
+
[name: string]: import("vue").Slot;
|
135
|
+
}>;
|
136
|
+
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>;
|
137
|
+
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>;
|
138
|
+
$emit: (event: "change" | "update:modelValue", ...args: any[]) => void;
|
139
|
+
$el: any;
|
140
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
141
|
+
modelValue: import("vue-types").VueTypeDef<number | unknown[]>;
|
142
|
+
extCls: {
|
143
|
+
type: StringConstructor;
|
144
|
+
default: string;
|
145
|
+
};
|
146
|
+
vertical: {
|
147
|
+
type: BooleanConstructor;
|
148
|
+
default: boolean;
|
149
|
+
};
|
150
|
+
height: {
|
151
|
+
type: StringConstructor;
|
152
|
+
default: string;
|
153
|
+
};
|
154
|
+
disable: {
|
155
|
+
type: BooleanConstructor;
|
156
|
+
default: boolean;
|
157
|
+
};
|
158
|
+
showTip: {
|
159
|
+
type: BooleanConstructor;
|
160
|
+
default: boolean;
|
161
|
+
};
|
162
|
+
maxValue: {
|
163
|
+
type: NumberConstructor[];
|
164
|
+
default: number;
|
165
|
+
};
|
166
|
+
minValue: {
|
167
|
+
type: NumberConstructor[];
|
168
|
+
default: number;
|
169
|
+
};
|
170
|
+
step: {
|
171
|
+
type: NumberConstructor[];
|
172
|
+
default: number;
|
173
|
+
};
|
174
|
+
range: {
|
175
|
+
type: BooleanConstructor;
|
176
|
+
default: boolean;
|
177
|
+
};
|
178
|
+
showInterval: {
|
179
|
+
type: BooleanConstructor;
|
180
|
+
default: boolean;
|
181
|
+
};
|
182
|
+
showIntervalLabel: {
|
183
|
+
type: BooleanConstructor;
|
184
|
+
default: boolean;
|
185
|
+
};
|
186
|
+
showButtonLabel: {
|
187
|
+
type: BooleanConstructor;
|
188
|
+
default: boolean;
|
189
|
+
};
|
190
|
+
showBetweenLabel: {
|
191
|
+
type: BooleanConstructor;
|
192
|
+
default: boolean;
|
193
|
+
};
|
194
|
+
showInput: {
|
195
|
+
type: BooleanConstructor;
|
196
|
+
default: boolean;
|
197
|
+
};
|
198
|
+
customContent: {
|
199
|
+
type: ObjectConstructor;
|
200
|
+
default: any;
|
201
|
+
};
|
202
|
+
formatterLabel: {
|
203
|
+
type: FunctionConstructor;
|
204
|
+
default: (value: number) => number;
|
205
|
+
};
|
206
|
+
formatterButtonLabel: {
|
207
|
+
type: FunctionConstructor;
|
208
|
+
default: (value: number) => number;
|
209
|
+
};
|
210
|
+
formatterTipLabel: {
|
211
|
+
type: FunctionConstructor;
|
212
|
+
default: (value: number) => number;
|
213
|
+
};
|
214
|
+
}>> & {
|
215
|
+
onChange?: (...args: any[]) => any;
|
216
|
+
"onUpdate:modelValue"?: (...args: any[]) => any;
|
217
|
+
}, {
|
218
|
+
renderDom: () => JSX.Element;
|
219
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], string, {
|
220
|
+
height: string;
|
221
|
+
extCls: string;
|
222
|
+
vertical: boolean;
|
223
|
+
range: boolean;
|
224
|
+
step: number;
|
225
|
+
showInput: boolean;
|
226
|
+
customContent: Record<string, any>;
|
227
|
+
disable: boolean;
|
228
|
+
showTip: boolean;
|
229
|
+
maxValue: number;
|
230
|
+
minValue: number;
|
231
|
+
showInterval: boolean;
|
232
|
+
showIntervalLabel: boolean;
|
233
|
+
showButtonLabel: boolean;
|
234
|
+
showBetweenLabel: boolean;
|
235
|
+
formatterLabel: Function;
|
236
|
+
formatterButtonLabel: Function;
|
237
|
+
formatterTipLabel: Function;
|
238
|
+
}> & {
|
239
|
+
beforeCreate?: (() => void) | (() => void)[];
|
240
|
+
created?: (() => void) | (() => void)[];
|
241
|
+
beforeMount?: (() => void) | (() => void)[];
|
242
|
+
mounted?: (() => void) | (() => void)[];
|
243
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
244
|
+
updated?: (() => void) | (() => void)[];
|
245
|
+
activated?: (() => void) | (() => void)[];
|
246
|
+
deactivated?: (() => void) | (() => void)[];
|
247
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
248
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
249
|
+
destroyed?: (() => void) | (() => void)[];
|
250
|
+
unmounted?: (() => void) | (() => void)[];
|
251
|
+
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
252
|
+
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
253
|
+
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)[];
|
254
|
+
};
|
255
|
+
$forceUpdate: () => void;
|
256
|
+
$nextTick: typeof import("vue").nextTick;
|
257
|
+
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean>): import("vue").WatchStopHandle;
|
258
|
+
} & Readonly<import("vue").ExtractPropTypes<{
|
259
|
+
modelValue: import("vue-types").VueTypeDef<number | unknown[]>;
|
260
|
+
extCls: {
|
261
|
+
type: StringConstructor;
|
262
|
+
default: string;
|
263
|
+
};
|
264
|
+
vertical: {
|
265
|
+
type: BooleanConstructor;
|
266
|
+
default: boolean;
|
267
|
+
};
|
268
|
+
height: {
|
269
|
+
type: StringConstructor;
|
270
|
+
default: string;
|
271
|
+
};
|
272
|
+
disable: {
|
273
|
+
type: BooleanConstructor;
|
274
|
+
default: boolean;
|
275
|
+
};
|
276
|
+
showTip: {
|
277
|
+
type: BooleanConstructor;
|
278
|
+
default: boolean;
|
279
|
+
};
|
280
|
+
maxValue: {
|
281
|
+
type: NumberConstructor[];
|
282
|
+
default: number;
|
283
|
+
};
|
284
|
+
minValue: {
|
285
|
+
type: NumberConstructor[];
|
286
|
+
default: number;
|
287
|
+
};
|
288
|
+
step: {
|
289
|
+
type: NumberConstructor[];
|
290
|
+
default: number;
|
291
|
+
};
|
292
|
+
range: {
|
293
|
+
type: BooleanConstructor;
|
294
|
+
default: boolean;
|
295
|
+
};
|
296
|
+
showInterval: {
|
297
|
+
type: BooleanConstructor;
|
298
|
+
default: boolean;
|
299
|
+
};
|
300
|
+
showIntervalLabel: {
|
301
|
+
type: BooleanConstructor;
|
302
|
+
default: boolean;
|
303
|
+
};
|
304
|
+
showButtonLabel: {
|
305
|
+
type: BooleanConstructor;
|
306
|
+
default: boolean;
|
307
|
+
};
|
308
|
+
showBetweenLabel: {
|
309
|
+
type: BooleanConstructor;
|
310
|
+
default: boolean;
|
311
|
+
};
|
312
|
+
showInput: {
|
313
|
+
type: BooleanConstructor;
|
314
|
+
default: boolean;
|
315
|
+
};
|
316
|
+
customContent: {
|
317
|
+
type: ObjectConstructor;
|
318
|
+
default: any;
|
319
|
+
};
|
320
|
+
formatterLabel: {
|
321
|
+
type: FunctionConstructor;
|
322
|
+
default: (value: number) => number;
|
323
|
+
};
|
324
|
+
formatterButtonLabel: {
|
325
|
+
type: FunctionConstructor;
|
326
|
+
default: (value: number) => number;
|
327
|
+
};
|
328
|
+
formatterTipLabel: {
|
329
|
+
type: FunctionConstructor;
|
330
|
+
default: (value: number) => number;
|
331
|
+
};
|
332
|
+
}>> & {
|
333
|
+
onChange?: (...args: any[]) => any;
|
334
|
+
"onUpdate:modelValue"?: (...args: any[]) => any;
|
335
|
+
} & import("vue").ShallowUnwrapRef<{
|
336
|
+
renderDom: () => JSX.Element;
|
337
|
+
}> & {} & {} & import("vue").ComponentCustomProperties;
|
338
|
+
__isFragment?: never;
|
339
|
+
__isTeleport?: never;
|
340
|
+
__isSuspense?: never;
|
341
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
342
|
+
modelValue: import("vue-types").VueTypeDef<number | unknown[]>;
|
343
|
+
extCls: {
|
344
|
+
type: StringConstructor;
|
345
|
+
default: string;
|
346
|
+
};
|
347
|
+
vertical: {
|
348
|
+
type: BooleanConstructor;
|
349
|
+
default: boolean;
|
350
|
+
};
|
351
|
+
height: {
|
352
|
+
type: StringConstructor;
|
353
|
+
default: string;
|
354
|
+
};
|
355
|
+
disable: {
|
356
|
+
type: BooleanConstructor;
|
357
|
+
default: boolean;
|
358
|
+
};
|
359
|
+
showTip: {
|
360
|
+
type: BooleanConstructor;
|
361
|
+
default: boolean;
|
362
|
+
};
|
363
|
+
maxValue: {
|
364
|
+
type: NumberConstructor[];
|
365
|
+
default: number;
|
366
|
+
};
|
367
|
+
minValue: {
|
368
|
+
type: NumberConstructor[];
|
369
|
+
default: number;
|
370
|
+
};
|
371
|
+
step: {
|
372
|
+
type: NumberConstructor[];
|
373
|
+
default: number;
|
374
|
+
};
|
375
|
+
range: {
|
376
|
+
type: BooleanConstructor;
|
377
|
+
default: boolean;
|
378
|
+
};
|
379
|
+
showInterval: {
|
380
|
+
type: BooleanConstructor;
|
381
|
+
default: boolean;
|
382
|
+
};
|
383
|
+
showIntervalLabel: {
|
384
|
+
type: BooleanConstructor;
|
385
|
+
default: boolean;
|
386
|
+
};
|
387
|
+
showButtonLabel: {
|
388
|
+
type: BooleanConstructor;
|
389
|
+
default: boolean;
|
390
|
+
};
|
391
|
+
showBetweenLabel: {
|
392
|
+
type: BooleanConstructor;
|
393
|
+
default: boolean;
|
394
|
+
};
|
395
|
+
showInput: {
|
396
|
+
type: BooleanConstructor;
|
397
|
+
default: boolean;
|
398
|
+
};
|
399
|
+
customContent: {
|
400
|
+
type: ObjectConstructor;
|
401
|
+
default: any;
|
402
|
+
};
|
403
|
+
formatterLabel: {
|
404
|
+
type: FunctionConstructor;
|
405
|
+
default: (value: number) => number;
|
406
|
+
};
|
407
|
+
formatterButtonLabel: {
|
408
|
+
type: FunctionConstructor;
|
409
|
+
default: (value: number) => number;
|
410
|
+
};
|
411
|
+
formatterTipLabel: {
|
412
|
+
type: FunctionConstructor;
|
413
|
+
default: (value: number) => number;
|
414
|
+
};
|
415
|
+
}>> & {
|
416
|
+
onChange?: (...args: any[]) => any;
|
417
|
+
"onUpdate:modelValue"?: (...args: any[]) => any;
|
418
|
+
}, {
|
419
|
+
renderDom: () => JSX.Element;
|
420
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", {
|
421
|
+
height: string;
|
422
|
+
extCls: string;
|
423
|
+
vertical: boolean;
|
424
|
+
range: boolean;
|
425
|
+
step: number;
|
426
|
+
showInput: boolean;
|
427
|
+
customContent: Record<string, any>;
|
428
|
+
disable: boolean;
|
429
|
+
showTip: boolean;
|
430
|
+
maxValue: number;
|
431
|
+
minValue: number;
|
432
|
+
showInterval: boolean;
|
433
|
+
showIntervalLabel: boolean;
|
434
|
+
showButtonLabel: boolean;
|
435
|
+
showBetweenLabel: boolean;
|
436
|
+
formatterLabel: Function;
|
437
|
+
formatterButtonLabel: Function;
|
438
|
+
formatterTipLabel: Function;
|
439
|
+
}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("@vue/runtime-core").Plugin;
|
27
440
|
export default Slider;
|
package/lib/slider/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("vue"),require("../input"),require("../shared"),require("../popover"));else if("function"==typeof define&&define.amd)define(["vue","../input","../shared","../popover"],t);else{var a="object"==typeof exports?t(require("vue"),require("../input"),require("../shared"),require("../popover")):t(e.vue,e["../input"],e["../shared"],e["../popover"]);for(var r in a)("object"==typeof exports?exports:e)[r]=a[r]}}(self,((e,t,a,r)=>(()=>{var n={7162:(e,t,a)=>{e.exports=a(5047)},5047:e=>{var t=function(e){"use strict";var t,a=Object.prototype,r=a.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",u=n.asyncIterator||"@@asyncIterator",l=n.toStringTag||"@@toStringTag";function i(e,t,a){return Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{i({},"")}catch(e){i=function(e,t,a){return e[t]=a}}function c(e,t,a,r){var n=t&&t.prototype instanceof h?t:h,o=Object.create(n.prototype),u=new j(r||[]);return o._invoke=function(e,t,a){var r=v;return function(n,o){if(r===d)throw new Error("Generator is already running");if(r===f){if("throw"===n)throw o;return T()}for(a.method=n,a.arg=o;;){var u=a.delegate;if(u){var l=k(u,a);if(l){if(l===p)continue;return l}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(r===v)throw r=f,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);r=d;var i=s(e,t,a);if("normal"===i.type){if(r=a.done?f:m,i.arg===p)continue;return{value:i.arg,done:a.done}}"throw"===i.type&&(r=f,a.method="throw",a.arg=i.arg)}}}(e,a,u),o}function s(e,t,a){try{return{type:"normal",arg:e.call(t,a)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var v="suspendedStart",m="suspendedYield",d="executing",f="completed",p={};function h(){}function V(){}function y(){}var b={};i(b,o,(function(){return this}));var g=Object.getPrototypeOf,w=g&&g(g(B([])));w&&w!==a&&r.call(w,o)&&(b=w);var x=y.prototype=h.prototype=Object.create(b);function L(e){["next","throw","return"].forEach((function(t){i(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function a(n,o,u,l){var i=s(e[n],e,o);if("throw"!==i.type){var c=i.arg,v=c.value;return v&&"object"==typeof v&&r.call(v,"__await")?t.resolve(v.__await).then((function(e){a("next",e,u,l)}),(function(e){a("throw",e,u,l)})):t.resolve(v).then((function(e){c.value=e,u(c)}),(function(e){return a("throw",e,u,l)}))}l(i.arg)}var n;this._invoke=function(e,r){function o(){return new t((function(t,n){a(e,r,t,n)}))}return n=n?n.then(o,o):o()}}function k(e,a){var r=e.iterator[a.method];if(r===t){if(a.delegate=null,"throw"===a.method){if(e.iterator.return&&(a.method="return",a.arg=t,k(e,a),"throw"===a.method))return p;a.method="throw",a.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=s(r,e.iterator,a.arg);if("throw"===n.type)return a.method="throw",a.arg=n.arg,a.delegate=null,p;var o=n.arg;return o?o.done?(a[e.resultName]=o.value,a.next=e.nextLoc,"return"!==a.method&&(a.method="next",a.arg=t),a.delegate=null,p):o:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,p)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function B(e){if(e){var a=e[o];if(a)return a.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,u=function a(){for(;++n<e.length;)if(r.call(e,n))return a.value=e[n],a.done=!1,a;return a.value=t,a.done=!0,a};return u.next=u}}return{next:T}}function T(){return{value:t,done:!0}}return V.prototype=y,i(x,"constructor",y),i(y,"constructor",V),V.displayName=i(y,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===V||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,i(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},e.awrap=function(e){return{__await:e}},L(N.prototype),i(N.prototype,u,(function(){return this})),e.AsyncIterator=N,e.async=function(t,a,r,n,o){void 0===o&&(o=Promise);var u=new N(c(t,a,r,n),o);return e.isGeneratorFunction(a)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},L(x),i(x,l,"Generator"),i(x,o,(function(){return this})),i(x,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var a in e)t.push(a);return t.reverse(),function a(){for(;t.length;){var r=t.pop();if(r in e)return a.value=r,a.done=!1,a}return a.done=!0,a}},e.values=B,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(E),!e)for(var a in this)"t"===a.charAt(0)&&r.call(this,a)&&!isNaN(+a.slice(1))&&(this[a]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var a=this;function n(r,n){return l.type="throw",l.arg=e,a.next=r,n&&(a.method="next",a.arg=t),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var u=this.tryEntries[o],l=u.completion;if("root"===u.tryLoc)return n("end");if(u.tryLoc<=this.prev){var i=r.call(u,"catchLoc"),c=r.call(u,"finallyLoc");if(i&&c){if(this.prev<u.catchLoc)return n(u.catchLoc,!0);if(this.prev<u.finallyLoc)return n(u.finallyLoc)}else if(i){if(this.prev<u.catchLoc)return n(u.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return n(u.finallyLoc)}}}},abrupt:function(e,t){for(var a=this.tryEntries.length-1;a>=0;--a){var n=this.tryEntries[a];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=e,u.arg=t,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(u)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.finallyLoc===e)return this.complete(a.completion,a.afterLoc),E(a),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.tryLoc===e){var r=a.completion;if("throw"===r.type){var n=r.arg;E(a)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,a,r){return this.delegate={iterator:B(e),resultName:a,nextLoc:r},"next"===this.method&&(this.arg=t),p}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},8133:e=>{"use strict";e.exports=t},5537:e=>{"use strict";e.exports=r},4212:e=>{"use strict";e.exports=a},748:t=>{"use strict";t.exports=e}},o={};function u(e){var t=o[e];if(void 0!==t)return t.exports;var a=o[e]={exports:{}};return n[e](a,a.exports,u),a.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var a in t)u.o(t,a)&&!u.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return(()=>{"use strict";u.r(l),u.d(l,{default:()=>f});var e=u(748),t=u(7162),a=u.n(t);Object.create,Object.create;var r=u(8133),n=u.n(r),o=u(4212),i=u(5537),c=u.n(i);const s=(0,e.defineComponent)({name:"SliderButton",props:{modelValue:{type:Number,default:0},params:{type:Object,default:function(){return{}}}},emits:["emitChange","resetSize","update:modelValue"],setup:function(t,a){var r=a.emit,n=(0,e.ref)(!1),o=(0,e.ref)(!1),u=(0,e.ref)(0),l=(0,e.ref)(0),i=(0,e.ref)(0),s=(0,e.ref)(null),d=(0,e.ref)(t.modelValue),f=(0,e.ref)(0),p=(0,e.ref)(0),h=(0,e.ref)(!1),V=(0,e.ref)(null),y=(0,e.computed)((function(){var e,a,r="";if(null===(e=t.params.customContent)||void 0===e?void 0:e[t.modelValue]){var n=t.params.customContent[t.modelValue];r=n.tip||n.label||""}var o=t.params.vertical?"right":"top";return(null===(a=t.params)||void 0===a?void 0:a.showTip)?{content:t.params.formatterTipLabel("".concat(r||(null==t?void 0:t.modelValue)||"0")),placement:o}:{content:"",placement:o}})),b=(0,e.computed)((function(){return"".concat((t.modelValue-t.params.minValue)/(t.params.maxValue-t.params.minValue)*100,"%")})),g=(0,e.computed)((function(){return t.params.vertical?{bottom:b.value}:{left:b.value}})),w=(0,e.computed)((function(){return t.params.formatterButtonLabel(t.modelValue)})),x=function(e){t.params.disable||(e.preventDefault(),L(e),v(window,"mousemove",N),v(window,"touchmove",N),v(window,"mouseup",k),v(window,"touchend",k))},L=function(e){n.value=!0,o.value=!0,t.params.vertical?u.value=e.clientY:l.value=e.clientX,i.value=parseFloat(b.value),s.value=i.value},N=function(e){if(n.value){o.value=!1,r("resetSize");var a=0;t.params.vertical?(f.value=e.clientY,a=(u.value-f.value)/t.params.sliderSize*100):(p.value=e.clientX,a=(p.value-l.value)/t.params.sliderSize*100),s.value=i.value+a,C(s.value)}},k=function e(){h.value=!1,n.value&&(setTimeout((function(){n.value=!1,o.value||(C(s.value),r("emitChange"))}),0),m(window,"mousemove",N),m(window,"touchmove",N),m(window,"mouseup",e),m(window,"touchend",e))},C=function(e){if(null!==e&&!isNaN(e)){e<0?s.value=0:e>100&&(s.value=100);var a=100/((t.params.maxValue-t.params.minValue)/t.params.step),o=Math.round(e/a)*a*(t.params.maxValue-t.params.minValue)*.01+t.params.minValue;o=parseFloat(o.toFixed(t.params.precision)),r("update:modelValue",o),n.value||t.modelValue===d.value||(d.value=t.modelValue)}};return{renderDom:function(){return(0,e.createVNode)("div",{class:["bk-slider-button",t.params.vertical?"vertical":"horizontal",{grabbing:n.value}],ref:V,tabindex:"0",style:g.value,onClick:function(e){return e.stopPropagation()},onMousedown:x},[Boolean(y.value.content)?(0,e.createVNode)(c(),{content:y.value.content,theme:"dark",placement:y.value.placement,boundary:document.body},{default:function(){return[(0,e.createVNode)("div",{class:["slider-button",{"slider-button-disable":t.params.disable}]},null)]}}):(0,e.createVNode)("div",{class:["slider-button",{"slider-button-disable":t.params.disable}]},null),t.params.showButtonLabel&&!t.params.showIntervalLabel?(0,e.createVNode)("div",{class:["slider-button-label",t.params.vertical?"vertical":"horizontal"]},[w.value]):void 0])},setPosition:C,tip:y}},render:function(){return this.renderDom()}});var v=function(e,t,a){e&&t&&a&&e.addEventListener(t,a,!1)},m=function(e,t,a){e&&t&&a&&e.removeEventListener(t,a,!1)};const d=(0,e.defineComponent)({name:"Slider",props:{modelValue:o.PropTypes.oneOfType([o.PropTypes.array,o.PropTypes.number]),extCls:{type:String,default:""},vertical:{type:Boolean,default:!1},height:{type:String,default:"200px"},disable:{type:Boolean,default:!1},showTip:{type:Boolean,default:!1},maxValue:{type:[Number],default:100},minValue:{type:[Number],default:0},step:{type:[Number],default:1},range:{type:Boolean,default:!1},showInterval:{type:Boolean,default:!1},showIntervalLabel:{type:Boolean,default:!1},showButtonLabel:{type:Boolean,default:!1},showBetweenLabel:{type:Boolean,default:!1},showInput:{type:Boolean,default:!1},customContent:{type:Object,default:null},formatterLabel:{type:Function,default:function(e){return e}},formatterButtonLabel:{type:Function,default:function(e){return e}},formatterTipLabel:{type:Function,default:function(e){return e}}},emits:["update:modelValue","change"],setup:function(t,r){var o=this,u=r.slots,l=r.emit,i=(0,e.ref)(1),c=(0,e.ref)(null),m=(0,e.ref)(null),d=(0,e.ref)(null),f=(0,e.ref)(0),p=(0,e.ref)(0),h=(0,e.ref)(null),V=(0,e.ref)(null),y=(0,e.ref)(null),b=(0,e.ref)(null),g=(0,e.computed)((function(){var e=[t.minValue,t.maxValue,t.step].map((function(e){var t="".concat(e).split(".")[1];return t?t.length:0}));return Math.max.apply(null,e)})),w=(0,e.computed)((function(){return Math.min(c.value,m.value)})),x=(0,e.computed)((function(){return Math.max(c.value,m.value)})),L=(0,e.computed)((function(){return t.range?"".concat(100*(x.value-w.value)/(t.maxValue-t.minValue),"%"):"".concat(100*(c.value-t.minValue)/(t.maxValue-t.minValue),"%")})),N=(0,e.computed)((function(){return t.range?"".concat(100*(w.value-t.minValue)/(t.maxValue-t.minValue),"%"):"0%"})),k=(0,e.computed)((function(){return t.vertical?{height:L.value,bottom:N.value}:{width:L.value,left:N.value}})),C=(0,e.computed)((function(){if(!t.showInterval||t.minValue>t.maxValue)return[];if(0===t.step)return console.warn("WARNNING:step should not be 0"),[];for(var e=(t.maxValue-t.minValue)/t.step,a=100*t.step/(t.maxValue-t.minValue),r=[],n=1;n<e;n++)r.push(n*a);return t.range?r.filter((function(e){return e<100*(w.value-t.minValue)/(t.maxValue-t.minValue)||e>100*(x.value-t.minValue)/(t.maxValue-t.minValue)})):r.filter((function(e){return e>100*(c.value-t.minValue)/(t.maxValue-t.minValue)}))})),E=(0,e.computed)((function(){return t.vertical?{height:t.height,width:"4px"}:{}})),j=(0,e.computed)((function(){if(!t.showIntervalLabel)return[];if(0===t.step)return console.warn("WARNNING:step should not be 0"),[];for(var e=(t.maxValue-t.minValue)/t.step,a=100*t.step/(t.maxValue-t.minValue),r=[],n=0;n<=e;n++){var o={stepWidth:n*a,stepLabel:t.formatterLabel(n*t.step)};r.push(o)}return r})),B=(0,e.computed)((function(){return Array.isArray(t.modelValue)})),T=(0,e.computed)((function(){return t.customContent?Object.keys(t.customContent).sort((function(e,t){return Number(e)-Number(t)})).filter((function(e){return Number(e)>=t.minValue&&Number(e)<=t.maxValue})).map((function(e){var a=t.customContent[e].tip,r=t.customContent[e].label;return{tip:a||r||"",label:r||"",percent:(Number(e)-t.minValue)/(t.maxValue-t.minValue)*100}})):[]})),O=(0,e.computed)((function(){return{vertical:t.vertical,showTip:t.showTip,disable:t.disable,maxValue:t.maxValue,minValue:t.minValue,step:t.step,precision:g.value,showButtonLabel:t.showButtonLabel,formatterButtonLabel:t.formatterButtonLabel,showIntervalLabel:t.showIntervalLabel,customContent:t.customContent,sliderSize:i.value,formatterTipLabel:t.formatterTipLabel}}));(0,e.watch)((function(){return t.modelValue}),(function(){I()})),(0,e.watch)((function(){return c.value}),(function(e){t.range?l("update:modelValue",[w.value,x.value]):l("update:modelValue",e),f.value=e})),(0,e.watch)((function(){return m.value}),(function(e){l("update:modelValue",[w.value,x.value]),p.value=e})),(0,e.onMounted)((function(){t.range?(Array.isArray(t.modelValue)?(c.value=Math.max(t.minValue,Number(t.modelValue[0])),m.value=Math.min(t.maxValue,Number(t.modelValue[1]))):(c.value=t.minValue,m.value=t.maxValue),d.value=[c.value,m.value]):("number"!=typeof t.modelValue||isNaN(t.modelValue)?c.value=t.minValue:c.value=Math.min(t.maxValue,Math.max(t.minValue,t.modelValue)),d.value=c.value),S(),v(window,"resize",S())}));var S=function(){h.value&&(i.value=h.value["client".concat(t.vertical?"Height":"Width")])},P=function(e){var a,r;if(e.stopPropagation(),!t.disable){if(S(),t.vertical){var n=null===(a=h.value)||void 0===a?void 0:a.getBoundingClientRect().bottom;z((n-e.clientY)/i.value*100)}else{var o=null===(r=h.value)||void 0===r?void 0:r.getBoundingClientRect().left;z((e.clientX-o)/i.value*100)}F()}},_=function(){return t.range?![w.value,x.value].every((function(e,t){return e===d.value[t]})):t.modelValue!==d.value},I=function(){if(t.minValue>t.maxValue)console.error("min should not be greater than max.");else{var e=t.modelValue;t.range&&Array.isArray(e)?e[1]<t.minValue?l("update:modelValue",[t.minValue,t.minValue]):e[0]>t.maxValue?l("update:modelValue",[t.maxValue,t.maxValue]):e[0]<t.minValue?l("update:modelValue",[t.minValue,e[1]]):e[1]>t.maxValue?l("update:modelValue",[e[0],t.maxValue]):(c.value=Number(e[0]),m.value=Number(e[1]),_()&&(d.value=e.slice())):t.range||"number"!=typeof e||isNaN(e)||(e<t.minValue?l("update:modelValue",t.minValue):e>t.maxValue?l("update:modelValue",t.maxValue):(c.value=e,_()&&(d.value=e)))}},F=function(){return r=o,n=void 0,u=void 0,i=a().mark((function r(){return a().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,e.nextTick)();case 2:l("change",t.range?[w.value,x.value]:t.modelValue);case 3:case"end":return a.stop()}}),r)})),new(u||(u=Promise))((function(e,t){function a(e){try{l(i.next(e))}catch(e){t(e)}}function o(e){try{l(i.throw(e))}catch(e){t(e)}}function l(t){var r;t.done?e(t.value):(r=t.value,r instanceof u?r:new u((function(e){e(r)}))).then(a,o)}l((i=i.apply(r,n||[])).next())}));var r,n,u,i},M=function(e){return t.vertical?{bottom:"".concat(e,"%")}:{left:"".concat(e,"%")}},z=function(e){if(t.range){var a=t.minValue+e*(t.maxValue-t.minValue)/100;Math.abs(w.value-a)<Math.abs(x.value-a)?b.value=c.value<m.value?V.value:y.value:b.value=c.value>m.value?V.value:y.value,b.value.setPosition(e)}else V.value.setPosition(e)},A=function(e){if(""!==e){var a=parseFloat(e);a<t.minValue?(f.value=t.minValue,c.value=t.minValue):a>t.maxValue?(f.value=t.maxValue,c.value=t.maxValue):c.value=a}},G=function(e){if(""!==e){var a=parseFloat(e);a<t.minValue?(p.value=t.minValue,m.value=t.minValue):a>t.maxValue?(p.value=t.maxValue,m.value=t.maxValue):m.value=a}},R=function(e){var a;return a="start"===e?t.vertical?t.maxValue:t.minValue:t.vertical?t.minValue:t.maxValue,t.showButtonLabel&&[c.value,m.value].includes(a)?"0":"1"};return{renderDom:function(){var a,r;return(0,e.createVNode)(e.Fragment,null,[(0,e.createVNode)("div",{class:["bk-slider",t.extCls]},[null===(a=u.start)||void 0===a?void 0:a.call(u),(0,e.createVNode)("div",{class:"bk-slider-runway",ref:h,style:E.value,onClick:P},[(0,e.createVNode)("div",{class:["bk-slider-bar",t.vertical?"vertical":"horizontal",{disable:t.disable}],style:k.value},null),t.showInterval?C.value.map((function(a,r){return(0,e.createVNode)("div",{key:r,class:["bk-slider-interval",{vertical:t.vertical}],style:M(a)},null)})):void 0,t.customContent?T.value.map((function(a,r){return(0,e.createVNode)("div",{key:r,class:["bk-slider-interval",{vertical:t.vertical}],style:M(a.percent)},null)})):void 0,t.showBetweenLabel||t.showIntervalLabel||t.customContent?(0,e.createVNode)("div",{class:["bk-slider-labels",t.vertical?"vertical":"horizontal"]},[t.showBetweenLabel?[(0,e.createVNode)("div",{class:"label-start",style:[{opacity:R("start")}]},[t.formatterLabel(t.minValue)]),(0,e.createVNode)("div",{class:"label-end",style:[{opacity:R("end")}]},[t.formatterLabel(t.maxValue)])]:t.showIntervalLabel?j.value.map((function(a,r){return(0,e.createVNode)("div",{class:["bk-slider-label",t.vertical?"vertical":"horizontal"],key:r,style:M(a.stepWidth)},[a.stepLabel])})):t.customContent?T.value.map((function(a,r){return(0,e.createVNode)("div",{class:["bk-slider-label",t.vertical?"vertical":"horizontal"],key:r,style:M(a.percent)},[a.label])})):void 0]):void 0,(0,e.createVNode)(s,{modelValue:c.value,"onUpdate:modelValue":function(e){return c.value=e},ref:V,params:O.value,onEmitChange:F,onResetSize:S},null),t.range?(0,e.createVNode)(s,{modelValue:m.value,"onUpdate:modelValue":function(e){return m.value=e},ref:y,params:O.value,onEmitChange:F,onResetSize:S},null):void 0]),t.showInput&&!t.vertical?(0,e.createVNode)("div",{class:"bk-slider-input"},[(0,e.createVNode)("div",{class:"input-item"},[(0,e.createVNode)(n(),{type:"number",modelValue:f.value,max:t.maxValue,min:t.minValue,onChange:A},null)]),B.value&&m.value?(0,e.createVNode)(e.Fragment,null,[(0,e.createVNode)("div",{class:"input-center"},[(0,e.createTextVNode)("~")]),(0,e.createVNode)("div",{class:"input-item"},[(0,e.createVNode)(n(),{type:"number",modelValue:p.value,max:t.maxValue,min:t.minValue,onChange:G},null)])]):void 0]):void 0,null===(r=u.end)||void 0===r?void 0:r.call(u)])])}}},render:function(){return this.renderDom()}});d.install=function(e){e.component(d.name,d)};const f=d})(),l})()));
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../input"),require("../popover"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../input","../popover"],t);else{var a="object"==typeof exports?t(require("../shared"),require("vue"),require("../input"),require("../popover")):t(e["../shared"],e.vue,e["../input"],e["../popover"]);for(var r in a)("object"==typeof exports?exports:e)[r]=a[r]}}(self,((e,t,a,r)=>(()=>{var n={7162:(e,t,a)=>{e.exports=a(5047)},5047:e=>{var t=function(e){"use strict";var t,a=Object.prototype,r=a.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",u=n.asyncIterator||"@@asyncIterator",l=n.toStringTag||"@@toStringTag";function i(e,t,a){return Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{i({},"")}catch(e){i=function(e,t,a){return e[t]=a}}function c(e,t,a,r){var n=t&&t.prototype instanceof h?t:h,o=Object.create(n.prototype),u=new T(r||[]);return o._invoke=function(e,t,a){var r=v;return function(n,o){if(r===d)throw new Error("Generator is already running");if(r===f){if("throw"===n)throw o;return B()}for(a.method=n,a.arg=o;;){var u=a.delegate;if(u){var l=k(u,a);if(l){if(l===p)continue;return l}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(r===v)throw r=f,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);r=d;var i=s(e,t,a);if("normal"===i.type){if(r=a.done?f:m,i.arg===p)continue;return{value:i.arg,done:a.done}}"throw"===i.type&&(r=f,a.method="throw",a.arg=i.arg)}}}(e,a,u),o}function s(e,t,a){try{return{type:"normal",arg:e.call(t,a)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var v="suspendedStart",m="suspendedYield",d="executing",f="completed",p={};function h(){}function V(){}function y(){}var b={};i(b,o,(function(){return this}));var g=Object.getPrototypeOf,w=g&&g(g(j([])));w&&w!==a&&r.call(w,o)&&(b=w);var x=y.prototype=h.prototype=Object.create(b);function L(e){["next","throw","return"].forEach((function(t){i(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function a(n,o,u,l){var i=s(e[n],e,o);if("throw"!==i.type){var c=i.arg,v=c.value;return v&&"object"==typeof v&&r.call(v,"__await")?t.resolve(v.__await).then((function(e){a("next",e,u,l)}),(function(e){a("throw",e,u,l)})):t.resolve(v).then((function(e){c.value=e,u(c)}),(function(e){return a("throw",e,u,l)}))}l(i.arg)}var n;this._invoke=function(e,r){function o(){return new t((function(t,n){a(e,r,t,n)}))}return n=n?n.then(o,o):o()}}function k(e,a){var r=e.iterator[a.method];if(r===t){if(a.delegate=null,"throw"===a.method){if(e.iterator.return&&(a.method="return",a.arg=t,k(e,a),"throw"===a.method))return p;a.method="throw",a.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=s(r,e.iterator,a.arg);if("throw"===n.type)return a.method="throw",a.arg=n.arg,a.delegate=null,p;var o=n.arg;return o?o.done?(a[e.resultName]=o.value,a.next=e.nextLoc,"return"!==a.method&&(a.method="next",a.arg=t),a.delegate=null,p):o:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,p)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function j(e){if(e){var a=e[o];if(a)return a.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,u=function a(){for(;++n<e.length;)if(r.call(e,n))return a.value=e[n],a.done=!1,a;return a.value=t,a.done=!0,a};return u.next=u}}return{next:B}}function B(){return{value:t,done:!0}}return V.prototype=y,i(x,"constructor",y),i(y,"constructor",V),V.displayName=i(y,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===V||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,i(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},e.awrap=function(e){return{__await:e}},L(N.prototype),i(N.prototype,u,(function(){return this})),e.AsyncIterator=N,e.async=function(t,a,r,n,o){void 0===o&&(o=Promise);var u=new N(c(t,a,r,n),o);return e.isGeneratorFunction(a)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},L(x),i(x,l,"Generator"),i(x,o,(function(){return this})),i(x,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var a in e)t.push(a);return t.reverse(),function a(){for(;t.length;){var r=t.pop();if(r in e)return a.value=r,a.done=!1,a}return a.done=!0,a}},e.values=j,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var a in this)"t"===a.charAt(0)&&r.call(this,a)&&!isNaN(+a.slice(1))&&(this[a]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var a=this;function n(r,n){return l.type="throw",l.arg=e,a.next=r,n&&(a.method="next",a.arg=t),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var u=this.tryEntries[o],l=u.completion;if("root"===u.tryLoc)return n("end");if(u.tryLoc<=this.prev){var i=r.call(u,"catchLoc"),c=r.call(u,"finallyLoc");if(i&&c){if(this.prev<u.catchLoc)return n(u.catchLoc,!0);if(this.prev<u.finallyLoc)return n(u.finallyLoc)}else if(i){if(this.prev<u.catchLoc)return n(u.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return n(u.finallyLoc)}}}},abrupt:function(e,t){for(var a=this.tryEntries.length-1;a>=0;--a){var n=this.tryEntries[a];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=e,u.arg=t,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(u)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.finallyLoc===e)return this.complete(a.completion,a.afterLoc),C(a),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.tryLoc===e){var r=a.completion;if("throw"===r.type){var n=r.arg;C(a)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,a,r){return this.delegate={iterator:j(e),resultName:a,nextLoc:r},"next"===this.method&&(this.arg=t),p}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},8133:e=>{"use strict";e.exports=a},5537:e=>{"use strict";e.exports=r},4212:t=>{"use strict";t.exports=e},748:e=>{"use strict";e.exports=t}},o={};function u(e){var t=o[e];if(void 0!==t)return t.exports;var a=o[e]={exports:{}};return n[e](a,a.exports,u),a.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var a in t)u.o(t,a)&&!u.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return(()=>{"use strict";u.r(l),u.d(l,{default:()=>f});var e=u(4212),t=u(748),a=u(7162),r=u.n(a);Object.create,Object.create;var n=u(8133),o=u.n(n),i=u(5537),c=u.n(i);const s=(0,t.defineComponent)({name:"SliderButton",props:{modelValue:{type:Number,default:0},params:{type:Object,default:function(){return{}}}},emits:["emitChange","resetSize","update:modelValue"],setup:function(a,r){var n=r.emit,o=(0,t.ref)(!1),u=(0,t.ref)(!1),l=(0,t.ref)(0),i=(0,t.ref)(0),s=(0,t.ref)(0),d=(0,t.ref)(null),f=(0,t.ref)(a.modelValue),p=(0,t.ref)(0),h=(0,t.ref)(0),V=(0,t.ref)(!1),y=(0,t.ref)(null),b=(0,t.computed)((function(){var t,r,n="";if(null===(t=a.params.customContent)||void 0===t?void 0:t[a.modelValue]){var o=a.params.customContent[a.modelValue];n=o.tip||o.label||""}var u=a.params.vertical?e.PlacementEnum.RIGHT:e.PlacementEnum.TOP;return(null===(r=a.params)||void 0===r?void 0:r.showTip)?{content:a.params.formatterTipLabel("".concat(n||(null==a?void 0:a.modelValue)||"0")),placement:u}:{content:"",placement:u}})),g=(0,t.computed)((function(){return"".concat((a.modelValue-a.params.minValue)/(a.params.maxValue-a.params.minValue)*100,"%")})),w=(0,t.computed)((function(){return a.params.vertical?{bottom:g.value}:{left:g.value}})),x=(0,t.computed)((function(){return a.params.formatterButtonLabel(a.modelValue)})),L=function(e){a.params.disable||(e.preventDefault(),N(e),v(window,"mousemove",k),v(window,"touchmove",k),v(window,"mouseup",E),v(window,"touchend",E))},N=function(e){o.value=!0,u.value=!0,a.params.vertical?l.value=e.clientY:i.value=e.clientX,s.value=parseFloat(g.value),d.value=s.value},k=function(e){if(o.value){u.value=!1,n("resetSize");var t=0;a.params.vertical?(p.value=e.clientY,t=(l.value-p.value)/a.params.sliderSize*100):(h.value=e.clientX,t=(h.value-i.value)/a.params.sliderSize*100),d.value=s.value+t,C(d.value)}},E=function e(){V.value=!1,o.value&&(setTimeout((function(){o.value=!1,u.value||(C(d.value),n("emitChange"))}),0),m(window,"mousemove",k),m(window,"touchmove",k),m(window,"mouseup",e),m(window,"touchend",e))},C=function(e){if(null!==e&&!isNaN(e)){e<0?d.value=0:e>100&&(d.value=100);var t=100/((a.params.maxValue-a.params.minValue)/a.params.step),r=Math.round(e/t)*t*(a.params.maxValue-a.params.minValue)*.01+a.params.minValue;r=parseFloat(r.toFixed(a.params.precision)),n("update:modelValue",r),o.value||a.modelValue===f.value||(f.value=a.modelValue)}};return{renderDom:function(){return(0,t.createVNode)("div",{class:["bk-slider-button",a.params.vertical?"vertical":"horizontal",{grabbing:o.value}],ref:y,tabindex:"0",style:w.value,onClick:function(e){return e.stopPropagation()},onMousedown:L},[Boolean(b.value.content)?(0,t.createVNode)(c(),{content:b.value.content,theme:"dark",placement:b.value.placement,boundary:document.body},{default:function(){return[(0,t.createVNode)("div",{class:["slider-button",{"slider-button-disable":a.params.disable}]},null)]}}):(0,t.createVNode)("div",{class:["slider-button",{"slider-button-disable":a.params.disable}]},null),a.params.showButtonLabel&&!a.params.showIntervalLabel?(0,t.createVNode)("div",{class:["slider-button-label",a.params.vertical?"vertical":"horizontal"]},[x.value]):void 0])},setPosition:C,tip:b}},render:function(){return this.renderDom()}});var v=function(e,t,a){e&&t&&a&&e.addEventListener(t,a,!1)},m=function(e,t,a){e&&t&&a&&e.removeEventListener(t,a,!1)};const d=(0,t.defineComponent)({name:"Slider",props:{modelValue:e.PropTypes.oneOfType([e.PropTypes.array,e.PropTypes.number]),extCls:{type:String,default:""},vertical:{type:Boolean,default:!1},height:{type:String,default:"200px"},disable:{type:Boolean,default:!1},showTip:{type:Boolean,default:!1},maxValue:{type:[Number],default:100},minValue:{type:[Number],default:0},step:{type:[Number],default:1},range:{type:Boolean,default:!1},showInterval:{type:Boolean,default:!1},showIntervalLabel:{type:Boolean,default:!1},showButtonLabel:{type:Boolean,default:!1},showBetweenLabel:{type:Boolean,default:!1},showInput:{type:Boolean,default:!1},customContent:{type:Object,default:null},formatterLabel:{type:Function,default:function(e){return e}},formatterButtonLabel:{type:Function,default:function(e){return e}},formatterTipLabel:{type:Function,default:function(e){return e}}},emits:["update:modelValue","change"],setup:function(e,a){var n=this,u=a.slots,l=a.emit,i=(0,t.ref)(1),c=(0,t.ref)(null),m=(0,t.ref)(null),d=(0,t.ref)(null),f=(0,t.ref)(0),p=(0,t.ref)(0),h=(0,t.ref)(null),V=(0,t.ref)(null),y=(0,t.ref)(null),b=(0,t.ref)(null),g=(0,t.computed)((function(){var t=[e.minValue,e.maxValue,e.step].map((function(e){var t="".concat(e).split(".")[1];return t?t.length:0}));return Math.max.apply(null,t)})),w=(0,t.computed)((function(){return Math.min(c.value,m.value)})),x=(0,t.computed)((function(){return Math.max(c.value,m.value)})),L=(0,t.computed)((function(){return e.range?"".concat(100*(x.value-w.value)/(e.maxValue-e.minValue),"%"):"".concat(100*(c.value-e.minValue)/(e.maxValue-e.minValue),"%")})),N=(0,t.computed)((function(){return e.range?"".concat(100*(w.value-e.minValue)/(e.maxValue-e.minValue),"%"):"0%"})),k=(0,t.computed)((function(){return e.vertical?{height:L.value,bottom:N.value}:{width:L.value,left:N.value}})),E=(0,t.computed)((function(){if(!e.showInterval||e.minValue>e.maxValue)return[];if(0===e.step)return console.warn("WARNNING:step should not be 0"),[];for(var t=(e.maxValue-e.minValue)/e.step,a=100*e.step/(e.maxValue-e.minValue),r=[],n=1;n<t;n++)r.push(n*a);return e.range?r.filter((function(t){return t<100*(w.value-e.minValue)/(e.maxValue-e.minValue)||t>100*(x.value-e.minValue)/(e.maxValue-e.minValue)})):r.filter((function(t){return t>100*(c.value-e.minValue)/(e.maxValue-e.minValue)}))})),C=(0,t.computed)((function(){return e.vertical?{height:e.height,width:"4px"}:{}})),T=(0,t.computed)((function(){if(!e.showIntervalLabel)return[];if(0===e.step)return console.warn("WARNNING:step should not be 0"),[];for(var t=100*e.step/(e.maxValue-e.minValue),a=[],r=e.minValue,n=0;r<=e.maxValue;r+=e.step,n++){var o={stepWidth:n*t,stepLabel:e.formatterLabel(r)};a.push(o)}return a})),j=(0,t.computed)((function(){return Array.isArray(e.modelValue)})),B=(0,t.computed)((function(){return e.customContent?Object.keys(e.customContent).sort((function(e,t){return Number(e)-Number(t)})).filter((function(t){return Number(t)>=e.minValue&&Number(t)<=e.maxValue})).map((function(t){var a=e.customContent[t].tip,r=e.customContent[t].label;return{tip:a||r||"",label:r||"",percent:(Number(t)-e.minValue)/(e.maxValue-e.minValue)*100}})):[]})),O=(0,t.computed)((function(){return{vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:g.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:i.value,formatterTipLabel:e.formatterTipLabel}}));(0,t.watch)((function(){return e.modelValue}),(function(){_()})),(0,t.watch)((function(){return c.value}),(function(t){e.range?l("update:modelValue",[w.value,x.value]):l("update:modelValue",t),f.value=t})),(0,t.watch)((function(){return m.value}),(function(e){l("update:modelValue",[w.value,x.value]),p.value=e})),(0,t.onMounted)((function(){e.range?(Array.isArray(e.modelValue)?(c.value=Math.max(e.minValue,Number(e.modelValue[0])),m.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(c.value=e.minValue,m.value=e.maxValue),d.value=[c.value,m.value]):("number"!=typeof e.modelValue||isNaN(e.modelValue)?c.value=e.minValue:c.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),d.value=c.value),P(),v(window,"resize",P())}));var P=function(){h.value&&(i.value=h.value["client".concat(e.vertical?"Height":"Width")])},S=function(t){var a,r;if(t.stopPropagation(),!e.disable){if(P(),e.vertical){var n=null===(a=h.value)||void 0===a?void 0:a.getBoundingClientRect().bottom;F((n-t.clientY)/i.value*100)}else{var o=null===(r=h.value)||void 0===r?void 0:r.getBoundingClientRect().left;F((t.clientX-o)/i.value*100)}M()}},I=function(){return e.range?![w.value,x.value].every((function(e,t){return e===d.value[t]})):e.modelValue!==d.value},_=function(){if(e.minValue>e.maxValue)console.error("min should not be greater than max.");else{var t=e.modelValue;e.range&&Array.isArray(t)?t[1]<e.minValue?l("update:modelValue",[e.minValue,e.minValue]):t[0]>e.maxValue?l("update:modelValue",[e.maxValue,e.maxValue]):t[0]<e.minValue?l("update:modelValue",[e.minValue,t[1]]):t[1]>e.maxValue?l("update:modelValue",[t[0],e.maxValue]):(c.value=Number(t[0]),m.value=Number(t[1]),I()&&(d.value=t.slice())):e.range||"number"!=typeof t||isNaN(t)||(t<e.minValue?l("update:modelValue",e.minValue):t>e.maxValue?l("update:modelValue",e.maxValue):(c.value=t,I()&&(d.value=t)))}},M=function(){return a=n,o=void 0,u=void 0,i=r().mark((function a(){return r().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,t.nextTick)();case 2:l("change",e.range?[w.value,x.value]:e.modelValue);case 3:case"end":return a.stop()}}),a)})),new(u||(u=Promise))((function(e,t){function r(e){try{l(i.next(e))}catch(e){t(e)}}function n(e){try{l(i.throw(e))}catch(e){t(e)}}function l(t){var a;t.done?e(t.value):(a=t.value,a instanceof u?a:new u((function(e){e(a)}))).then(r,n)}l((i=i.apply(a,o||[])).next())}));var a,o,u,i},z=function(t){return e.vertical?{bottom:"".concat(t,"%")}:{left:"".concat(t,"%")}},F=function(t){if(e.range){var a=e.minValue+t*(e.maxValue-e.minValue)/100;Math.abs(w.value-a)<Math.abs(x.value-a)?b.value=c.value<m.value?V.value:y.value:b.value=c.value>m.value?V.value:y.value,b.value.setPosition(t)}else V.value.setPosition(t)},G=function(t){if(""!==t){var a=parseFloat(t);a<e.minValue?(f.value=e.minValue,c.value=e.minValue):a>e.maxValue?(f.value=e.maxValue,c.value=e.maxValue):c.value=a}},A=function(t){if(""!==t&&"number"!=typeof t){var a=parseFloat(t);a<e.minValue?(p.value=e.minValue,m.value=e.minValue):a>e.maxValue?(p.value=e.maxValue,m.value=e.maxValue):m.value=a}},R=function(t){var a;return a="start"===t?e.vertical?e.maxValue:e.minValue:e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[c.value,m.value].includes(a)?"0":"1"};return{renderDom:function(){var a,r;return(0,t.createVNode)("div",{class:["bk-slider",e.extCls]},[null===(a=u.start)||void 0===a?void 0:a.call(u),(0,t.createVNode)("div",{class:"bk-slider-runway",ref:h,style:C.value,onClick:S},[(0,t.createVNode)("div",{class:["bk-slider-bar",e.vertical?"vertical":"horizontal",{disable:e.disable}],style:k.value},null),e.showInterval?E.value.map((function(a,r){return(0,t.createVNode)("div",{key:r,class:["bk-slider-interval",{vertical:e.vertical}],style:z(a)},null)})):void 0,e.customContent?B.value.map((function(a,r){return(0,t.createVNode)("div",{key:r,class:["bk-slider-interval",{vertical:e.vertical}],style:z(a.percent)},null)})):void 0,e.showBetweenLabel||e.showIntervalLabel||e.customContent?(0,t.createVNode)("div",{class:["bk-slider-labels",e.vertical?"vertical":"horizontal"]},[e.showBetweenLabel?[(0,t.createVNode)("div",{class:"label-start",style:[{opacity:R("start")}]},[e.formatterLabel(e.minValue)]),(0,t.createVNode)("div",{class:"label-end",style:[{opacity:R("end")}]},[e.formatterLabel(e.maxValue)])]:e.showIntervalLabel?T.value.map((function(a,r){return(0,t.createVNode)("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:r,style:z(a.stepWidth)},[a.stepLabel])})):e.customContent?B.value.map((function(a,r){return(0,t.createVNode)("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:r,style:z(a.percent)},[a.label])})):void 0]):void 0,(0,t.createVNode)(s,{modelValue:c.value,"onUpdate:modelValue":function(e){return c.value=e},ref:V,params:O.value,onEmitChange:M,onResetSize:P},null),e.range?(0,t.createVNode)(s,{modelValue:m.value,"onUpdate:modelValue":function(e){return m.value=e},ref:y,params:O.value,onEmitChange:M,onResetSize:P},null):void 0]),e.showInput&&!e.vertical?(0,t.createVNode)("div",{class:"bk-slider-input"},[(0,t.createVNode)("div",{class:"input-item"},[(0,t.createVNode)(o(),{type:"number",modelValue:f.value,max:e.maxValue,min:e.minValue,onChange:G},null)]),j.value&&m.value?[(0,t.createVNode)("div",{class:"input-center"},[(0,t.createTextVNode)("~")]),(0,t.createVNode)("div",{class:"input-item"},[(0,t.createVNode)(o(),{type:"number",modelValue:p.value,max:e.maxValue,min:e.minValue,onChange:A},null)])]:void 0]):void 0,null===(r=u.end)||void 0===r?void 0:r.call(u)])}}},render:function(){return this.renderDom()}}),f=(0,e.withInstall)(d)})(),l})()));
|
@@ -24,6 +24,7 @@
|
|
24
24
|
* IN THE SOFTWARE.
|
25
25
|
*/
|
26
26
|
import { PropType } from 'vue';
|
27
|
+
import { PlacementEnum } from '../shared';
|
27
28
|
interface Params {
|
28
29
|
vertical: boolean;
|
29
30
|
showTip: boolean;
|
@@ -58,7 +59,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
58
59
|
setPosition: (position: number) => void;
|
59
60
|
tip: import("vue").ComputedRef<{
|
60
61
|
content: any;
|
61
|
-
placement:
|
62
|
+
placement: PlacementEnum;
|
62
63
|
}>;
|
63
64
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "emitChange" | "resetSize")[], "update:modelValue" | "emitChange" | "resetSize", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
64
65
|
modelValue: {
|
package/lib/slider/slider.d.ts
CHANGED
@@ -180,10 +180,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
180
180
|
"onUpdate:modelValue"?: (...args: any[]) => any;
|
181
181
|
}, {
|
182
182
|
height: string;
|
183
|
-
step: number;
|
184
|
-
vertical: boolean;
|
185
183
|
extCls: string;
|
184
|
+
vertical: boolean;
|
186
185
|
range: boolean;
|
186
|
+
step: number;
|
187
|
+
showInput: boolean;
|
188
|
+
customContent: Record<string, any>;
|
187
189
|
disable: boolean;
|
188
190
|
showTip: boolean;
|
189
191
|
maxValue: number;
|
@@ -192,8 +194,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
192
194
|
showIntervalLabel: boolean;
|
193
195
|
showButtonLabel: boolean;
|
194
196
|
showBetweenLabel: boolean;
|
195
|
-
showInput: boolean;
|
196
|
-
customContent: Record<string, any>;
|
197
197
|
formatterLabel: Function;
|
198
198
|
formatterButtonLabel: Function;
|
199
199
|
formatterTipLabel: Function;
|
@@ -9,6 +9,7 @@
|
|
9
9
|
--gray-color: #979ba5;
|
10
10
|
--light-gray: #c4c6cc;
|
11
11
|
--white-color: white;
|
12
|
+
--whitesmoke-color: #fafbfd;
|
12
13
|
--disable-color: #dcdee5;
|
13
14
|
--font-size-base: 12px;
|
14
15
|
--font-size-medium: 14px;
|
@@ -18,10 +19,11 @@
|
|
18
19
|
--line-height-large: 18px;
|
19
20
|
--component-size-small: 26px;
|
20
21
|
--component-size-base: 32px;
|
21
|
-
--component-size-large:
|
22
|
+
--component-size-large: 40px;
|
22
23
|
--border-width-base: 1px;
|
23
24
|
--border-style-base: solid;
|
24
25
|
--border-radius-base: 2px;
|
26
|
+
--border-style-color: var(--light-gray);
|
25
27
|
--input-disabled-bg: #fafbfd;
|
26
28
|
--input-disabled-border: var(--disable-color);
|
27
29
|
--input-height-base: var(--component-size-base);
|
@@ -31,8 +33,9 @@
|
|
31
33
|
--input-broder-radius: 3px;
|
32
34
|
--input-shadow-color: #a3c5fd;
|
33
35
|
--input-horizontal-padding: 10px;
|
34
|
-
--input-block-color: #
|
35
|
-
--input-
|
36
|
+
--input-block-color: #f5f7fa;
|
37
|
+
--input-block-hover-color: #eaebf0;
|
38
|
+
--input-icon-size: var(--font-size-medium);
|
36
39
|
--input-maxlength-color: #979ba5;
|
37
40
|
--button-primary-hover-color: #5594fa;
|
38
41
|
--button-danger-hover-color: #ff5656;
|
@@ -43,6 +46,17 @@
|
|
43
46
|
--button-danger-active-color: #db2626;
|
44
47
|
--button-success-active-color: #1ab943;
|
45
48
|
--button-warning-active-color: #eb9000;
|
49
|
+
--button-selected-bg-color: #e1ecff;
|
50
|
+
--button-disabled-selected-bg-color: #f0f1f5;
|
51
|
+
--radio-font-color: #63656e;
|
52
|
+
--radio-active-color: #5594fa;
|
53
|
+
--radio-hover-border-color: #979ba5;
|
54
|
+
--radio-disabled-border: #dcdee5;
|
55
|
+
--radio-disabled-font-color: #c4c6cc;
|
56
|
+
--radio-disabled-checked-bg: #a3c5fd;
|
57
|
+
--radio-button-checked-bg: #e1ecff;
|
58
|
+
--radio-button-disabled-checked-bg: #fafbfd;
|
59
|
+
--checkbox-disabled-checked-bg: #a3c5fd;
|
46
60
|
--fixed-navbar-background: #fff;
|
47
61
|
--fixed-navbar-boxshadow-color: rgba(0, 0, 0, 0.1);
|
48
62
|
--switch-default-color: #fff;
|
@@ -63,12 +77,16 @@
|
|
63
77
|
--message-color: var(--default-color);
|
64
78
|
--message-primary-bg-color: #f0f8ff;
|
65
79
|
--message-primary-border-color: #e1ecff;
|
80
|
+
--message-primary-shadow-color: #e1e8f4;
|
66
81
|
--message-warning-bg-color: #fff4e2;
|
67
82
|
--message-warning-border-color: #ffe8c3;
|
83
|
+
--message-warning-shadow-color: #ede6db;
|
68
84
|
--message-success-bg-color: #f2fff4;
|
69
85
|
--message-success-border-color: #dcffe2;
|
86
|
+
--message-success-shadow-color: #cef0d7;
|
70
87
|
--message-danger-bg-color: #ffeded;
|
71
88
|
--message-danger-border-color: #ffdddd;
|
89
|
+
--message-danger-shadow-color: #f6dada;
|
72
90
|
--slider-default-bg: #dcdee5;
|
73
91
|
--slider-disable-bar-bg: #979ba5;
|
74
92
|
--menu-bg-color: #182132;
|
@@ -88,9 +106,19 @@
|
|
88
106
|
--table-border-color: #dcdee5;
|
89
107
|
--table-head-bg-color: #fafbfd;
|
90
108
|
--table-head-font-color: #313238;
|
91
|
-
--table-body-font-color: #
|
109
|
+
--table-body-font-color: #63656E;
|
92
110
|
--table-row-hover-bg-color: #f5f7fa;
|
93
111
|
--table-row-active-bg-color: #f0f1f5;
|
112
|
+
--cascader-panel-border-color: #dcdee5;
|
113
|
+
--cascader-panel-hover: #f5f7fa;
|
114
|
+
--cascader-panel-active: #e1ecff;
|
115
|
+
--cascader-panel-disabled-bg: #fff;
|
116
|
+
--search-select-focus-border-color: var(--primary-color);
|
117
|
+
--search-select-focus-color: #3c96ff;
|
118
|
+
--search-select-font-color: var(--default-color);
|
119
|
+
--search-select-placeholder-color: var(--light-gray);
|
120
|
+
--search-select-message-color: var(--danger-color);
|
121
|
+
--search-select-menu-border-color: var(--disable-color);
|
94
122
|
}
|
95
123
|
.bk-slider {
|
96
124
|
display: flex;
|