bkui-vue 0.0.2-beta.8 → 0.0.2-beta.80
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/dist/index.cjs.js +70 -62
- package/dist/index.esm.js +15668 -15161
- package/dist/index.umd.js +73 -65
- package/dist/locale/en.esm.js +1 -1
- package/dist/locale/en.esm.js.map +1 -1
- package/dist/locale/en.umd.js +1 -1
- package/dist/locale/en.umd.js.map +1 -1
- package/dist/locale/zh-cn.esm.js +1 -1
- package/dist/locale/zh-cn.esm.js.map +1 -1
- package/dist/locale/zh-cn.umd.js +1 -1
- package/dist/locale/zh-cn.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/affix/affix.d.ts +1 -1
- package/lib/affix/index.d.ts +4 -4
- package/lib/affix/index.js +1 -1
- package/lib/alert/alert.css +7 -0
- package/lib/alert/alert.d.ts +5 -5
- package/lib/alert/alert.less +16 -6
- package/lib/alert/alert.variable.css +7 -0
- package/lib/alert/index.d.ts +10 -10
- package/lib/alert/index.js +1 -1
- package/lib/animate-number/index.d.ts +1 -1
- package/lib/animate-number/index.js +1 -1
- package/lib/backtop/backtop.css +8 -8
- package/lib/backtop/backtop.less +3 -1
- package/lib/backtop/backtop.variable.css +11 -11
- package/lib/backtop/index.d.ts +1 -1
- package/lib/backtop/index.js +1 -1
- package/lib/badge/badge.d.ts +2 -2
- package/lib/badge/index.d.ts +7 -7
- package/lib/badge/index.js +1 -1
- package/lib/breadcrumb/breadcrumb.css +4 -4
- package/lib/breadcrumb/breadcrumb.variable.css +4 -4
- package/lib/breadcrumb/index.d.ts +2 -2
- package/lib/breadcrumb/index.js +1 -1
- package/lib/button/button.css +20 -0
- package/lib/button/button.less +105 -94
- package/lib/button/button.variable.css +20 -0
- package/lib/button/index.d.ts +2 -2
- package/lib/button/index.js +1 -1
- package/lib/card/card.css +4 -4
- package/lib/card/card.d.ts +1 -1
- package/lib/card/card.variable.css +4 -4
- package/lib/card/index.d.ts +4 -4
- package/lib/card/index.js +1 -1
- package/lib/cascader/cascader.css +4 -4
- package/lib/cascader/cascader.d.ts +1 -0
- package/lib/cascader/cascader.variable.css +4 -4
- package/lib/cascader/index.d.ts +5 -2
- package/lib/cascader/index.js +1 -1
- package/lib/cascader/interface.d.ts +1 -1
- package/lib/checkbox/checkbox-group.d.ts +6 -3
- package/lib/checkbox/checkbox.d.ts +4 -4
- package/lib/checkbox/index.d.ts +22 -19
- package/lib/checkbox/index.js +1 -1
- package/lib/code-diff/index.d.ts +1 -1
- package/lib/code-diff/index.js +1 -1
- package/lib/collapse/index.d.ts +2 -2
- package/lib/collapse/index.js +1 -1
- package/lib/collapse-transition/index.d.ts +128 -2
- package/lib/collapse-transition/index.js +1 -1
- package/lib/color-picker/color-picker.d.ts +16 -0
- package/lib/color-picker/components/recommend-colors.d.ts +16 -0
- package/lib/color-picker/index.d.ts +19 -1
- package/lib/color-picker/index.js +1 -1
- package/lib/components.d.ts +1 -1
- package/lib/components.js +1 -1
- package/lib/config-provider/config-provider.d.ts +3 -0
- package/lib/config-provider/index.d.ts +5 -1
- package/lib/config-provider/index.js +1 -1
- package/lib/config-provider/token.d.ts +1 -0
- package/lib/config-provider/use-global-config.d.ts +2 -0
- package/lib/config-provider/use-prefix.d.ts +2 -0
- package/lib/container/container.css +4 -4
- package/lib/container/container.variable.css +4 -4
- package/lib/container/index.d.ts +2 -2
- package/lib/container/index.js +1 -1
- package/lib/date-picker/date-picker.d.ts +4 -2
- package/lib/date-picker/index.d.ts +15 -8
- package/lib/date-picker/index.js +1 -1
- package/lib/date-picker/panel/date-range.d.ts +2 -1
- package/lib/date-picker/time-picker.d.ts +1 -1
- package/lib/dialog/dialog.css +2 -0
- package/lib/dialog/dialog.variable.css +2 -0
- package/lib/dialog/index.d.ts +1 -1
- package/lib/dialog/index.js +1 -1
- package/lib/directives/index.js +1 -1
- package/lib/directives/tooltips.d.ts +3 -2
- package/lib/dist.index.js +1 -1
- package/lib/divider/index.d.ts +1 -1
- package/lib/divider/index.js +1 -1
- package/lib/dropdown/dropdown.css +1 -0
- package/lib/dropdown/dropdown.d.ts +1 -1
- package/lib/dropdown/dropdown.variable.css +1 -0
- package/lib/dropdown/index.d.ts +7 -7
- package/lib/dropdown/index.js +1 -1
- package/lib/exception/index.d.ts +2 -2
- package/lib/exception/index.js +1 -1
- package/lib/fixed-navbar/index.d.ts +1 -1
- package/lib/fixed-navbar/index.js +1 -1
- package/lib/form/index.d.ts +3 -3
- package/lib/form/index.js +1 -1
- package/lib/hooks.d.ts +1 -1
- package/lib/hooks.js +1 -1
- package/lib/icon/angle-double-down-line.js +1 -1
- package/lib/icon/angle-double-left-line.js +1 -1
- package/lib/icon/angle-double-left.js +1 -1
- package/lib/icon/angle-double-right-line.js +1 -1
- package/lib/icon/angle-double-right.js +1 -1
- package/lib/icon/angle-double-up-line.js +1 -1
- package/lib/icon/angle-down-fill.js +1 -1
- package/lib/icon/angle-down-line.js +1 -1
- package/lib/icon/angle-down.js +1 -1
- package/lib/icon/angle-left.js +1 -1
- package/lib/icon/angle-right.js +1 -1
- package/lib/icon/angle-up-fill.js +1 -1
- package/lib/icon/angle-up.js +1 -1
- package/lib/icon/archive-fill.js +1 -1
- package/lib/icon/arrows-left.js +1 -1
- package/lib/icon/arrows-right.js +1 -1
- package/lib/icon/assistant.d.ts +4 -0
- package/lib/icon/assistant.js +1 -0
- package/lib/icon/audio-fill.js +1 -1
- package/lib/icon/bk.js +1 -1
- package/lib/icon/circle.js +1 -1
- package/lib/icon/close-line.js +1 -1
- package/lib/icon/close.js +1 -1
- package/lib/icon/code.js +1 -1
- package/lib/icon/cog-shape.js +1 -1
- package/lib/icon/collapse-left.js +1 -1
- package/lib/icon/copy-shape.js +1 -1
- package/lib/icon/copy.js +1 -1
- package/lib/icon/data-shape.js +1 -1
- package/lib/icon/del.js +1 -1
- package/lib/icon/doc-fill.js +1 -1
- package/lib/icon/done.js +1 -1
- package/lib/icon/down-shape.js +1 -1
- package/lib/icon/down-small.js +1 -1
- package/lib/icon/edit-line.js +1 -1
- package/lib/icon/ellipsis.js +1 -1
- package/lib/icon/enlarge-line.js +1 -1
- package/lib/icon/error.js +1 -1
- package/lib/icon/excel-fill.js +1 -1
- package/lib/icon/exclamation-circle-shape.js +1 -1
- package/lib/icon/eye.js +1 -1
- package/lib/icon/filliscreen-line.js +1 -1
- package/lib/icon/fix-line.js +1 -1
- package/lib/icon/fix-shape.js +1 -1
- package/lib/icon/folder-open.js +1 -1
- package/lib/icon/folder-shape-open.js +1 -1
- package/lib/icon/folder-shape.js +1 -1
- package/lib/icon/folder.js +1 -1
- package/lib/icon/funnel.js +1 -1
- package/lib/icon/help-document-fill.js +1 -1
- package/lib/icon/help-fill.js +1 -1
- package/lib/icon/help.js +1 -1
- package/lib/icon/image-fill.js +1 -1
- package/lib/icon/img-error.js +1 -1
- package/lib/icon/img-placehoulder.js +1 -1
- package/lib/icon/index.d.ts +1 -0
- 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.js +1 -1
- package/lib/icon/narrow-line.js +1 -1
- package/lib/icon/original.js +1 -1
- package/lib/icon/pdf-fill.js +1 -1
- package/lib/icon/play-shape.js +1 -1
- package/lib/icon/plus.js +1 -1
- package/lib/icon/ppt-fill.js +1 -1
- package/lib/icon/qq.js +1 -1
- package/lib/icon/right-shape.js +1 -1
- package/lib/icon/right-turn-line.js +1 -1
- package/lib/icon/search.js +1 -1
- package/lib/icon/share.js +1 -1
- package/lib/icon/spinner.js +1 -1
- package/lib/icon/success.js +1 -1
- package/lib/icon/switcher-loading.js +1 -1
- package/lib/icon/text-file.js +1 -1
- package/lib/icon/text-fill.js +1 -1
- package/lib/icon/transfer.js +1 -1
- package/lib/icon/tree-application-shape.js +1 -1
- package/lib/icon/unfull-screen.js +1 -1
- package/lib/icon/unvisible.js +1 -1
- package/lib/icon/up-shape.js +1 -1
- package/lib/icon/upload.js +1 -1
- package/lib/icon/video-fill.js +1 -1
- package/lib/icon/warn.js +1 -1
- package/lib/icon/weixin-pro.js +1 -1
- package/lib/icon/weixin.js +1 -1
- package/lib/image/index.d.ts +1 -1
- package/lib/image/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/info-box/index.js +1 -1
- package/lib/info-box/info-box.css +2 -0
- package/lib/info-box/info-box.less +2 -1
- package/lib/info-box/info-box.variable.css +2 -0
- package/lib/input/index.d.ts +146 -50
- package/lib/input/index.js +2 -1
- package/lib/input/index.js.LICENSE.txt +1 -0
- package/lib/input/input.css +38 -10
- package/lib/input/input.d.ts +100 -11
- package/lib/input/input.less +53 -14
- package/lib/input/input.variable.css +38 -10
- package/lib/input/util.d.ts +6 -0
- package/lib/link/index.d.ts +4 -4
- package/lib/link/index.js +1 -1
- package/lib/link/link.d.ts +1 -1
- package/lib/loading/index.d.ts +2 -2
- package/lib/loading/index.js +1 -1
- package/lib/loading/loading.css +4 -4
- package/lib/loading/loading.variable.css +4 -4
- package/lib/locale/index.js +1 -1
- package/lib/locale/lang/en.d.ts +1 -0
- package/lib/menu/index.d.ts +2 -2
- package/lib/menu/index.js +1 -1
- package/lib/menu/menu.css +4 -4
- package/lib/menu/menu.variable.css +4 -4
- package/lib/message/index.js +1 -1
- package/lib/message/message.css +33 -9
- package/lib/message/message.less +78 -54
- package/lib/message/message.variable.css +33 -9
- package/lib/message/messageConstructor.d.ts +30 -8
- package/lib/modal/index.d.ts +2 -2
- package/lib/modal/index.js +1 -1
- package/lib/modal/modal.css +2 -0
- package/lib/modal/modal.variable.css +2 -0
- package/lib/navigation/index.d.ts +4 -1
- package/lib/navigation/index.js +1 -1
- package/lib/navigation/navigation.d.ts +1 -0
- package/lib/notify/index.js +1 -1
- package/lib/notify/notifyConstructor.d.ts +1 -1
- package/lib/overflow-title/components/overflow-title.d.ts +257 -1
- package/lib/overflow-title/index.d.ts +387 -2
- package/lib/overflow-title/index.js +1 -1
- package/lib/overflow-title/props.d.ts +129 -0
- package/lib/pagination/index.d.ts +2 -2
- package/lib/pagination/index.js +1 -1
- package/lib/plugin-popover/index.js +1 -1
- package/lib/plugins/index.js +1 -1
- package/lib/pop-confirm/index.d.ts +1 -1
- package/lib/pop-confirm/index.js +1 -1
- package/lib/popover/const.d.ts +22 -9
- package/lib/popover/content.d.ts +33 -0
- package/lib/popover/index.d.ts +154 -61
- package/lib/popover/index.js +1 -1
- package/lib/popover/popover.css +1 -0
- package/lib/popover/popover.d.ts +64 -23
- package/lib/popover/popover.less +3 -2
- package/lib/popover/popover.variable.css +1 -0
- package/lib/popover/props.d.ts +29 -4
- package/lib/popover/use-floating.d.ts +2 -2
- package/lib/popover/use-popover-init.d.ts +2 -1
- package/lib/popover2/index.d.ts +1 -1
- package/lib/popover2/index.js +1 -1
- package/lib/preset.d.ts +2 -0
- package/lib/preset.js +1 -1
- package/lib/process/index.d.ts +1 -1
- package/lib/process/index.js +1 -1
- package/lib/progress/index.d.ts +1 -1
- package/lib/progress/index.js +1 -1
- package/lib/progress/progress.css +4 -4
- package/lib/progress/progress.variable.css +4 -4
- package/lib/radio/index.d.ts +23 -23
- package/lib/radio/index.js +1 -1
- package/lib/radio/radio-button.d.ts +4 -4
- package/lib/radio/radio-group.d.ts +4 -4
- package/lib/radio/radio.d.ts +4 -4
- package/lib/rate/index.d.ts +8 -4
- package/lib/rate/index.js +1 -1
- package/lib/rate/rate.d.ts +2 -1
- package/lib/resize-layout/index.d.ts +4 -4
- package/lib/resize-layout/index.js +1 -1
- package/lib/resize-layout/resize-layout.css +12 -0
- package/lib/resize-layout/resize-layout.d.ts +1 -1
- package/lib/resize-layout/resize-layout.less +12 -0
- package/lib/resize-layout/resize-layout.variable.css +12 -0
- package/lib/search-select/index.d.ts +62 -29
- package/lib/search-select/index.js +1 -1
- package/lib/search-select/input.d.ts +5 -1
- package/lib/search-select/menu.d.ts +33 -2
- package/lib/search-select/search-select.css +37 -17
- package/lib/search-select/search-select.d.ts +23 -20
- package/lib/search-select/search-select.less +34 -11
- package/lib/search-select/search-select.variable.css +37 -17
- package/lib/search-select/selected.d.ts +5 -1
- package/lib/search-select/utils.d.ts +13 -5
- package/lib/select/common.d.ts +1 -0
- package/lib/select/index.d.ts +203 -84
- package/lib/select/index.js +1 -1
- package/lib/select/option.d.ts +11 -0
- package/lib/select/select.css +13 -5
- package/lib/select/select.d.ts +86 -37
- package/lib/select/select.less +11 -1
- package/lib/select/select.variable.css +37 -29
- package/lib/select/selectTagInput.d.ts +8 -5
- package/lib/shared/helper.d.ts +1 -1
- package/lib/shared/index.js +1 -1
- package/lib/shared/mask-manager.d.ts +3 -4
- package/lib/shared/pop-manager.d.ts +6 -2
- package/lib/shared/popover.d.ts +2 -2
- package/lib/shared/vue-types.d.ts +3 -2
- package/lib/sideslider/index.d.ts +1 -1
- package/lib/sideslider/index.js +1 -1
- package/lib/slider/index.d.ts +1 -1
- package/lib/slider/index.js +1 -1
- package/lib/steps/index.d.ts +1 -1
- package/lib/steps/index.js +1 -1
- package/lib/styles/mixins/animate.css +4 -4
- package/lib/styles/mixins/animate.less +10 -6
- package/lib/styles/mixins/animate.variable.css +126 -4
- package/lib/styles/mixins/mixins.css +4 -4
- package/lib/styles/mixins/mixins.variable.css +4 -4
- package/lib/styles/mixins/popper.less +6 -5
- package/lib/swiper/index.d.ts +1 -1
- package/lib/swiper/index.js +1 -1
- package/lib/swiper/swiper.css +0 -6
- package/lib/swiper/swiper.less +0 -8
- package/lib/swiper/swiper.variable.css +0 -6
- package/lib/switcher/index.d.ts +30 -16
- package/lib/switcher/index.js +1 -1
- package/lib/switcher/switcher.css +4 -4
- package/lib/switcher/switcher.d.ts +74 -5
- package/lib/switcher/switcher.variable.css +4 -4
- package/lib/tab/index.d.ts +3 -3
- package/lib/tab/index.js +1 -1
- package/lib/tab/tab-nav.d.ts +12 -2
- package/lib/tab/tab-panel.d.ts +1 -1
- package/lib/table/components/table-cell.d.ts +22 -15
- package/lib/table/components/table-column.d.ts +155 -219
- package/lib/table/const.d.ts +40 -56
- package/lib/table/events.d.ts +180 -0
- package/lib/table/index.d.ts +747 -440
- package/lib/table/index.js +1 -1
- package/lib/table/plugins/head-filter.css +3 -0
- package/lib/table/plugins/head-filter.d.ts +3 -7
- package/lib/table/plugins/head-filter.less +3 -0
- package/lib/table/plugins/head-filter.variable.css +3 -0
- package/lib/table/plugins/head-sort.d.ts +3 -7
- package/lib/table/plugins/settings.d.ts +12 -26
- package/lib/table/plugins/use-column-resize.d.ts +30 -10
- package/lib/table/plugins/use-fixed-column.d.ts +10 -9
- package/lib/table/plugins/use-pagination.d.ts +7 -4
- package/lib/table/props.d.ts +220 -181
- package/lib/table/render.d.ts +12 -20
- package/lib/table/table.css +89 -6
- package/lib/table/table.d.ts +227 -104
- package/lib/table/table.less +79 -9
- package/lib/table/table.variable.css +89 -6
- package/lib/table/use-attributes.d.ts +55 -0
- package/lib/table/use-column.d.ts +177 -3
- package/lib/table/use-common.d.ts +1609 -76
- package/lib/table/use-render.d.ts +11 -0
- package/lib/table/utils.d.ts +30 -28
- package/lib/table-column/index.d.ts +240 -527
- package/lib/table-column/index.js +1 -1
- package/lib/tag/index.d.ts +10 -10
- package/lib/tag/index.js +1 -1
- package/lib/tag/tag.d.ts +5 -5
- package/lib/tag-input/index.d.ts +49 -13
- package/lib/tag-input/index.js +1 -1
- package/lib/tag-input/tag-input.css +9 -1
- package/lib/tag-input/tag-input.d.ts +46 -10
- package/lib/tag-input/tag-input.less +13 -4
- package/lib/tag-input/tag-input.variable.css +9 -1
- package/lib/tag-input/tag-props.d.ts +16 -4
- package/lib/time-picker/index.d.ts +4 -4
- package/lib/time-picker/index.js +1 -1
- package/lib/timeline/index.d.ts +1 -1
- package/lib/timeline/index.js +1 -1
- package/lib/transfer/index.d.ts +1 -1
- package/lib/transfer/index.js +1 -1
- package/lib/tree/constant.d.ts +2 -2
- package/lib/tree/index.d.ts +49 -7
- package/lib/tree/index.js +1 -1
- package/lib/tree/props.d.ts +16 -2
- package/lib/tree/tree.d.ts +27 -2
- package/lib/tree/use-node-action.d.ts +5 -3
- package/lib/tree/use-node-attribute.d.ts +17 -8
- package/lib/tree/use-search.d.ts +2 -2
- package/lib/tree/use-tree-init.d.ts +1 -2
- package/lib/tree/util.d.ts +8 -3
- package/lib/upload/index.d.ts +1 -1
- package/lib/upload/index.js +1 -1
- package/lib/upload/upload.css +4 -4
- package/lib/upload/upload.variable.css +4 -4
- package/lib/virtual-render/index.d.ts +43 -1
- package/lib/virtual-render/index.js +1 -1
- package/lib/virtual-render/props.d.ts +15 -0
- package/lib/virtual-render/v-virtual-render.d.ts +19 -1
- package/lib/virtual-render/virtual-render.d.ts +25 -0
- package/lib/volar.components.d.ts +24 -24
- package/package.json +17 -16
package/lib/slider/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
/*! For license information please see index.js.LICENSE.txt */
|
2
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../config-provider"),require("../input"),require("../popover"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../config-provider","../input","../popover"],t);else{var a="object"==typeof exports?t(require("../shared"),require("vue"),require("../config-provider"),require("../input"),require("../popover")):t(e["../shared"],e.vue,e["../config-provider"],e["../input"],e["../popover"]);for(var r in a)("object"==typeof exports?exports:e)[r]=a[r]}}(self,((e,t,a,r,n)=>(()=>{var o={2717:e=>{"use strict";e.exports=a},8133:e=>{"use strict";e.exports=r},5537:e=>{"use strict";e.exports=n},4212:t=>{"use strict";t.exports=e},748:e=>{"use strict";e.exports=t},7609:(e,t,a)=>{var r=a(7425).default;function n(){"use strict";e.exports=n=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},a=Object.prototype,o=a.hasOwnProperty,u=Object.defineProperty||function(e,t,a){e[t]=a.value},l="function"==typeof Symbol?Symbol:{},i=l.iterator||"@@iterator",c=l.asyncIterator||"@@asyncIterator",s=l.toStringTag||"@@toStringTag";function v(e,t,a){return Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{v({},"")}catch(e){v=function(e,t,a){return e[t]=a}}function m(e,t,a,r){var n=t&&t.prototype instanceof p?t:p,o=Object.create(n.prototype),l=new j(r||[]);return u(o,"_invoke",{value:N(e,a,l)}),o}function d(e,t,a){try{return{type:"normal",arg:e.call(t,a)}}catch(e){return{type:"throw",arg:e}}}t.wrap=m;var f={};function p(){}function h(){}function y(){}var V={};v(V,i,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(O([])));x&&x!==a&&o.call(x,i)&&(V=x);var g=y.prototype=p.prototype=Object.create(V);function w(e){["next","throw","return"].forEach((function(t){v(e,t,(function(e){return this._invoke(t,e)}))}))}function L(e,t){function a(n,u,l,i){var c=d(e[n],e,u);if("throw"!==c.type){var s=c.arg,v=s.value;return v&&"object"==r(v)&&o.call(v,"__await")?t.resolve(v.__await).then((function(e){a("next",e,l,i)}),(function(e){a("throw",e,l,i)})):t.resolve(v).then((function(e){s.value=e,l(s)}),(function(e){return a("throw",e,l,i)}))}i(c.arg)}var n;u(this,"_invoke",{value: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 N(e,t,a){var r="suspendedStart";return function(n,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===n)throw o;return{value:void 0,done:!0}}for(a.method=n,a.arg=o;;){var u=a.delegate;if(u){var l=S(u,a);if(l){if(l===f)continue;return l}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===r)throw r="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);r="executing";var i=d(e,t,a);if("normal"===i.type){if(r=a.done?"completed":"suspendedYield",i.arg===f)continue;return{value:i.arg,done:a.done}}"throw"===i.type&&(r="completed",a.method="throw",a.arg=i.arg)}}}function S(e,t){var a=t.method,r=e.iterator[a];if(void 0===r)return t.delegate=null,"throw"===a&&e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method)||"return"!==a&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+a+"' method")),f;var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,f;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}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 j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function O(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,r=function t(){for(;++a<e.length;)if(o.call(e,a))return t.value=e[a],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:T}}function T(){return{value:void 0,done:!0}}return h.prototype=y,u(g,"constructor",{value:y,configurable:!0}),u(y,"constructor",{value:h,configurable:!0}),h.displayName=v(y,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,v(e,s,"GeneratorFunction")),e.prototype=Object.create(g),e},t.awrap=function(e){return{__await:e}},w(L.prototype),v(L.prototype,c,(function(){return this})),t.AsyncIterator=L,t.async=function(e,a,r,n,o){void 0===o&&(o=Promise);var u=new L(m(e,a,r,n),o);return t.isGeneratorFunction(a)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},w(g),v(g,s,"Generator"),v(g,i,(function(){return this})),v(g,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),a=[];for(var r in t)a.push(r);return a.reverse(),function e(){for(;a.length;){var r=a.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=O,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function a(a,r){return u.type="throw",u.arg=e,t.next=a,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r],u=n.completion;if("root"===n.tryLoc)return a("end");if(n.tryLoc<=this.prev){var l=o.call(n,"catchLoc"),i=o.call(n,"finallyLoc");if(l&&i){if(this.prev<n.catchLoc)return a(n.catchLoc,!0);if(this.prev<n.finallyLoc)return a(n.finallyLoc)}else if(l){if(this.prev<n.catchLoc)return a(n.catchLoc,!0)}else{if(!i)throw new Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return a(n.finallyLoc)}}}},abrupt:function(e,t){for(var a=this.tryEntries.length-1;a>=0;--a){var r=this.tryEntries[a];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var n=r;break}}n&&("break"===e||"continue"===e)&&n.tryLoc<=t&&t<=n.finallyLoc&&(n=null);var u=n?n.completion:{};return u.type=e,u.arg=t,n?(this.method="next",this.next=n.finallyLoc,f):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),f},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),f}},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,t,a){return this.delegate={iterator:O(e),resultName:t,nextLoc:a},"next"===this.method&&(this.arg=void 0),f}},t}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},7425:e=>{function t(a){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(a)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},2841:(e,t,a)=>{var r=a(7609)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},u={};function l(e){var t=u[e];if(void 0!==t)return t.exports;var a=u[e]={exports:{}};return o[e](a,a.exports,l),a.exports}l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},l.d=(e,t)=>{for(var a in t)l.o(t,a)&&!l.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{"use strict";l.r(i),l.d(i,{default:()=>p});var e=l(4212),t=l(748),a=l(2841),r=l.n(a);Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var n=l(2717),o=l(8133),u=l.n(o),c=l(5537),s=l.n(c);const v=(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 o=r.emit,u=(0,t.ref)(!1),l=(0,t.ref)(!1),i=(0,t.ref)(0),c=(0,t.ref)(0),v=(0,t.ref)(0),f=(0,t.ref)(null),p=(0,t.ref)(a.modelValue),h=(0,t.ref)(0),y=(0,t.ref)(0),V=(0,t.ref)(!1),b=(0,t.ref)(null),x=(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}})),L=(0,t.computed)((function(){return a.params.formatterButtonLabel(a.modelValue)})),N=function(e){a.params.disable||(e.preventDefault(),S(e),m(window,"mousemove",E),m(window,"touchmove",E),m(window,"mouseup",C),m(window,"touchend",C))},S=function(e){u.value=!0,l.value=!0,a.params.vertical?i.value=e.clientY:c.value=e.clientX,v.value=parseFloat(g.value),f.value=v.value},E=function(e){if(u.value){l.value=!1,o("resetSize");var t=0;a.params.vertical?(h.value=e.clientY,t=(i.value-h.value)/a.params.sliderSize*100):(y.value=e.clientX,t=(y.value-c.value)/a.params.sliderSize*100),f.value=v.value+t,j(f.value)}},C=function e(){V.value=!1,u.value&&(setTimeout((function(){u.value=!1,l.value||(j(f.value),o("emitChange"))}),0),d(window,"mousemove",E),d(window,"touchmove",E),d(window,"mouseup",e),d(window,"touchend",e))},j=function(e){if(null!==e&&!isNaN(e)){e<0?f.value=0:e>100&&(f.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)),o("update:modelValue",r),u.value||a.modelValue===p.value||(p.value=a.modelValue)}},O=(0,n.usePrefix)().resolveClassName;return{renderDom:function(){return(0,t.createVNode)("div",{class:["".concat(O("slider-button")),a.params.vertical?"vertical":"horizontal",{grabbing:u.value}],ref:b,tabindex:"0",style:w.value,onClick:function(e){return e.stopPropagation()},onMousedown:N},[Boolean(x.value.content)?(0,t.createVNode)(s(),{content:x.value.content,theme:"dark",placement:x.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"]},[L.value]):void 0])},setPosition:j,tip:x}},render:function(){return this.renderDom()}});var m=function(e,t,a){e&&t&&a&&e.addEventListener(t,a,!1)},d=function(e,t,a){e&&t&&a&&e.removeEventListener(t,a,!1)};const f=(0,t.defineComponent)({name:"Slider",props:{modelValue:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.number),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 o=this,l=a.slots,i=a.emit,c=(0,t.ref)(1),s=(0,t.ref)(null),d=(0,t.ref)(null),f=(0,t.ref)(null),p=(0,t.ref)(0),h=(0,t.ref)(0),y=(0,t.ref)(null),V=(0,t.ref)(null),b=(0,t.ref)(null),x=(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(s.value,d.value)})),L=(0,t.computed)((function(){return Math.max(s.value,d.value)})),N=(0,t.computed)((function(){return e.range?"".concat(100*(L.value-w.value)/(e.maxValue-e.minValue),"%"):"".concat(100*(s.value-e.minValue)/(e.maxValue-e.minValue),"%")})),S=(0,t.computed)((function(){return e.range?"".concat(100*(w.value-e.minValue)/(e.maxValue-e.minValue),"%"):"0%"})),E=(0,t.computed)((function(){return e.vertical?{height:N.value,bottom:S.value}:{width:N.value,left:S.value}})),C=(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*(L.value-e.minValue)/(e.maxValue-e.minValue)})):r.filter((function(t){return t>100*(s.value-e.minValue)/(e.maxValue-e.minValue)}))})),j=(0,t.computed)((function(){return e.vertical?{height:e.height,width:"4px"}:{}})),O=(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})),T=(0,t.computed)((function(){return Array.isArray(e.modelValue)})),_=(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}})):[]})),P=(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:c.value,formatterTipLabel:e.formatterTipLabel}}));(0,t.watch)((function(){return e.modelValue}),(function(){k()})),(0,t.watch)((function(){return s.value}),(function(t){e.range?i("update:modelValue",[w.value,L.value]):i("update:modelValue",t),p.value=t})),(0,t.watch)((function(){return d.value}),(function(e){i("update:modelValue",[w.value,L.value]),h.value=e})),(0,t.onMounted)((function(){e.range?(Array.isArray(e.modelValue)?(s.value=Math.max(e.minValue,Number(e.modelValue[0])),d.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(s.value=e.minValue,d.value=e.maxValue),f.value=[s.value,d.value]):("number"!=typeof e.modelValue||isNaN(e.modelValue)?s.value=e.minValue:s.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),f.value=s.value),B(),m(window,"resize",B())}));var B=function(){y.value&&(c.value=y.value["client".concat(e.vertical?"Height":"Width")])},I=function(t){var a,r;if(t.stopPropagation(),!e.disable){if(B(),e.vertical){var n=null===(a=y.value)||void 0===a?void 0:a.getBoundingClientRect().bottom;G((n-t.clientY)/c.value*100)}else{var o=null===(r=y.value)||void 0===r?void 0:r.getBoundingClientRect().left;G((t.clientX-o)/c.value*100)}z()}},M=function(){return e.range?![w.value,L.value].every((function(e,t){return e===f.value[t]})):e.modelValue!==f.value},k=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?i("update:modelValue",[e.minValue,e.minValue]):t[0]>e.maxValue?i("update:modelValue",[e.maxValue,e.maxValue]):t[0]<e.minValue?i("update:modelValue",[e.minValue,t[1]]):t[1]>e.maxValue?i("update:modelValue",[t[0],e.maxValue]):(s.value=Number(t[0]),d.value=Number(t[1]),M()&&(f.value=t.slice())):e.range||"number"!=typeof t||isNaN(t)||(t<e.minValue?i("update:modelValue",e.minValue):t>e.maxValue?i("update:modelValue",e.maxValue):(s.value=t,M()&&(f.value=t)))}},z=function(){return a=o,n=void 0,u=void 0,l=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:i("change",e.range?[w.value,L.value]:e.modelValue);case 3:case"end":return a.stop()}}),a)})),new(u||(u=Promise))((function(e,t){function r(e){try{i(l.next(e))}catch(e){t(e)}}function o(e){try{i(l.throw(e))}catch(e){t(e)}}function i(t){var a;t.done?e(t.value):(a=t.value,a instanceof u?a:new u((function(e){e(a)}))).then(r,o)}i((l=l.apply(a,n||[])).next())}));var a,n,u,l},F=function(t){return e.vertical?{bottom:"".concat(t,"%")}:{left:"".concat(t,"%")}},G=function(t){if(e.range){var a=e.minValue+t*(e.maxValue-e.minValue)/100;Math.abs(w.value-a)<Math.abs(L.value-a)?x.value=s.value<d.value?V.value:b.value:x.value=s.value>d.value?V.value:b.value,x.value.setPosition(t)}else V.value.setPosition(t)},q=function(t){if(""!==t){var a=parseFloat(t);a<e.minValue?(p.value=e.minValue,s.value=e.minValue):a>e.maxValue?(p.value=e.maxValue,s.value=e.maxValue):s.value=a}},A=function(t){if(""!==t){var a=parseFloat(t.toString());a<e.minValue?(h.value=e.minValue,d.value=e.minValue):a>e.maxValue?(h.value=e.maxValue,d.value=e.maxValue):d.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&&[s.value,d.value].includes(a)?"0":"1"},D=(0,n.usePrefix)().resolveClassName;return{renderDom:function(){var a,r;return(0,t.createVNode)("div",{class:["".concat(D("slider")),e.extCls]},[null===(a=l.start)||void 0===a?void 0:a.call(l),(0,t.createVNode)("div",{class:"".concat(D("slider-runway")),ref:y,style:j.value,onClick:I},[(0,t.createVNode)("div",{class:["".concat(D("slider-bar")),e.vertical?"vertical":"horizontal",{disable:e.disable}],style:E.value},null),e.showInterval?C.value.map((function(a,r){return(0,t.createVNode)("div",{key:r,class:["".concat(D("slider-interval")),{vertical:e.vertical}],style:F(a)},null)})):void 0,e.customContent?_.value.map((function(a,r){return(0,t.createVNode)("div",{key:r,class:["".concat(D("slider-interval")),{vertical:e.vertical}],style:F(a.percent)},null)})):void 0,e.showBetweenLabel||e.showIntervalLabel||e.customContent?(0,t.createVNode)("div",{class:["".concat(D("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?O.value.map((function(a,r){return(0,t.createVNode)("div",{class:["".concat(D("slider-label")),e.vertical?"vertical":"horizontal"],key:r,style:F(a.stepWidth)},[a.stepLabel])})):e.customContent?_.value.map((function(a,r){return(0,t.createVNode)("div",{class:["".concat(D("slider-label")),e.vertical?"vertical":"horizontal"],key:r,style:F(a.percent)},[a.label])})):void 0]):void 0,(0,t.createVNode)(v,{modelValue:s.value,"onUpdate:modelValue":function(e){return s.value=e},ref:V,params:P.value,onEmitChange:z,onResetSize:B},null),e.range?(0,t.createVNode)(v,{modelValue:d.value,"onUpdate:modelValue":function(e){return d.value=e},ref:b,params:P.value,onEmitChange:z,onResetSize:B},null):void 0]),e.showInput&&!e.vertical?(0,t.createVNode)("div",{class:"".concat(D("slider-input"))},[(0,t.createVNode)("div",{class:"input-item"},[(0,t.createVNode)(u(),{type:"number",modelValue:p.value,max:e.maxValue,min:e.minValue,onChange:q},null)]),T.value&&d.value?[(0,t.createVNode)("div",{class:"input-center"},[(0,t.createTextVNode)("~")]),(0,t.createVNode)("div",{class:"input-item"},[(0,t.createVNode)(u(),{type:"number",modelValue:h.value,max:e.maxValue,min:e.minValue,onChange:A},null)])]:void 0]):void 0,null===(r=l.end)||void 0===r?void 0:r.call(l)])}}},render:function(){return this.renderDom()}}),p=(0,e.withInstall)(f)})(),i})()));
|
2
|
+
import*as e from"../shared";import*as t from"vue";import*as a from"../config-provider";import*as r from"../input";import*as n from"../popover";var o={7609:(e,t,a)=>{var r=a(7425).default;function n(){e.exports=n=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},a=Object.prototype,o=a.hasOwnProperty,l=Object.defineProperty||function(e,t,a){e[t]=a.value},u="function"==typeof Symbol?Symbol:{},i=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function m(e,t,a){return Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{m({},"")}catch(e){m=function(e,t,a){return e[t]=a}}function v(e,t,a,r){var n=t&&t.prototype instanceof p?t:p,o=Object.create(n.prototype),u=new P(r||[]);return l(o,"_invoke",{value:L(e,a,u)}),o}function d(e,t,a){try{return{type:"normal",arg:e.call(t,a)}}catch(e){return{type:"throw",arg:e}}}t.wrap=v;var f={};function p(){}function h(){}function V(){}var y={};m(y,i,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(S([])));x&&x!==a&&o.call(x,i)&&(y=x);var g=V.prototype=p.prototype=Object.create(y);function w(e){["next","throw","return"].forEach((function(t){m(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function a(n,l,u,i){var c=d(e[n],e,l);if("throw"!==c.type){var s=c.arg,m=s.value;return m&&"object"==r(m)&&o.call(m,"__await")?t.resolve(m.__await).then((function(e){a("next",e,u,i)}),(function(e){a("throw",e,u,i)})):t.resolve(m).then((function(e){s.value=e,u(s)}),(function(e){return a("throw",e,u,i)}))}i(c.arg)}var n;l(this,"_invoke",{value: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 L(e,t,a){var r="suspendedStart";return function(n,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===n)throw o;return{value:void 0,done:!0}}for(a.method=n,a.arg=o;;){var l=a.delegate;if(l){var u=E(l,a);if(u){if(u===f)continue;return u}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===r)throw r="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);r="executing";var i=d(e,t,a);if("normal"===i.type){if(r=a.done?"completed":"suspendedYield",i.arg===f)continue;return{value:i.arg,done:a.done}}"throw"===i.type&&(r="completed",a.method="throw",a.arg=i.arg)}}}function E(e,t){var a=t.method,r=e.iterator[a];if(void 0===r)return t.delegate=null,"throw"===a&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==a&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+a+"' method")),f;var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,f;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function S(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,r=function t(){for(;++a<e.length;)if(o.call(e,a))return t.value=e[a],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:B}}function B(){return{value:void 0,done:!0}}return h.prototype=V,l(g,"constructor",{value:V,configurable:!0}),l(V,"constructor",{value:h,configurable:!0}),h.displayName=m(V,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,V):(e.__proto__=V,m(e,s,"GeneratorFunction")),e.prototype=Object.create(g),e},t.awrap=function(e){return{__await:e}},w(N.prototype),m(N.prototype,c,(function(){return this})),t.AsyncIterator=N,t.async=function(e,a,r,n,o){void 0===o&&(o=Promise);var l=new N(v(e,a,r,n),o);return t.isGeneratorFunction(a)?l:l.next().then((function(e){return e.done?e.value:l.next()}))},w(g),m(g,s,"Generator"),m(g,i,(function(){return this})),m(g,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),a=[];for(var r in t)a.push(r);return a.reverse(),function e(){for(;a.length;){var r=a.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=S,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function a(a,r){return l.type="throw",l.arg=e,t.next=a,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r],l=n.completion;if("root"===n.tryLoc)return a("end");if(n.tryLoc<=this.prev){var u=o.call(n,"catchLoc"),i=o.call(n,"finallyLoc");if(u&&i){if(this.prev<n.catchLoc)return a(n.catchLoc,!0);if(this.prev<n.finallyLoc)return a(n.finallyLoc)}else if(u){if(this.prev<n.catchLoc)return a(n.catchLoc,!0)}else{if(!i)throw new Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return a(n.finallyLoc)}}}},abrupt:function(e,t){for(var a=this.tryEntries.length-1;a>=0;--a){var r=this.tryEntries[a];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var n=r;break}}n&&("break"===e||"continue"===e)&&n.tryLoc<=t&&t<=n.finallyLoc&&(n=null);var l=n?n.completion:{};return l.type=e,l.arg=t,n?(this.method="next",this.next=n.finallyLoc,f):this.complete(l)},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),f},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),f}},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,t,a){return this.delegate={iterator:S(e),resultName:t,nextLoc:a},"next"===this.method&&(this.arg=void 0),f}},t}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},7425:e=>{function t(a){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(a)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},2841:(e,t,a)=>{var r=a(7609)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},l={};function u(e){var t=l[e];if(void 0!==t)return t.exports;var a=l[e]={exports:{}};return o[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);var i={};(()=>{u.d(i,{Z:()=>x});const o=(l={PlacementEnum:()=>e.PlacementEnum,PropTypes:()=>e.PropTypes,withInstall:()=>e.withInstall},c={},u.d(c,l),c);var l,c;const s=(e=>{var t={};return u.d(t,e),t})({Fragment:()=>t.Fragment,computed:()=>t.computed,createTextVNode:()=>t.createTextVNode,createVNode:()=>t.createVNode,defineComponent:()=>t.defineComponent,nextTick:()=>t.nextTick,onMounted:()=>t.onMounted,ref:()=>t.ref,watch:()=>t.watch});var m=u(2841),v=u.n(m);Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;const d=(e=>{var t={};return u.d(t,e),t})({usePrefix:()=>a.usePrefix}),f=(e=>{var t={};return u.d(t,e),t})({default:()=>r.default}),p=(e=>{var t={};return u.d(t,e),t})({default:()=>n.default}),h=(0,s.defineComponent)({name:"SliderButton",props:{modelValue:{type:Number,default:0},params:{type:Object,default:function(){return{}}}},emits:["emitChange","resetSize","update:modelValue"],setup:function(e,t){var a=t.emit,r=(0,s.ref)(!1),n=(0,s.ref)(!1),l=(0,s.ref)(0),u=(0,s.ref)(0),i=(0,s.ref)(0),c=(0,s.ref)(null),m=(0,s.ref)(e.modelValue),v=(0,s.ref)(0),f=(0,s.ref)(0),h=(0,s.ref)(!1),b=(0,s.ref)(null),x=(0,s.computed)((function(){var t,a,r="";if(null===(t=e.params.customContent)||void 0===t?void 0:t[e.modelValue]){var n=e.params.customContent[e.modelValue];r=n.tip||n.label||""}var l=e.params.vertical?o.PlacementEnum.RIGHT:o.PlacementEnum.TOP;return(null===(a=e.params)||void 0===a?void 0:a.showTip)?{content:e.params.formatterTipLabel("".concat(r||(null==e?void 0:e.modelValue)||"0")),placement:l}:{content:"",placement:l}})),g=(0,s.computed)((function(){return"".concat((e.modelValue-e.params.minValue)/(e.params.maxValue-e.params.minValue)*100,"%")})),w=(0,s.computed)((function(){return e.params.vertical?{bottom:g.value}:{left:g.value}})),N=(0,s.computed)((function(){return e.params.formatterButtonLabel(e.modelValue)})),L=function(t){e.params.disable||(t.preventDefault(),E(t),V(window,"mousemove",T),V(window,"touchmove",T),V(window,"mouseup",C),V(window,"touchend",C))},E=function(t){r.value=!0,n.value=!0,e.params.vertical?l.value=t.clientY:u.value=t.clientX,i.value=parseFloat(g.value),c.value=i.value},T=function(t){if(r.value){n.value=!1,a("resetSize");var o=0;e.params.vertical?(v.value=t.clientY,o=(l.value-v.value)/e.params.sliderSize*100):(f.value=t.clientX,o=(f.value-u.value)/e.params.sliderSize*100),c.value=i.value+o,P(c.value)}},C=function e(){h.value=!1,r.value&&(setTimeout((function(){r.value=!1,n.value||(P(c.value),a("emitChange"))}),0),y(window,"mousemove",T),y(window,"touchmove",T),y(window,"mouseup",e),y(window,"touchend",e))},P=function(t){if(null!==t&&!isNaN(t)){t<0?c.value=0:t>100&&(c.value=100);var n=100/((e.params.maxValue-e.params.minValue)/e.params.step),o=Math.round(t/n)*n*(e.params.maxValue-e.params.minValue)*.01+e.params.minValue;o=parseFloat(o.toFixed(e.params.precision)),a("update:modelValue",o),r.value||e.modelValue===m.value||(m.value=e.modelValue)}},S=(0,d.usePrefix)().resolveClassName;return{renderDom:function(){return(0,s.createVNode)("div",{class:["".concat(S("slider-button")),e.params.vertical?"vertical":"horizontal",{grabbing:r.value}],ref:b,tabindex:"0",style:w.value,onClick:function(e){return e.stopPropagation()},onMousedown:L},[Boolean(x.value.content)?(0,s.createVNode)(s.Fragment,null,[(0,s.createVNode)(p.default,{content:x.value.content,theme:"dark",placement:x.value.placement,boundary:document.body},{default:function(){return[(0,s.createVNode)("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null)]}})]):(0,s.createVNode)(s.Fragment,null,[(0,s.createVNode)("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null)]),e.params.showButtonLabel&&!e.params.showIntervalLabel?(0,s.createVNode)(s.Fragment,null,[(0,s.createVNode)("div",{class:["slider-button-label",e.params.vertical?"vertical":"horizontal"]},[N.value])]):null])},setPosition:P,tip:x}},render:function(){return this.renderDom()}});var V=function(e,t,a){e&&t&&a&&e.addEventListener(t,a,!1)},y=function(e,t,a){e&&t&&a&&e.removeEventListener(t,a,!1)};const b=(0,s.defineComponent)({name:"Slider",props:{modelValue:o.PropTypes.oneOfType([o.PropTypes.arrayOf(o.PropTypes.number),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(e,t){var a=this,r=t.slots,n=t.emit,o=(0,s.ref)(1),l=(0,s.ref)(null),u=(0,s.ref)(null),i=(0,s.ref)(null),c=(0,s.ref)(0),m=(0,s.ref)(0),p=(0,s.ref)(null),y=(0,s.ref)(null),b=(0,s.ref)(null),x=(0,s.ref)(null),g=(0,s.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,s.computed)((function(){return Math.min(l.value,u.value)})),N=(0,s.computed)((function(){return Math.max(l.value,u.value)})),L=(0,s.computed)((function(){return e.range?"".concat(100*(N.value-w.value)/(e.maxValue-e.minValue),"%"):"".concat(100*(l.value-e.minValue)/(e.maxValue-e.minValue),"%")})),E=(0,s.computed)((function(){return e.range?"".concat(100*(w.value-e.minValue)/(e.maxValue-e.minValue),"%"):"0%"})),T=(0,s.computed)((function(){return e.vertical?{height:L.value,bottom:E.value}:{width:L.value,left:E.value}})),C=(0,s.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*(N.value-e.minValue)/(e.maxValue-e.minValue)})):r.filter((function(t){return t>100*(l.value-e.minValue)/(e.maxValue-e.minValue)}))})),P=(0,s.computed)((function(){return e.vertical?{height:e.height,width:"4px"}:{}})),S=(0,s.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})),B=(0,s.computed)((function(){return Array.isArray(e.modelValue)})),O=(0,s.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}})):[]})),_=(0,s.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:o.value,formatterTipLabel:e.formatterTipLabel}}));(0,s.watch)((function(){return e.modelValue}),(function(){F()})),(0,s.watch)((function(){return l.value}),(function(t){e.range?n("update:modelValue",[w.value,N.value]):n("update:modelValue",t),c.value=t})),(0,s.watch)((function(){return u.value}),(function(e){n("update:modelValue",[w.value,N.value]),m.value=e})),(0,s.onMounted)((function(){e.range?(Array.isArray(e.modelValue)?(l.value=Math.max(e.minValue,Number(e.modelValue[0])),u.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(l.value=e.minValue,u.value=e.maxValue),i.value=[l.value,u.value]):("number"!=typeof e.modelValue||isNaN(e.modelValue)?l.value=e.minValue:l.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),i.value=l.value),j(),V(window,"resize",j())}));var j=function(){p.value&&(o.value=p.value["client".concat(e.vertical?"Height":"Width")])},I=function(t){var a,r;if(t.stopPropagation(),!e.disable){if(j(),e.vertical){var n=null===(a=p.value)||void 0===a?void 0:a.getBoundingClientRect().bottom;G((n-t.clientY)/o.value*100)}else{var l=null===(r=p.value)||void 0===r?void 0:r.getBoundingClientRect().left;G((t.clientX-l)/o.value*100)}M()}},k=function(){return e.range?![w.value,N.value].every((function(e,t){return e===i.value[t]})):e.modelValue!==i.value},F=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?n("update:modelValue",[e.minValue,e.minValue]):t[0]>e.maxValue?n("update:modelValue",[e.maxValue,e.maxValue]):t[0]<e.minValue?n("update:modelValue",[e.minValue,t[1]]):t[1]>e.maxValue?n("update:modelValue",[t[0],e.maxValue]):(l.value=Number(t[0]),u.value=Number(t[1]),k()&&(i.value=t.slice())):e.range||"number"!=typeof t||isNaN(t)||(t<e.minValue?n("update:modelValue",e.minValue):t>e.maxValue?n("update:modelValue",e.maxValue):(l.value=t,k()&&(i.value=t)))}},M=function(){return t=a,r=void 0,o=void 0,l=v().mark((function t(){return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,s.nextTick)();case 2:n("change",e.range?[w.value,N.value]:e.modelValue);case 3:case"end":return t.stop()}}),t)})),new(o||(o=Promise))((function(e,a){function n(e){try{i(l.next(e))}catch(e){a(e)}}function u(e){try{i(l.throw(e))}catch(e){a(e)}}function i(t){var a;t.done?e(t.value):(a=t.value,a instanceof o?a:new o((function(e){e(a)}))).then(n,u)}i((l=l.apply(t,r||[])).next())}));var t,r,o,l},z=function(t){return e.vertical?{bottom:"".concat(t,"%")}:{left:"".concat(t,"%")}},G=function(t){if(e.range){var a=e.minValue+t*(e.maxValue-e.minValue)/100;Math.abs(w.value-a)<Math.abs(N.value-a)?x.value=l.value<u.value?y.value:b.value:x.value=l.value>u.value?y.value:b.value,x.value.setPosition(t)}else y.value.setPosition(t)},A=function(t){if(""!==t){var a=parseFloat(t);a<e.minValue?(c.value=e.minValue,l.value=e.minValue):a>e.maxValue?(c.value=e.maxValue,l.value=e.maxValue):l.value=a}},R=function(t){if(""!==t){var a=parseFloat(t.toString());a<e.minValue?(m.value=e.minValue,u.value=e.minValue):a>e.maxValue?(m.value=e.maxValue,u.value=e.maxValue):u.value=a}},D=function(t){var a;return a="start"===t?e.vertical?e.maxValue:e.minValue:e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[l.value,u.value].includes(a)?"0":"1"},W=(0,d.usePrefix)().resolveClassName;return{renderDom:function(){var t,a;return(0,s.createVNode)("div",{class:["".concat(W("slider")),e.extCls]},[null===(t=r.start)||void 0===t?void 0:t.call(r),(0,s.createVNode)("div",{class:"".concat(W("slider-runway")),ref:p,style:P.value,onClick:I},[(0,s.createVNode)("div",{class:["".concat(W("slider-bar")),e.vertical?"vertical":"horizontal",{disable:e.disable}],style:T.value},null),e.showInterval?C.value.map((function(t,a){return(0,s.createVNode)("div",{key:a,class:["".concat(W("slider-interval")),{vertical:e.vertical}],style:z(t)},null)})):void 0,e.customContent?O.value.map((function(t,a){return(0,s.createVNode)("div",{key:a,class:["".concat(W("slider-interval")),{vertical:e.vertical}],style:z(t.percent)},null)})):void 0,e.showBetweenLabel||e.showIntervalLabel||e.customContent?(0,s.createVNode)("div",{class:["".concat(W("slider-labels")),e.vertical?"vertical":"horizontal"]},[e.showBetweenLabel?[(0,s.createVNode)("div",{class:"label-start",style:[{opacity:D("start")}]},[e.formatterLabel(e.minValue)]),(0,s.createVNode)("div",{class:"label-end",style:[{opacity:D("end")}]},[e.formatterLabel(e.maxValue)])]:e.showIntervalLabel?S.value.map((function(t,a){return(0,s.createVNode)("div",{class:["".concat(W("slider-label")),e.vertical?"vertical":"horizontal"],key:a,style:z(t.stepWidth)},[t.stepLabel])})):e.customContent?O.value.map((function(t,a){return(0,s.createVNode)("div",{class:["".concat(W("slider-label")),e.vertical?"vertical":"horizontal"],key:a,style:z(t.percent)},[t.label])})):void 0]):void 0,(0,s.createVNode)(h,{modelValue:l.value,"onUpdate:modelValue":function(e){return l.value=e},ref:y,params:_.value,onEmitChange:M,onResetSize:j},null),e.range?(0,s.createVNode)(h,{modelValue:u.value,"onUpdate:modelValue":function(e){return u.value=e},ref:b,params:_.value,onEmitChange:M,onResetSize:j},null):void 0]),e.showInput&&!e.vertical?(0,s.createVNode)("div",{class:"".concat(W("slider-input"))},[(0,s.createVNode)("div",{class:"input-item"},[(0,s.createVNode)(f.default,{type:"number",modelValue:c.value,max:e.maxValue,min:e.minValue,onChange:A},null)]),B.value&&u.value?[(0,s.createVNode)("div",{class:"input-center"},[(0,s.createTextVNode)("~")]),(0,s.createVNode)("div",{class:"input-item"},[(0,s.createVNode)(f.default,{type:"number",modelValue:m.value,max:e.maxValue,min:e.minValue,onChange:R},null)])]:void 0]):void 0,null===(a=r.end)||void 0===a?void 0:a.call(r)])}}},render:function(){return this.renderDom()}}),x=(0,o.withInstall)(b)})();var c=i.Z;export{c as default};
|
package/lib/steps/index.d.ts
CHANGED
@@ -16,8 +16,8 @@ declare const BkSteps: {
|
|
16
16
|
class?: unknown;
|
17
17
|
style?: unknown;
|
18
18
|
onClick?: (...args: any[]) => any;
|
19
|
-
key?: string | number | symbol;
|
20
19
|
ref?: import("vue").VNodeRef;
|
20
|
+
key?: string | number | symbol;
|
21
21
|
ref_for?: boolean;
|
22
22
|
ref_key?: string;
|
23
23
|
onVnodeBeforeMount?: ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
package/lib/steps/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
/*! For license information please see index.js.LICENSE.txt */
|
2
|
-
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("../shared"),require("vue"),require("vue-types"),require("../config-provider"),require("../icon"));else if("function"==typeof define&&define.amd)define(["../shared","vue","vue-types","../config-provider","../icon"],e);else{var r="object"==typeof exports?e(require("../shared"),require("vue"),require("vue-types"),require("../config-provider"),require("../icon")):e(t["../shared"],t.vue,t["vue-types"],t["../config-provider"],t["../icon"]);for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(self,((t,e,r,n,o)=>(()=>{var i={2717:t=>{"use strict";t.exports=n},6870:t=>{"use strict";t.exports=o},4212:e=>{"use strict";e.exports=t},748:t=>{"use strict";t.exports=e},210:t=>{"use strict";t.exports=r},7609:(t,e,r)=>{var n=r(7425).default;function o(){"use strict";t.exports=o=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",u=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function p(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(t){p=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof d?e:d,i=Object.create(o.prototype),c=new O(n||[]);return a(i,"_invoke",{value:j(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var v={};function d(){}function y(){}function m(){}var g={};p(g,s,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(T([])));x&&x!==r&&i.call(x,s)&&(g=x);var w=m.prototype=d.prototype=Object.create(g);function N(t){["next","throw","return"].forEach((function(e){p(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(o,a,c,s){var u=h(t[o],t,a);if("throw"!==u.type){var l=u.arg,p=l.value;return p&&"object"==n(p)&&i.call(p,"__await")?e.resolve(p.__await).then((function(t){r("next",t,c,s)}),(function(t){r("throw",t,c,s)})):e.resolve(p).then((function(t){l.value=t,c(l)}),(function(t){return r("throw",t,c,s)}))}s(u.arg)}var o;a(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}})}function j(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=L(a,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=h(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===v)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function L(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,v;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,v):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function T(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(i.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:_}}function _(){return{value:void 0,done:!0}}return y.prototype=m,a(w,"constructor",{value:m,configurable:!0}),a(m,"constructor",{value:y,configurable:!0}),y.displayName=p(m,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,p(t,l,"GeneratorFunction")),t.prototype=Object.create(w),t},e.awrap=function(t){return{__await:t}},N(S.prototype),p(S.prototype,u,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new S(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},N(w),p(w,l,"Generator"),p(w,s,(function(){return this})),p(w,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=i.call(o,"catchLoc"),s=i.call(o,"finallyLoc");if(c&&s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),v}},e}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},7425:t=>{function e(r){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},2841:(t,e,r)=>{var n=r(7609)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},a={};function c(t){var e=a[t];if(void 0!==e)return e.exports;var r=a[t]={exports:{}};return i[t](r,r.exports,c),r.exports}c.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return c.d(e,{a:e}),e},c.d=(t,e)=>{for(var r in e)c.o(e,r)&&!c.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},c.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),c.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var s={};return(()=>{"use strict";c.r(s),c.d(s,{default:()=>d});var t=c(4212);function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function r(t,r,n){return(r=function(t){var r=function(t,r){if("object"!==e(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,"string");if("object"!==e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===e(r)?r:String(r)}(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}var n=c(748),o=c(2841),i=c.n(o);function a(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function c(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,c)}s((n=n.apply(t,e||[])).next())}))}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var u,l=c(210),p=c(2717),f=c(6870);!function(t){t.UNKNOWN="",t.ERROR="error",t.LOADING="loading"}(u||(u={}));var h={theme:t.PropTypes.theme().def(t.ThemeEnum.PRIMARY),size:t.PropTypes.size(),curStep:t.PropTypes.number.def(1),controllable:t.PropTypes.bool.def(!1),direction:(0,t.directionType)(),status:(0,l.toType)("status",{}).def(u.UNKNOWN),lineType:(0,t.lineStyleType)(),text:t.PropTypes.bool,extCls:t.PropTypes.string,steps:t.PropTypes.array.def([]),beforeChange:t.PropTypes.func};const v=(0,n.defineComponent)({name:"Steps",props:h,emits:["update:curStep","click"],setup:function(t,e){var r=this,o=e.emit,c=(0,p.useLocale)("steps"),s=(0,p.useLocale)("lang"),u=(0,n.ref)([]),l=function(t){var e,r=[];t.forEach((function(t){var e;"string"==typeof t?r.push(t):r.push({title:t.title,icon:t.icon,description:t.description,status:t.status,border:null===(e=t.border)||void 0===e||e})})),(e=u.value).splice.apply(e,[0,u.value.length].concat(r))},f=function(){var e,r;(e=u.value).splice.apply(e,[0,u.value.length].concat([{title:c.value.step1,icon:1},{title:c.value.step2,icon:2},{title:c.value.step3,icon:3}])),(null===(r=t.steps)||void 0===r?void 0:r.length)&&l(t.steps)};(0,n.watch)((function(){return s.value}),(function(){f()})),(0,n.onMounted)(f),(0,n.watch)((function(){return t.steps}),(function(){l(t.steps)}),{deep:!0}),(0,n.watch)((function(){return t.curStep}),(function(){var e;e=t.curStep,h.curStep=e}),{deep:!0});var v=(0,p.usePrefix)().resolveClassName;return{defaultSteps:u,jumpTo:function(e){return a(r,void 0,void 0,i().mark((function r(){var n=this;return i().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,!t.controllable||e===t.curStep){r.next=7;break}if("function"!=typeof t.beforeChange){r.next=5;break}return r.next=5,new Promise((function(r,o){return a(n,void 0,void 0,i().mark((function n(){var a;return i().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.beforeChange(e);case 2:(a=n.sent)?r(a):o(a);case 4:case"end":return n.stop()}}),n)})))}));case 5:o("update:curStep",e),o("click",e);case 7:r.next=12;break;case 9:r.prev=9,r.t0=r.catch(0),console.warn(r.t0);case 12:case"end":return r.stop()}}),r,null,[[0,9]])})))},resolveClassName:v}},render:function(){var e,o=this,i=this.resolveClassName("steps"),a=this.theme?"".concat(i,"-").concat(this.theme):"",c=this.size?"".concat(i,"-").concat(this.size):"",s=(0,t.classes)((r(e={},"".concat(this.extCls),!!this.extCls),r(e,"".concat(this.resolveClassName("steps-".concat(this.direction))),this.direction),r(e,"".concat(this.resolveClassName("steps-".concat(this.lineType))),this.lineType),e),"".concat(a," ").concat(i," ").concat(c)),u=function(t){return o.curStep>t+1||"done"===o.defaultSteps[t].status},l=function(t){return o.curStep===t+1},p=function(t){var e=t.icon;return e?"[object Object]"===Object.prototype.toString.call(e):"string"==typeof t},h=function(t,e){return e.icon||(e.icon=t),!isNaN(e.icon)},v=function(t,e){return l(t)&&"loading"===o.status||function(t){return"loading"===t.status}(e)?(0,n.createVNode)(f.Circle,{class:"".concat(o.resolveClassName("icon")," ").concat(o.resolveClassName("steps-icon")," icon-loading")},null):l(t)&&"error"===o.status||function(t){return"error"===t.status}(e)?(0,n.createVNode)(f.Error,{class:"".concat(o.resolveClassName("steps-icon"))},null):u(t)?(0,n.createVNode)(f.Done,{class:"".concat(o.resolveClassName("steps-icon"))},null):(0,n.createVNode)("span",null,[h(t,e)?t+1:(0,n.createVNode)(e.icon,null,null)])};return(0,n.createVNode)("div",{class:s},[this.defaultSteps.map((function(t,e){var r,i,a;return(0,n.createVNode)("div",{class:[o.resolveClassName("steps"),t.title?"":o.resolveClassName("step-no-content"),u(e)?"done":"",l(e)?"current":"",l(e)&&"error"===o.status?"isError":"",t.status&&l(e)?["".concat(o.resolveClassName("step-".concat(t.status)))]:""]},[(0,n.createVNode)("span",{class:["".concat(o.resolveClassName("step-indicator")),"".concat(o.resolveClassName("step-".concat(p(t)?"icon":"number"))),"".concat(o.resolveClassName("step-icon".concat(t.status)))],style:{cursor:o.controllable?"pointer":""},onClick:function(){o.jumpTo(e+1)}},[null!==(a=null===(i=(r=o.$slots)[e+1])||void 0===i?void 0:i.call(r))&&void 0!==a?a:v(e,t)]),t.title?(0,n.createVNode)("div",{class:"".concat(o.resolveClassName("step-content"))},[(0,n.createVNode)("div",{class:"".concat(o.resolveClassName("step-title")),style:{cursor:o.controllable?"pointer":""},onClick:function(){o.jumpTo(e+1)}},[t.title]),t.description&&(0,n.createVNode)("div",{class:"".concat(o.resolveClassName("step-description")),title:t.description},[t.description])]):""])}))])}}),d=(0,t.withInstall)(v)})(),s})()));
|
2
|
+
import*as t from"../shared";import*as e from"vue";import*as r from"vue-types";import*as n from"../config-provider";import*as o from"../icon";var i={7609:(t,e,r)=>{var n=r(7425).default;function o(){t.exports=o=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",u=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function p(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(t){p=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof v?e:v,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:T(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var d={};function v(){}function y(){}function m(){}var g={};p(g,s,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(j([])));w&&w!==r&&i.call(w,s)&&(g=w);var x=m.prototype=v.prototype=Object.create(g);function N(t){["next","throw","return"].forEach((function(e){p(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(o,a,c,s){var u=h(t[o],t,a);if("throw"!==u.type){var l=u.arg,p=l.value;return p&&"object"==n(p)&&i.call(p,"__await")?e.resolve(p.__await).then((function(t){r("next",t,c,s)}),(function(t){r("throw",t,c,s)})):e.resolve(p).then((function(t){l.value=t,c(l)}),(function(t){return r("throw",t,c,s)}))}s(u.arg)}var o;a(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}})}function T(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=E(a,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=h(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===d)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function E(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function j(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(i.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:O}}function O(){return{value:void 0,done:!0}}return y.prototype=m,a(x,"constructor",{value:m,configurable:!0}),a(m,"constructor",{value:y,configurable:!0}),y.displayName=p(m,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,p(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},N(S.prototype),p(S.prototype,u,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new S(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},N(x),p(x,l,"Generator"),p(x,s,(function(){return this})),p(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=j,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=i.call(o,"catchLoc"),s=i.call(o,"finallyLoc");if(c&&s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},7425:t=>{function e(r){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},2841:(t,e,r)=>{var n=r(7609)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},a={};function c(t){var e=a[t];if(void 0!==e)return e.exports;var r=a[t]={exports:{}};return i[t](r,r.exports,c),r.exports}c.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return c.d(e,{a:e}),e},c.d=(t,e)=>{for(var r in e)c.o(e,r)&&!c.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},c.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var s={};(()=>{c.d(s,{Z:()=>N});const i=(a={PropTypes:()=>t.PropTypes,ThemeEnum:()=>t.ThemeEnum,classes:()=>t.classes,directionType:()=>t.directionType,lineStyleType:()=>t.lineStyleType,withInstall:()=>t.withInstall},u={},c.d(u,a),u);var a,u;function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function p(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==l(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===l(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const f=(t=>{var e={};return c.d(e,t),e})({createVNode:()=>e.createVNode,defineComponent:()=>e.defineComponent,onMounted:()=>e.onMounted,ref:()=>e.ref,watch:()=>e.watch});var h=c(2841),d=c.n(h);function v(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function c(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,c)}s((n=n.apply(t,e||[])).next())}))}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;const y=(t=>{var e={};return c.d(e,t),e})({toType:()=>r.toType}),m=(t=>{var e={};return c.d(e,t),e})({useLocale:()=>n.useLocale,usePrefix:()=>n.usePrefix}),g=(t=>{var e={};return c.d(e,t),e})({Circle:()=>o.Circle,Done:()=>o.Done,Error:()=>o.Error});var b;!function(t){t.UNKNOWN="",t.ERROR="error",t.LOADING="loading"}(b||(b={}));var w={theme:i.PropTypes.theme().def(i.ThemeEnum.PRIMARY),size:i.PropTypes.size(),curStep:i.PropTypes.number.def(1),controllable:i.PropTypes.bool.def(!1),direction:(0,i.directionType)(),status:(0,y.toType)("status",{}).def(b.UNKNOWN),lineType:(0,i.lineStyleType)(),text:i.PropTypes.bool,extCls:i.PropTypes.string,steps:i.PropTypes.array.def([]),beforeChange:i.PropTypes.func};const x=(0,f.defineComponent)({name:"Steps",props:w,emits:["update:curStep","click"],setup:function(t,e){var r=this,n=e.emit,o=(0,m.useLocale)("steps"),i=(0,m.useLocale)("lang"),a=(0,f.ref)([]),c=function(t){var e,r=[];t.forEach((function(t){var e;"string"==typeof t?r.push(t):r.push({title:t.title,icon:t.icon,description:t.description,status:t.status,border:null===(e=t.border)||void 0===e||e})})),(e=a.value).splice.apply(e,[0,a.value.length].concat(r))},s=function(){var e,r;(e=a.value).splice.apply(e,[0,a.value.length].concat([{title:o.value.step1,icon:1},{title:o.value.step2,icon:2},{title:o.value.step3,icon:3}])),(null===(r=t.steps)||void 0===r?void 0:r.length)&&c(t.steps)};(0,f.watch)((function(){return i.value}),(function(){s()})),(0,f.onMounted)(s),(0,f.watch)((function(){return t.steps}),(function(){c(t.steps)}),{deep:!0}),(0,f.watch)((function(){return t.curStep}),(function(){var e;e=t.curStep,w.curStep=e}),{deep:!0});var u=(0,m.usePrefix)().resolveClassName;return{defaultSteps:a,jumpTo:function(e){return v(r,void 0,void 0,d().mark((function r(){var o=this;return d().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,!t.controllable||e===t.curStep){r.next=7;break}if("function"!=typeof t.beforeChange){r.next=5;break}return r.next=5,new Promise((function(r,n){return v(o,void 0,void 0,d().mark((function o(){var i;return d().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,t.beforeChange(e);case 2:(i=o.sent)?r(i):n(i);case 4:case"end":return o.stop()}}),o)})))}));case 5:n("update:curStep",e),n("click",e);case 7:r.next=12;break;case 9:r.prev=9,r.t0=r.catch(0),console.warn(r.t0);case 12:case"end":return r.stop()}}),r,null,[[0,9]])})))},resolveClassName:u}},render:function(){var t,e=this,r=this.resolveClassName("steps"),n=this.theme?"".concat(r,"-").concat(this.theme):"",o=this.size?"".concat(r,"-").concat(this.size):"",a=(0,i.classes)((p(t={},"".concat(this.extCls),!!this.extCls),p(t,"".concat(this.resolveClassName("steps-".concat(this.direction))),this.direction),p(t,"".concat(this.resolveClassName("steps-".concat(this.lineType))),this.lineType),t),"".concat(n," ").concat(r," ").concat(o)),c=function(t){return e.curStep>t+1||"done"===e.defaultSteps[t].status},s=function(t){return e.curStep===t+1},u=function(t){var e=t.icon;return e?"[object Object]"===Object.prototype.toString.call(e):"string"==typeof t},l=function(t,e){return e.icon||(e.icon=t),!isNaN(e.icon)},h=function(t,r){return s(t)&&"loading"===e.status||function(t){return"loading"===t.status}(r)?(0,f.createVNode)(g.Circle,{class:"".concat(e.resolveClassName("icon")," ").concat(e.resolveClassName("steps-icon")," icon-loading")},null):s(t)&&"error"===e.status||function(t){return"error"===t.status}(r)?(0,f.createVNode)(g.Error,{class:"".concat(e.resolveClassName("steps-icon"))},null):c(t)?(0,f.createVNode)(g.Done,{class:"".concat(e.resolveClassName("steps-icon"))},null):(0,f.createVNode)("span",null,[l(t,r)?t+1:(0,f.createVNode)(r.icon,null,null)])};return(0,f.createVNode)("div",{class:a},[this.defaultSteps.map((function(t,r){var n,o,i;return(0,f.createVNode)("div",{class:[e.resolveClassName("step"),t.title?"":e.resolveClassName("step-no-content"),c(r)?"done":"",s(r)?"current":"",s(r)&&"error"===e.status?"isError":"",t.status&&s(r)?["".concat(e.resolveClassName("step-".concat(t.status)))]:""]},[(0,f.createVNode)("span",{class:["".concat(e.resolveClassName("step-indicator")),"".concat(e.resolveClassName("step-".concat(u(t)?"icon":"number"))),"".concat(e.resolveClassName("step-icon".concat(t.status)))],style:{cursor:e.controllable?"pointer":""},onClick:function(){e.jumpTo(r+1)}},[null!==(i=null===(o=(n=e.$slots)[r+1])||void 0===o?void 0:o.call(n))&&void 0!==i?i:h(r,t)]),t.title?(0,f.createVNode)("div",{class:"".concat(e.resolveClassName("step-content"))},[(0,f.createVNode)("div",{class:"".concat(e.resolveClassName("step-title")),style:{cursor:e.controllable?"pointer":""},onClick:function(){e.jumpTo(r+1)}},[t.title]),t.description&&(0,f.createVNode)("div",{class:"".concat(e.resolveClassName("step-description")),title:t.description},[t.description])]):""])}))])}}),N=(0,i.withInstall)(x)})();var u=s.Z;export{u as default};
|
@@ -11,11 +11,11 @@
|
|
11
11
|
background-color: transparent;
|
12
12
|
}
|
13
13
|
}
|
14
|
-
.bk-
|
15
|
-
.bk-
|
14
|
+
.bk-transition .bk-fade-enter-active,
|
15
|
+
.bk-transition .bk-fade-leave-active {
|
16
16
|
transition: all 0.3s cubic-bezier(0.55, 0, 0.1, 1);
|
17
17
|
}
|
18
|
-
.bk-
|
19
|
-
.bk-
|
18
|
+
.bk-transition .bk-fade-enter,
|
19
|
+
.bk-transition .bk-fade-leave-to {
|
20
20
|
opacity: 0;
|
21
21
|
}
|
@@ -1,3 +1,5 @@
|
|
1
|
+
@import '../themes/themes.less';
|
2
|
+
|
1
3
|
@keyframes loading-scale-animate {
|
2
4
|
0% {
|
3
5
|
transform: scale(1);
|
@@ -13,15 +15,17 @@
|
|
13
15
|
background-color: transparent;
|
14
16
|
}
|
15
17
|
}
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
.bk-fade-leave-active {
|
18
|
+
.fade-transition() {
|
19
|
+
.@{bk-prefix}-fade-enter-active,
|
20
|
+
.@{bk-prefix}-fade-leave-active {
|
20
21
|
transition: all .3s cubic-bezier(.55, 0, .1, 1);
|
21
22
|
}
|
22
23
|
|
23
|
-
|
24
|
-
|
24
|
+
.@{bk-prefix}-fade-enter,
|
25
|
+
.@{bk-prefix}-fade-leave-to {
|
25
26
|
opacity: 0;
|
26
27
|
}
|
27
28
|
}
|
29
|
+
.@{bk-prefix}-transition {
|
30
|
+
.fade-transition();
|
31
|
+
}
|
@@ -1,3 +1,125 @@
|
|
1
|
+
:root {
|
2
|
+
--bk-prefix: bk;
|
3
|
+
--popover-max-height: 216px;
|
4
|
+
--primary-color: #3a84ff;
|
5
|
+
--success-color: #2dcb56;
|
6
|
+
--warning-color: #ff9c01;
|
7
|
+
--danger-color: #ea3636;
|
8
|
+
--default-color: #63656e;
|
9
|
+
--gray-color: #979ba5;
|
10
|
+
--light-gray: #c4c6cc;
|
11
|
+
--white-color: white;
|
12
|
+
--whitesmoke-color: #fafbfd;
|
13
|
+
--disable-color: #dcdee5;
|
14
|
+
--font-size-base: 12px;
|
15
|
+
--font-size-medium: 14px;
|
16
|
+
--font-size-large: 16px;
|
17
|
+
--line-height-base: 16px;
|
18
|
+
--line-height-medium: 16px;
|
19
|
+
--line-height-large: 18px;
|
20
|
+
--component-size-small: 26px;
|
21
|
+
--component-size-base: 32px;
|
22
|
+
--component-size-large: 40px;
|
23
|
+
--border-width-base: 1px;
|
24
|
+
--border-style-base: solid;
|
25
|
+
--border-radius-base: 2px;
|
26
|
+
--border-style-color: var(--light-gray);
|
27
|
+
--input-disabled-bg: #fafbfd;
|
28
|
+
--input-disabled-border: var(--disable-color);
|
29
|
+
--input-height-base: var(--component-size-base);
|
30
|
+
--input-color: var(--default-color);
|
31
|
+
--input-bg: white;
|
32
|
+
--input-border-color: var(--light-gray);
|
33
|
+
--input-broder-radius: 3px;
|
34
|
+
--input-shadow-color: #a3c5fd;
|
35
|
+
--input-horizontal-padding: 10px;
|
36
|
+
--input-block-color: #f5f7fa;
|
37
|
+
--input-block-hover-color: #eaebf0;
|
38
|
+
--input-icon-size: var(--font-size-medium);
|
39
|
+
--input-maxlength-color: #979ba5;
|
40
|
+
--button-primary-hover-color: #5594fa;
|
41
|
+
--button-danger-hover-color: #ff5656;
|
42
|
+
--button-success-hover-color: #45e35f;
|
43
|
+
--button-warning-hover-color: #ffb848;
|
44
|
+
--button-default-hover-border-color: #979ba5;
|
45
|
+
--button-primary-active-color: #2c77f4;
|
46
|
+
--button-danger-active-color: #db2626;
|
47
|
+
--button-success-active-color: #1ab943;
|
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;
|
60
|
+
--fixed-navbar-background: #fff;
|
61
|
+
--fixed-navbar-boxshadow-color: rgba(0, 0, 0, 0.1);
|
62
|
+
--switch-default-color: #fff;
|
63
|
+
--switch-grey-color: #c4c6cc;
|
64
|
+
--breadcrumb-black-color: #979ba5;
|
65
|
+
--breadcrumb-primary-hover-color: #0082ff;
|
66
|
+
--breadcrumb-fn-main-color: #63656e;
|
67
|
+
--link-default-hover-color: #979ba5;
|
68
|
+
--link-primary-hover-color: #699df4;
|
69
|
+
--link-success-hover-color: #45e35f;
|
70
|
+
--link-warning-hover-color: #ffb848;
|
71
|
+
--link-danger-hover-color: #ff5656;
|
72
|
+
--link-default-disabled-color: #dcdee5;
|
73
|
+
--link-primary-disabled-color: #a3c5fd;
|
74
|
+
--link-success-disabled-color: #94f5a4;
|
75
|
+
--link-warning-disabled-color: #ffd695;
|
76
|
+
--link-danger-disabled-color: #fd9c9c;
|
77
|
+
--message-color: var(--default-color);
|
78
|
+
--message-primary-bg-color: #f0f8ff;
|
79
|
+
--message-primary-border-color: #e1ecff;
|
80
|
+
--message-primary-shadow-color: #e1e8f4;
|
81
|
+
--message-warning-bg-color: #fff4e2;
|
82
|
+
--message-warning-border-color: #ffe8c3;
|
83
|
+
--message-warning-shadow-color: #ede6db;
|
84
|
+
--message-success-bg-color: #f2fff4;
|
85
|
+
--message-success-border-color: #dcffe2;
|
86
|
+
--message-success-shadow-color: #cef0d7;
|
87
|
+
--message-danger-bg-color: #ffeded;
|
88
|
+
--message-danger-border-color: #ffdddd;
|
89
|
+
--message-danger-shadow-color: #f6dada;
|
90
|
+
--slider-default-bg: #dcdee5;
|
91
|
+
--slider-disable-bar-bg: #979ba5;
|
92
|
+
--menu-bg-color: #182132;
|
93
|
+
--submenu-bg-color: #151d2c;
|
94
|
+
--menu-active-bg-color: linear-gradient(90deg, #3f87ff 0%, #3a84ff 100%);
|
95
|
+
--menu-color: #96a2b9;
|
96
|
+
--menu-group-color: var(--default-color);
|
97
|
+
--menu-width: 260px;
|
98
|
+
--menu-collapse-width: 60px;
|
99
|
+
--menu-active-color: white;
|
100
|
+
--nav-header-bg-color: #182132;
|
101
|
+
--nav-bg-color: #182132;
|
102
|
+
--date-picker-disabled-bg: #fafbfd;
|
103
|
+
--date-picker-dropdown-mb: 4px;
|
104
|
+
--date-picker-dropdown-bg: #fff;
|
105
|
+
--table-bg-color: var(--white-color);
|
106
|
+
--table-border-color: #dcdee5;
|
107
|
+
--table-head-bg-color: #fafbfd;
|
108
|
+
--table-head-font-color: #313238;
|
109
|
+
--table-body-font-color: #63656E;
|
110
|
+
--table-row-hover-bg-color: #f5f7fa;
|
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);
|
122
|
+
}
|
1
123
|
@keyframes loading-scale-animate {
|
2
124
|
0% {
|
3
125
|
transform: scale(1);
|
@@ -11,11 +133,11 @@
|
|
11
133
|
background-color: transparent;
|
12
134
|
}
|
13
135
|
}
|
14
|
-
.bk-
|
15
|
-
.bk-
|
136
|
+
.bk-transition .bk-fade-enter-active,
|
137
|
+
.bk-transition .bk-fade-leave-active {
|
16
138
|
transition: all 0.3s cubic-bezier(0.55, 0, 0.1, 1);
|
17
139
|
}
|
18
|
-
.bk-
|
19
|
-
.bk-
|
140
|
+
.bk-transition .bk-fade-enter,
|
141
|
+
.bk-transition .bk-fade-leave-to {
|
20
142
|
opacity: 0;
|
21
143
|
}
|
@@ -11,12 +11,12 @@
|
|
11
11
|
background-color: transparent;
|
12
12
|
}
|
13
13
|
}
|
14
|
-
.bk-
|
15
|
-
.bk-
|
14
|
+
.bk-transition .bk-fade-enter-active,
|
15
|
+
.bk-transition .bk-fade-leave-active {
|
16
16
|
transition: all 0.3s cubic-bezier(0.55, 0, 0.1, 1);
|
17
17
|
}
|
18
|
-
.bk-
|
19
|
-
.bk-
|
18
|
+
.bk-transition .bk-fade-enter,
|
19
|
+
.bk-transition .bk-fade-leave-to {
|
20
20
|
opacity: 0;
|
21
21
|
}
|
22
22
|
.clearfix-style::after {
|
@@ -11,12 +11,12 @@
|
|
11
11
|
background-color: transparent;
|
12
12
|
}
|
13
13
|
}
|
14
|
-
.bk-
|
15
|
-
.bk-
|
14
|
+
.bk-transition .bk-fade-enter-active,
|
15
|
+
.bk-transition .bk-fade-leave-active {
|
16
16
|
transition: all 0.3s cubic-bezier(0.55, 0, 0.1, 1);
|
17
17
|
}
|
18
|
-
.bk-
|
19
|
-
.bk-
|
18
|
+
.bk-transition .bk-fade-enter,
|
19
|
+
.bk-transition .bk-fade-leave-to {
|
20
20
|
opacity: 0;
|
21
21
|
}
|
22
22
|
.clearfix-style::after {
|
@@ -1,4 +1,5 @@
|
|
1
1
|
@import '../../styles/themes/themes.less';
|
2
|
+
|
2
3
|
.@{bk-prefix}-popper {
|
3
4
|
display: none;
|
4
5
|
padding: 7px 14px;
|
@@ -36,18 +37,18 @@
|
|
36
37
|
}
|
37
38
|
}
|
38
39
|
|
39
|
-
.@{bk-prefix}-popper[data-popper-placement^='top']
|
40
|
+
.@{bk-prefix}-popper[data-popper-placement^='top']>.@{bk-prefix}-popper-arrow {
|
40
41
|
bottom: -4px;
|
41
42
|
}
|
42
43
|
|
43
|
-
.@{bk-prefix}-popper[data-popper-placement^='bottom']
|
44
|
+
.@{bk-prefix}-popper[data-popper-placement^='bottom']>.@{bk-prefix}-popper-arrow {
|
44
45
|
top: -4px;
|
45
46
|
}
|
46
47
|
|
47
|
-
.@{bk-prefix}-popper[data-popper-placement^='left']
|
48
|
+
.@{bk-prefix}-popper[data-popper-placement^='left']>.@{bk-prefix}-popper-arrow {
|
48
49
|
right: -4px;
|
49
50
|
}
|
50
51
|
|
51
|
-
.@{bk-prefix}-popper[data-popper-placement^='right']
|
52
|
+
.@{bk-prefix}-popper[data-popper-placement^='right']>.@{bk-prefix}-popper-arrow {
|
52
53
|
left: -4px;
|
53
|
-
}
|
54
|
+
}
|
package/lib/swiper/index.d.ts
CHANGED
@@ -11,8 +11,8 @@ declare const BkSwiper: {
|
|
11
11
|
pics?: unknown[];
|
12
12
|
class?: unknown;
|
13
13
|
style?: unknown;
|
14
|
-
key?: string | number | symbol;
|
15
14
|
ref?: import("vue").VNodeRef;
|
15
|
+
key?: string | number | symbol;
|
16
16
|
ref_for?: boolean;
|
17
17
|
ref_key?: string;
|
18
18
|
onVnodeBeforeMount?: ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
package/lib/swiper/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
import*as e from"../shared";import*as n from"vue";import*as t from"../config-provider";var o={d:(e,n)=>{for(var t in n)o.o(n,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n)},r={};o.d(r,{Z:()=>d});const a=(i={PropTypes:()=>e.PropTypes,withInstall:()=>e.withInstall},u={},o.d(u,i),u);var i,u;function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function c(e,n,t){return(n=function(e){var n=function(e,n){if("object"!==l(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!==l(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===l(n)?n:String(n)}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const s=(e=>{var n={};return o.d(n,e),n})({computed:()=>n.computed,createVNode:()=>n.createVNode,defineComponent:()=>n.defineComponent,onBeforeUnmount:()=>n.onBeforeUnmount,onMounted:()=>n.onMounted,ref:()=>n.ref,toRefs:()=>n.toRefs,watch:()=>n.watch}),p=(e=>{var n={};return o.d(n,e),n})({usePrefix:()=>t.usePrefix}),v=(0,s.defineComponent)({name:"Swiper",props:{isLoop:a.PropTypes.bool.def(!0),loopTime:a.PropTypes.number.def(8e3),pics:a.PropTypes.array.def([]),list:a.PropTypes.array.def([]),height:a.PropTypes.number,width:a.PropTypes.number},emits:["index-change"],setup:function(e,n){var t,o=n.emit,r=n.slots,a=(0,s.toRefs)(e),i=a.isLoop,u=a.loopTime,l=a.pics,v=a.list,d=a.height,f=a.width,m=(0,s.ref)(),h=(0,s.ref)(0),w=(0,s.ref)(0),y=(0,s.ref)(0),g=(0,s.ref)(0),b=(0,p.usePrefix)().resolveClassName,P=(0,s.computed)((function(){var e;return(null===(e=v.value)||void 0===e?void 0:e.length)>0?v.value:l.value})),T=(0,s.computed)((function(){return{width:"".concat(w.value*P.value.length,"px"),transform:"translateX(-".concat(w.value*h.value,"px)")}})),x=(0,s.computed)((function(){return{width:"".concat(w.value,"px"),height:"".concat(y.value,"px")}})),N=function(e){var n=e;e>=P.value.length&&(n=0),e<0&&(n=P.value.length-1),h.value=n,o("index-change",n)},V=function(e){return["".concat(b("swiper-img")),c({},"".concat(b("swiper-link")),e.link),e.class]},S=function(e){return{"background-image":"url(".concat(e.url,")"),"background-color":e.color}},k=function(e){return c({},"".concat(b("current-index")),h.value===e)},C=function e(){i.value&&(g.value=window.setTimeout((function(){N(h.value+1),e()}),u.value))},O=function(){var e,n=function(e){if(void 0===e)return{height:0,width:0};var n=getComputedStyle(e),t=e.clientWidth-parseFloat(n.paddingTop)-parseFloat(n.paddingBottom);return{height:e.clientHeight-parseFloat(n.paddingLeft)-parseFloat(n.paddingRight),width:t}}(null===(e=m.value)||void 0===e?void 0:e.parentElement);w.value=+f.value>0?f.value:n.width,y.value=+d.value>0?d.value:n.height};return(0,s.watch)([d,f],O),(0,s.onMounted)((function(){var e,n;O(),C(),(n=null===(e=m.value)||void 0===e?void 0:e.parentElement)&&window.ResizeObserver&&(t=new ResizeObserver((function(){O()}))).observe(n)})),(0,s.onBeforeUnmount)((function(){var e;window.clearTimeout(g.value),null===(e=t.disconnect)||void 0===e||e.call(t)})),function(){return(0,s.createVNode)("section",{class:"".concat(b("swiper-home")),ref:m,style:x.value},[(0,s.createVNode)("hgroup",{style:T.value,class:"".concat(b("transition")," ").concat(b("swiper-main"))},[P.value.map((function(e){var n,t;return(0,s.createVNode)("h3",{class:"".concat(b("swiper-card")),style:x.value},[null!==(t=null===(n=r.default)||void 0===n?void 0:n.call(r,e))&&void 0!==t?t:(0,s.createVNode)("span",{class:V(e),style:S(e),onClick:function(){var n;(n=e.link)&&window.open(n,"_blank")}},null)])}))]),(0,s.createVNode)("ul",{class:"".concat(b("swiper-index"))},[P.value.map((function(e,n){return(0,s.createVNode)("li",{class:k(n),onMouseover:function(){return N(n)}},null)}))]),(0,s.createVNode)("span",{class:"".concat(b("swiper-nav")," ").concat(b("nav-prev")),onClick:function(){return N(h.value-1)}},[(0,s.createVNode)("i",{class:"".concat(b("swiper-nav-icon"))},null)]),(0,s.createVNode)("span",{class:"".concat(b("swiper-nav")," ").concat(b("nav-next")),onClick:function(){return N(h.value+1)}},[(0,s.createVNode)("i",{class:"".concat(b("swiper-nav-icon"))},null)])])}}}),d=(0,a.withInstall)(v);var f=r.Z;export{f as default};
|
package/lib/swiper/swiper.css
CHANGED
@@ -76,16 +76,10 @@
|
|
76
76
|
left: 14px;
|
77
77
|
transform: rotate(45deg);
|
78
78
|
}
|
79
|
-
.bk-swiper-nav.bk-nav-prev:hover {
|
80
|
-
transform: rotate(45deg);
|
81
|
-
}
|
82
79
|
.bk-swiper-nav.bk-nav-next {
|
83
80
|
right: 14px;
|
84
81
|
transform: rotate(225deg);
|
85
82
|
}
|
86
|
-
.bk-swiper-nav.bk-nav-next:hover {
|
87
|
-
transform: rotate(225deg);
|
88
|
-
}
|
89
83
|
.bk-swiper-nav:hover {
|
90
84
|
background: rgba(31, 45, 61, 0.6);
|
91
85
|
}
|
package/lib/swiper/swiper.less
CHANGED
@@ -88,19 +88,11 @@
|
|
88
88
|
&.@{bk-prefix}-nav-prev {
|
89
89
|
left: 14px;
|
90
90
|
transform: rotate(45deg);
|
91
|
-
|
92
|
-
&:hover {
|
93
|
-
transform: rotate(45deg);
|
94
|
-
}
|
95
91
|
}
|
96
92
|
|
97
93
|
&.@{bk-prefix}-nav-next {
|
98
94
|
right: 14px;
|
99
95
|
transform: rotate(225deg);
|
100
|
-
|
101
|
-
&:hover {
|
102
|
-
transform: rotate(225deg);
|
103
|
-
}
|
104
96
|
}
|
105
97
|
|
106
98
|
&:hover {
|
@@ -198,16 +198,10 @@
|
|
198
198
|
left: 14px;
|
199
199
|
transform: rotate(45deg);
|
200
200
|
}
|
201
|
-
.bk-swiper-nav.bk-nav-prev:hover {
|
202
|
-
transform: rotate(45deg);
|
203
|
-
}
|
204
201
|
.bk-swiper-nav.bk-nav-next {
|
205
202
|
right: 14px;
|
206
203
|
transform: rotate(225deg);
|
207
204
|
}
|
208
|
-
.bk-swiper-nav.bk-nav-next:hover {
|
209
|
-
transform: rotate(225deg);
|
210
|
-
}
|
211
205
|
.bk-swiper-nav:hover {
|
212
206
|
background: rgba(31, 45, 61, 0.6);
|
213
207
|
}
|