@opentiny/vue-renderless 3.11.8 → 3.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/anchor/index.js +13 -6
- package/anchor/vue.js +1 -1
- package/breadcrumb/index.js +6 -1
- package/breadcrumb-item/index.js +8 -1
- package/calendar-bar/index.js +295 -68
- package/calendar-bar/vue.js +82 -8
- package/calendar-view/index.js +2 -2
- package/card/index.js +4 -4
- package/card/vue.js +2 -3
- package/card-group/vue.js +3 -7
- package/carousel/index.js +26 -27
- package/carousel/vue.js +41 -46
- package/carousel-item/index.js +9 -6
- package/carousel-item/vue.js +4 -4
- package/cascader-mobile/index.js +5 -1
- package/cascader-mobile/vue.js +2 -1
- package/cascader-panel/index.js +6 -2
- package/cascader-view/index.js +363 -0
- package/cascader-view/vue.js +130 -0
- package/chart-core/deps/constants.js +27 -0
- package/chart-core/deps/numerify.js +27 -28
- package/chart-core/index.js +122 -31
- package/chart-core/vue.js +12 -8
- package/chart-radar/index.js +2 -2
- package/checkbox-button/vue.js +8 -1
- package/checkbox-group/vue.js +4 -5
- package/col/index.js +3 -2
- package/col/vue.js +1 -1
- package/collapse-item/index.js +14 -2
- package/color-picker/index.js +24 -34
- package/color-picker/utils/color.js +7 -1
- package/color-picker/vue.js +39 -26
- package/color-select-panel/alpha-select/vue.js +5 -8
- package/color-select-panel/hue-select/index.js +4 -2
- package/color-select-panel/hue-select/vue.js +11 -10
- package/color-select-panel/index.js +29 -17
- package/color-select-panel/utils/color.js +5 -0
- package/color-select-panel/vue.js +16 -7
- package/column-list-item/index.js +19 -5
- package/column-list-item/vue.js +16 -14
- package/common/bigInt.js +1 -1
- package/common/deps/dom.js +37 -5
- package/common/deps/repeat-click.js +3 -2
- package/common/deps/touch-emulator.js +95 -0
- package/common/deps/touch.js +12 -11
- package/common/deps/useEventListener.js +47 -0
- package/common/deps/useTouch.js +68 -0
- package/common/deps/vue-popper.js +2 -3
- package/common/index.js +1 -1
- package/common/runtime.js +1 -1
- package/common/string.js +20 -9
- package/date-picker/index.js +24 -4
- package/date-picker-mobile/index.js +5 -1
- package/file-upload/index.js +148 -50
- package/file-upload/vue.js +24 -6
- package/filter/index.js +2 -1
- package/filter/vue.js +1 -1
- package/form-item/index.js +24 -21
- package/form-item/vue.js +14 -12
- package/grid/plugins/export.js +0 -8
- package/grid/utils/common.js +13 -16
- package/image-viewer/index.js +1 -1
- package/ip-address/index.js +6 -3
- package/menu/index.js +127 -0
- package/menu/vue.js +90 -0
- package/menu-node/index.js +12 -0
- package/menu-node/vue.js +42 -0
- package/modal/index.js +6 -0
- package/modal/vue.js +3 -1
- package/numeric/index.js +18 -2
- package/numeric/vue.js +11 -7
- package/package.json +1 -1
- package/popconfirm/index.js +15 -6
- package/popconfirm/vue.js +5 -4
- package/pull-refresh-mobile-first/index.js +243 -0
- package/pull-refresh-mobile-first/vue.js +116 -0
- package/qr-code/index.js +54 -0
- package/qr-code/vue.js +31 -0
- package/radio/index.js +9 -7
- package/radio/vue.js +4 -4
- package/radio-button/index.js +2 -2
- package/radio-button/vue.js +2 -2
- package/radio-group/vue.js +1 -0
- package/rich-text-edtior/index.js +18 -38
- package/rich-text-edtior/vue.js +52 -63
- package/select/index.js +11 -7
- package/slide-bar/index.js +6 -6
- package/slide-bar/vue.js +5 -5
- package/slider/index.js +47 -14
- package/slider/vue.js +25 -6
- package/slider-button/index.js +5 -1
- package/slider-button/vue.js +1 -0
- package/slider-button-group/index.js +15 -0
- package/slider-button-group/vue.js +8 -11
- package/standard-list-item/index.js +9 -3
- package/standard-list-item/vue.js +3 -2
- package/switch/index.js +11 -9
- package/switch/vue.js +1 -1
- package/tab-bar/index.js +1 -1
- package/tab-bar/vue.js +2 -1
- package/tab-nav/index.js +31 -31
- package/tab-nav/vue.js +13 -12
- package/tabs/vue.js +3 -1
- package/tabs-mf/index.js +14 -9
- package/tabs-mf/vue-bar.js +3 -2
- package/tabs-mf/vue-nav-item.js +2 -1
- package/tabs-mf/vue-nav.js +18 -2
- package/tabs-mf/vue.js +3 -1
- package/tag/index.js +1 -1
- package/toast/index.js +7 -0
- package/toast/vue.js +19 -0
- package/transfer/index.js +2 -2
- package/transfer/vue.js +1 -1
- package/tree-node/index.js +1 -1
- package/types/{action-menu.type.d.mts → action-menu.type.d.ts} +3 -3
- package/types/{alert.type.d.mts → alert.type.d.ts} +2 -1
- package/types/{anchor.type.d.mts → anchor.type.d.ts} +3 -3
- package/types/{badge.type.d.mts → badge.type.d.ts} +1 -1
- package/types/{breadcrumb-item.type.d.mts → breadcrumb-item.type.d.ts} +1 -1
- package/types/{breadcrumb.type.d.mts → breadcrumb.type.d.ts} +1 -1
- package/types/{button-group.type.d.mts → button-group.type.d.ts} +1 -1
- package/types/{button.type.d.mts → button.type.d.ts} +1 -1
- package/types/{cascader-menu.type.d.mts → cascader-menu.type.d.ts} +4 -4
- package/types/{cascader-node.type.d.mts → cascader-node.type.d.ts} +4 -4
- package/types/{cascader-panel.type.d.mts → cascader-panel.type.d.ts} +6 -6
- package/types/{checkbox.type.d.mts → checkbox.type.d.ts} +2 -1
- package/types/{collapse-item.type.d.mts → collapse-item.type.d.ts} +1 -1
- package/types/{collapse.type.d.mts → collapse.type.d.ts} +1 -1
- package/types/{color-picker.type.d.mts → color-picker.type.d.ts} +2 -2
- package/types/{color-select-panel.type.d.mts → color-select-panel.type.d.ts} +2 -2
- package/types/{date-picker.type.d.mts → date-picker.type.d.ts} +6 -2
- package/types/{dialog-box.type.d.mts → dialog-box.type.d.ts} +9 -9
- package/types/{dropdown-item.type-77f0c8c5.d.ts → dropdown-item.type-bf83e929.d.ts} +4 -4
- package/types/{dropdown-item.type.d.mts → dropdown-item.type.d.ts} +3 -3
- package/types/{dropdown-menu.type.d.mts → dropdown-menu.type.d.ts} +3 -3
- package/types/{dropdown.type.d.mts → dropdown.type.d.ts} +1 -1
- package/types/{file-upload.type.d.mts → file-upload.type.d.ts} +2 -2
- package/types/{floatbar.type.d.mts → floatbar.type.d.ts} +7 -7
- package/types/{form-item.type.d.mts → form-item.type.d.ts} +2 -2
- package/types/{form.type-1e2e9272.d.ts → form.type-d0fd42f3.d.ts} +20 -7
- package/types/{form.type.d.mts → form.type.d.ts} +2 -2
- package/types/{image.type.d.mts → image.type.d.ts} +1 -1
- package/types/{input.type.d.mts → input.type.d.ts} +10 -2
- package/types/{link.type.d.mts → link.type.d.ts} +1 -1
- package/types/{loading.type.d.mts → loading.type.d.ts} +1 -1
- package/types/{milestone.type.d.mts → milestone.type.d.ts} +1 -1
- package/types/{modal.type.d.mts → modal.type.d.ts} +18 -19
- package/types/{nav-menu.type.d.mts → nav-menu.type.d.ts} +1 -1
- package/types/{numeric.type.d.mts → numeric.type.d.ts} +9 -3
- package/types/{picker.type.d.mts → picker.type.d.ts} +5 -1
- package/types/{popeditor.type.d.mts → popeditor.type.d.ts} +1 -1
- package/types/{popover.type.d.mts → popover.type.d.ts} +1 -1
- package/types/{progress.type.d.mts → progress.type.d.ts} +1 -1
- package/types/{radio-button.type.d.mts → radio-button.type.d.ts} +3 -3
- package/types/{radio-group.type.d.mts → radio-group.type.d.ts} +5 -1
- package/types/{radio.type.d.mts → radio.type.d.ts} +2 -2
- package/types/{search.type.d.mts → search.type.d.ts} +1 -1
- package/types/{shared.type.d.mts → shared.type.d.ts} +7 -7
- package/types/{slider.type.d.mts → slider.type.d.ts} +1 -1
- package/types/{steps.type.d.mts → steps.type.d.ts} +6 -1
- package/types/{switch.type.d.mts → switch.type.d.ts} +5 -1
- package/types/{tab-bar.type.d.mts → tab-bar.type.d.ts} +3 -2
- package/types/{tab-item.type.d.mts → tab-item.type.d.ts} +2 -2
- package/types/{tab-nav.type.d.mts → tab-nav.type.d.ts} +13 -12
- package/types/{tabs.type.d.mts → tabs.type.d.ts} +6 -4
- package/types/{tag.type.d.mts → tag.type.d.ts} +1 -1
- package/types/{time-line.type-5f76ecc2.d.ts → time-line.type-d7daa669.d.ts} +1 -1
- package/types/{time-line.type.d.mts → time-line.type.d.ts} +2 -2
- package/types/{timeline-item.type.d.mts → timeline-item.type.d.ts} +2 -2
- package/types/toast.type.d.ts +63 -0
- package/types/{tooltip.type.d.mts → tooltip.type.d.ts} +2 -9
- package/types/{upload-dragger.type.d.mts → upload-dragger.type.d.ts} +2 -2
- package/types/{upload-list.type-b934f279.d.ts → upload-list.type-343e8c11.d.ts} +45 -7
- package/types/{upload-list.type.d.mts → upload-list.type.d.ts} +2 -2
- package/types/{upload.type.d.mts → upload.type.d.ts} +2 -2
- package/types/watermark.type.d.ts +33 -0
- package/types/{wizard.type.d.mts → wizard.type.d.ts} +1 -1
- package/upload/index.js +1 -1
- package/upload-list/index.js +3 -2
- package/upload-list/vue.js +12 -2
- package/watermark/index.js +202 -0
- package/watermark/vue.js +27 -0
- package/wizard/index.js +5 -5
- package/card-group/index.js +0 -16
- package/color-picker/alpha-select/index.js +0 -20
- package/color-picker/alpha-select/vue.js +0 -60
- package/color-picker/color-select/index.js +0 -69
- package/color-picker/color-select/vue.js +0 -57
- package/color-picker/utils/use-drag.js +0 -38
- /package/types/{action-sheet.type.d.mts → action-sheet.type.d.ts} +0 -0
- /package/types/{amount.type.d.mts → amount.type.d.ts} +0 -0
- /package/types/{area.type.d.mts → area.type.d.ts} +0 -0
- /package/types/{autocomplete.type.d.mts → autocomplete.type.d.ts} +0 -0
- /package/types/{autonavi-map.type.d.mts → autonavi-map.type.d.ts} +0 -0
- /package/types/{avatar.type.d.mts → avatar.type.d.ts} +0 -0
- /package/types/{baidu-map.type.d.mts → baidu-map.type.d.ts} +0 -0
- /package/types/{bulletin-board.type.d.mts → bulletin-board.type.d.ts} +0 -0
- /package/types/{calendar-bar.type.d.mts → calendar-bar.type.d.ts} +0 -0
- /package/types/{calendar.type.d.mts → calendar.type.d.ts} +0 -0
- /package/types/{card-group.type.d.mts → card-group.type.d.ts} +0 -0
- /package/types/{card-template.type.d.mts → card-template.type.d.ts} +0 -0
- /package/types/{card.type.d.mts → card.type.d.ts} +0 -0
- /package/types/{carousel-item.type.d.mts → carousel-item.type.d.ts} +0 -0
- /package/types/{carousel.type.d.mts → carousel.type.d.ts} +0 -0
- /package/types/{cascader-mobile.type.d.mts → cascader-mobile.type.d.ts} +0 -0
- /package/types/{cascader-select.type.d.mts → cascader-select.type.d.ts} +0 -0
- /package/types/{cascader.type.d.mts → cascader.type.d.ts} +0 -0
- /package/types/{cell.type.d.mts → cell.type.d.ts} +0 -0
- /package/types/{chart-bar.type.d.mts → chart-bar.type.d.ts} +0 -0
- /package/types/{chart-boxplot.type.d.mts → chart-boxplot.type.d.ts} +0 -0
- /package/types/{chart-candle.type.d.mts → chart-candle.type.d.ts} +0 -0
- /package/types/{chart-core.type.d.mts → chart-core.type.d.ts} +0 -0
- /package/types/{chart-funnel.type.d.mts → chart-funnel.type.d.ts} +0 -0
- /package/types/{chart-gauge.type.d.mts → chart-gauge.type.d.ts} +0 -0
- /package/types/{chart-graph.type.d.mts → chart-graph.type.d.ts} +0 -0
- /package/types/{chart-heatmap.type.d.mts → chart-heatmap.type.d.ts} +0 -0
- /package/types/{chart-line.type.d.mts → chart-line.type.d.ts} +0 -0
- /package/types/{chart-liquidfill.type.d.mts → chart-liquidfill.type.d.ts} +0 -0
- /package/types/{chart-map.type.d.mts → chart-map.type.d.ts} +0 -0
- /package/types/{chart-pie.type.d.mts → chart-pie.type.d.ts} +0 -0
- /package/types/{chart-radar.type.d.mts → chart-radar.type.d.ts} +0 -0
- /package/types/{chart-sankey.type.d.mts → chart-sankey.type.d.ts} +0 -0
- /package/types/{chart-scatter.type.d.mts → chart-scatter.type.d.ts} +0 -0
- /package/types/{chart-sunburst.type.d.mts → chart-sunburst.type.d.ts} +0 -0
- /package/types/{chart-tree.type.d.mts → chart-tree.type.d.ts} +0 -0
- /package/types/{chart-waterfall.type.d.mts → chart-waterfall.type.d.ts} +0 -0
- /package/types/{chart-wordcloud.type.d.mts → chart-wordcloud.type.d.ts} +0 -0
- /package/types/{checkbox-button.type.d.mts → checkbox-button.type.d.ts} +0 -0
- /package/types/{checkbox-group.type.d.mts → checkbox-group.type.d.ts} +0 -0
- /package/types/{col.type.d.mts → col.type.d.ts} +0 -0
- /package/types/{column-list-group.type.d.mts → column-list-group.type.d.ts} +0 -0
- /package/types/{column-list-item.type.d.mts → column-list-item.type.d.ts} +0 -0
- /package/types/{common.type.d.mts → common.type.d.ts} +0 -0
- /package/types/{company.type.d.mts → company.type.d.ts} +0 -0
- /package/types/{container.type.d.mts → container.type.d.ts} +0 -0
- /package/types/{country.type.d.mts → country.type.d.ts} +0 -0
- /package/types/{credit-card-form.type.d.mts → credit-card-form.type.d.ts} +0 -0
- /package/types/{credit-card.type.d.mts → credit-card.type.d.ts} +0 -0
- /package/types/{crop.type.d.mts → crop.type.d.ts} +0 -0
- /package/types/{currency.type.d.mts → currency.type.d.ts} +0 -0
- /package/types/{date-panel.type.d.mts → date-panel.type.d.ts} +0 -0
- /package/types/{date-picker-mobile.type.d.mts → date-picker-mobile.type.d.ts} +0 -0
- /package/types/{date-range.type.d.mts → date-range.type.d.ts} +0 -0
- /package/types/{date-table.type.d.mts → date-table.type.d.ts} +0 -0
- /package/types/{dept.type.d.mts → dept.type.d.ts} +0 -0
- /package/types/{detail-page.type.d.mts → detail-page.type.d.ts} +0 -0
- /package/types/{dialog-select.type.d.mts → dialog-select.type.d.ts} +0 -0
- /package/types/{drawer.type.d.mts → drawer.type.d.ts} +0 -0
- /package/types/{drop-roles.type.d.mts → drop-roles.type.d.ts} +0 -0
- /package/types/{drop-times.type.d.mts → drop-times.type.d.ts} +0 -0
- /package/types/{dynamic-scroller-item.type.d.mts → dynamic-scroller-item.type.d.ts} +0 -0
- /package/types/{dynamic-scroller.type.d.mts → dynamic-scroller.type.d.ts} +0 -0
- /package/types/{espace.type.d.mts → espace.type.d.ts} +0 -0
- /package/types/{exception.type.d.mts → exception.type.d.ts} +0 -0
- /package/types/{fall-menu.type.d.mts → fall-menu.type.d.ts} +0 -0
- /package/types/{filter-bar.type.d.mts → filter-bar.type.d.ts} +0 -0
- /package/types/{filter-box.type.d.mts → filter-box.type.d.ts} +0 -0
- /package/types/{filter-panel.type.d.mts → filter-panel.type.d.ts} +0 -0
- /package/types/{filter.type.d.mts → filter.type.d.ts} +0 -0
- /package/types/{floating-button.type.d.mts → floating-button.type.d.ts} +0 -0
- /package/types/{flowchart.type.d.mts → flowchart.type.d.ts} +0 -0
- /package/types/{fullscreen.type.d.mts → fullscreen.type.d.ts} +0 -0
- /package/types/{grid.type.d.mts → grid.type.d.ts} +0 -0
- /package/types/{guide.type.d.mts → guide.type.d.ts} +0 -0
- /package/types/{hrapprover.type.d.mts → hrapprover.type.d.ts} +0 -0
- /package/types/{image-viewer.type.d.mts → image-viewer.type.d.ts} +0 -0
- /package/types/{index-bar-anchor.type.d.mts → index-bar-anchor.type.d.ts} +0 -0
- /package/types/{index-bar.type.d.mts → index-bar.type.d.ts} +0 -0
- /package/types/{ip-address.type.d.mts → ip-address.type.d.ts} +0 -0
- /package/types/{layout.type.d.mts → layout.type.d.ts} +0 -0
- /package/types/{link-menu.type.d.mts → link-menu.type.d.ts} +0 -0
- /package/types/{list.type.d.mts → list.type.d.ts} +0 -0
- /package/types/{locales.type.d.mts → locales.type.d.ts} +0 -0
- /package/types/{logon-user.type.d.mts → logon-user.type.d.ts} +0 -0
- /package/types/{logout.type.d.mts → logout.type.d.ts} +0 -0
- /package/types/{mini-picker.type.d.mts → mini-picker.type.d.ts} +0 -0
- /package/types/{month-range.type.d.mts → month-range.type.d.ts} +0 -0
- /package/types/{month-table.type.d.mts → month-table.type.d.ts} +0 -0
- /package/types/{multi-select.type.d.mts → multi-select.type.d.ts} +0 -0
- /package/types/{notify.type.d.mts → notify.type.d.ts} +0 -0
- /package/types/{option-group.type.d.mts → option-group.type.d.ts} +0 -0
- /package/types/{option.type.d.mts → option.type.d.ts} +0 -0
- /package/types/{pager-item.type.d.mts → pager-item.type.d.ts} +0 -0
- /package/types/{pager.type.d.mts → pager.type.d.ts} +0 -0
- /package/types/{panel.type.d.mts → panel.type.d.ts} +0 -0
- /package/types/{picker-column.type.d.mts → picker-column.type.d.ts} +0 -0
- /package/types/{pop-upload.type.d.mts → pop-upload.type.d.ts} +0 -0
- /package/types/{popconfirm.type.d.mts → popconfirm.type.d.ts} +0 -0
- /package/types/{popup.type.d.mts → popup.type.d.ts} +0 -0
- /package/types/{pull-refresh.type.d.mts → pull-refresh.type.d.ts} +0 -0
- /package/types/{query-builder.type.d.mts → query-builder.type.d.ts} +0 -0
- /package/types/{rate.type.d.mts → rate.type.d.ts} +0 -0
- /package/types/{record.type.d.mts → record.type.d.ts} +0 -0
- /package/types/{recycle-scroller.type.d.mts → recycle-scroller.type.d.ts} +0 -0
- /package/types/{river.type.d.mts → river.type.d.ts} +0 -0
- /package/types/{roles.type.d.mts → roles.type.d.ts} +0 -0
- /package/types/{row.type.d.mts → row.type.d.ts} +0 -0
- /package/types/{scroll-text.type.d.mts → scroll-text.type.d.ts} +0 -0
- /package/types/{scrollbar.type.d.mts → scrollbar.type.d.ts} +0 -0
- /package/types/{select-dropdown.type.d.mts → select-dropdown.type.d.ts} +0 -0
- /package/types/{select-mobile.type.d.mts → select-mobile.type.d.ts} +0 -0
- /package/types/{select-view.type.d.mts → select-view.type.d.ts} +0 -0
- /package/types/{select.type.d.mts → select.type.d.ts} +0 -0
- /package/types/{selected-box.type.d.mts → selected-box.type.d.ts} +0 -0
- /package/types/{slide-bar.type.d.mts → slide-bar.type.d.ts} +0 -0
- /package/types/{slider-button-group.type.d.mts → slider-button-group.type.d.ts} +0 -0
- /package/types/{slider-button.type.d.mts → slider-button.type.d.ts} +0 -0
- /package/types/{split.type.d.mts → split.type.d.ts} +0 -0
- /package/types/{standard-list-item.type.d.mts → standard-list-item.type.d.ts} +0 -0
- /package/types/{tab-dropdown.type.d.mts → tab-dropdown.type.d.ts} +0 -0
- /package/types/{tab-item-mf.type.d.mts → tab-item-mf.type.d.ts} +0 -0
- /package/types/{tabbar-item.type.d.mts → tabbar-item.type.d.ts} +0 -0
- /package/types/{tabbar.type.d.mts → tabbar.type.d.ts} +0 -0
- /package/types/{table.type.d.mts → table.type.d.ts} +0 -0
- /package/types/{tabs-mf.type.d.mts → tabs-mf.type.d.ts} +0 -0
- /package/types/{tag-group.type.d.mts → tag-group.type.d.ts} +0 -0
- /package/types/{tall-storage.type.d.mts → tall-storage.type.d.ts} +0 -0
- /package/types/{text-popup.type.d.mts → text-popup.type.d.ts} +0 -0
- /package/types/{time-panel.type.d.mts → time-panel.type.d.ts} +0 -0
- /package/types/{time-picker-mobile.type.d.mts → time-picker-mobile.type.d.ts} +0 -0
- /package/types/{time-range.type.d.mts → time-range.type.d.ts} +0 -0
- /package/types/{time-spinner.type.d.mts → time-spinner.type.d.ts} +0 -0
- /package/types/{time.type.d.mts → time.type.d.ts} +0 -0
- /package/types/{toggle-menu.type.d.mts → toggle-menu.type.d.ts} +0 -0
- /package/types/{top-box.type.d.mts → top-box.type.d.ts} +0 -0
- /package/types/{transfer-panel.type.d.mts → transfer-panel.type.d.ts} +0 -0
- /package/types/{transfer.type.d.mts → transfer.type.d.ts} +0 -0
- /package/types/{tree-menu.type.d.mts → tree-menu.type.d.ts} +0 -0
- /package/types/{tree-node.type.d.mts → tree-node.type.d.ts} +0 -0
- /package/types/{tree.type.d.mts → tree.type.d.ts} +0 -0
- /package/types/{user-account.type.d.mts → user-account.type.d.ts} +0 -0
- /package/types/{user-contact.type.d.mts → user-contact.type.d.ts} +0 -0
- /package/types/{user-head-group.type.d.mts → user-head-group.type.d.ts} +0 -0
- /package/types/{user-head.type.d.mts → user-head.type.d.ts} +0 -0
- /package/types/{user-link.type.d.mts → user-link.type.d.ts} +0 -0
- /package/types/{user.type.d.mts → user.type.d.ts} +0 -0
- /package/types/{wheel.type.d.mts → wheel.type.d.ts} +0 -0
- /package/types/{year-range.type.d.mts → year-range.type.d.ts} +0 -0
- /package/types/{year-table.type.d.mts → year-table.type.d.ts} +0 -0
package/qr-code/vue.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import "../chunk-G2ADBYYC.js";
|
|
2
|
+
import { change, draw } from ".";
|
|
3
|
+
const api = ["state"];
|
|
4
|
+
const renderless = (props, { reactive, watch, onMounted }, { vm, emit }, { QRCode }) => {
|
|
5
|
+
const api2 = {};
|
|
6
|
+
const state = reactive({
|
|
7
|
+
sizeStr: "",
|
|
8
|
+
iconSizeStr: "",
|
|
9
|
+
iconBackgroudColor: ""
|
|
10
|
+
});
|
|
11
|
+
Object.assign(api2, {
|
|
12
|
+
state,
|
|
13
|
+
draw: draw({ props, state, vm, QRCode }),
|
|
14
|
+
change: change(emit)
|
|
15
|
+
});
|
|
16
|
+
onMounted(() => {
|
|
17
|
+
api2.draw();
|
|
18
|
+
});
|
|
19
|
+
watch(
|
|
20
|
+
() => [props.level, props.value],
|
|
21
|
+
() => {
|
|
22
|
+
api2.draw();
|
|
23
|
+
api2.change();
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
return api2;
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
api,
|
|
30
|
+
renderless
|
|
31
|
+
};
|
package/radio/index.js
CHANGED
|
@@ -43,7 +43,7 @@ const setModel = ({
|
|
|
43
43
|
dispatch,
|
|
44
44
|
emit,
|
|
45
45
|
props,
|
|
46
|
-
|
|
46
|
+
vm,
|
|
47
47
|
state
|
|
48
48
|
}) => (val) => {
|
|
49
49
|
if (state.isGroup) {
|
|
@@ -51,13 +51,15 @@ const setModel = ({
|
|
|
51
51
|
} else {
|
|
52
52
|
emit("update:modelValue", val);
|
|
53
53
|
}
|
|
54
|
-
refs.radio && (refs.radio.checked = state.model === props.label);
|
|
54
|
+
vm.$refs.radio && (vm.$refs.radio.checked = state.model === props.label);
|
|
55
55
|
};
|
|
56
|
-
const toggleEvent = ({ props,
|
|
57
|
-
const radioEl = refs.radio;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
const toggleEvent = ({ props, vm, type }) => {
|
|
57
|
+
const radioEl = vm.$refs.radio;
|
|
58
|
+
if (radioEl) {
|
|
59
|
+
Object.keys(props.events).forEach((ev) => {
|
|
60
|
+
radioEl[type + "EventListener"](ev, props.events[ev]);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
61
63
|
};
|
|
62
64
|
const dispatchDisplayedValue = ({ state, dispatch, api }) => () => {
|
|
63
65
|
if (state.isDisplayOnly) {
|
package/radio/vue.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
getDisplayedValue
|
|
14
14
|
} from "./index";
|
|
15
15
|
const api = ["state", "handleChange"];
|
|
16
|
-
const renderless = (props, { onMounted, onBeforeUnmount, computed, reactive, inject, watch }, {
|
|
16
|
+
const renderless = (props, { onMounted, onBeforeUnmount, computed, reactive, inject, watch }, { vm, parent, emit, constants, nextTick, dispatch }) => {
|
|
17
17
|
parent.tinyForm = parent.tinyForm || inject("form", null);
|
|
18
18
|
const api2 = {};
|
|
19
19
|
const state = reactive({
|
|
@@ -40,7 +40,7 @@ const renderless = (props, { onMounted, onBeforeUnmount, computed, reactive, inj
|
|
|
40
40
|
tabIndex: tabIndex({ props, state }),
|
|
41
41
|
isDisabled: isDisabled({ props, state }),
|
|
42
42
|
isDisplayOnly: isDisplayOnly({ props }),
|
|
43
|
-
setModel: setModel({ constants, dispatch, emit, props,
|
|
43
|
+
setModel: setModel({ constants, dispatch, emit, props, vm, state }),
|
|
44
44
|
handleChange: handleChange({ constants, dispatch, emit, state, nextTick }),
|
|
45
45
|
dispatchDisplayedValue: dispatchDisplayedValue({ state, api: api2, dispatch }),
|
|
46
46
|
getDisplayedValue: getDisplayedValue({ vm, state, props })
|
|
@@ -49,10 +49,10 @@ const renderless = (props, { onMounted, onBeforeUnmount, computed, reactive, inj
|
|
|
49
49
|
onMounted(() => {
|
|
50
50
|
api2.dispatchDisplayedValue();
|
|
51
51
|
dispatch("Tooltip", "tooltip-update");
|
|
52
|
-
toggleEvent({ props,
|
|
52
|
+
toggleEvent({ props, vm, type: "add" });
|
|
53
53
|
});
|
|
54
54
|
onBeforeUnmount(() => {
|
|
55
|
-
toggleEvent({ props,
|
|
55
|
+
toggleEvent({ props, vm, type: "remove" });
|
|
56
56
|
});
|
|
57
57
|
return api2;
|
|
58
58
|
};
|
package/radio-button/index.js
CHANGED
|
@@ -37,8 +37,8 @@ const getStyle = (state) => () => {
|
|
|
37
37
|
color: ((_d = state.radioGroup) == null ? void 0 : _d.textColor) || ""
|
|
38
38
|
};
|
|
39
39
|
};
|
|
40
|
-
const toggleEvents = ({
|
|
41
|
-
const radioEl = refs.radio;
|
|
40
|
+
const toggleEvents = ({ vm, props }) => (isUnBind = false) => {
|
|
41
|
+
const radioEl = vm.$refs.radio;
|
|
42
42
|
Object.keys(props.events).forEach((ev) => {
|
|
43
43
|
radioEl[(isUnBind ? "remove" : "add") + "EventListener"](ev, props.events[ev]);
|
|
44
44
|
});
|
package/radio-button/vue.js
CHANGED
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
handleBlur
|
|
12
12
|
} from "./index";
|
|
13
13
|
const api = ["state", "handleChange", "keydownHandle", "handleFocus", "handleBlur"];
|
|
14
|
-
const renderless = (props, { computed, reactive, onMounted, onBeforeUnmount, inject }, {
|
|
14
|
+
const renderless = (props, { computed, reactive, onMounted, onBeforeUnmount, inject }, { parent, dispatch, constants, nextTick, vm }) => {
|
|
15
15
|
const api2 = {
|
|
16
16
|
getGroup: getGroup({ constants, parent }),
|
|
17
|
-
toggleEvents: toggleEvents({
|
|
17
|
+
toggleEvents: toggleEvents({ vm, props })
|
|
18
18
|
};
|
|
19
19
|
const state = reactive({
|
|
20
20
|
focus: false,
|
package/radio-group/vue.js
CHANGED
|
@@ -53,42 +53,22 @@ const setLink = (editor) => {
|
|
|
53
53
|
editor.chain().focus().extendMarkRange("link").setLink({ href: url }).run();
|
|
54
54
|
};
|
|
55
55
|
};
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
state.flagY = Math.ceil((e.y - y) / 30);
|
|
61
|
-
};
|
|
56
|
+
const tableMouseMove = (state, vm) => (e) => {
|
|
57
|
+
let { x, y } = vm.$refs.tablePanelRef[0].getBoundingClientRect();
|
|
58
|
+
state.flagX = Math.ceil((e.x - x) / 30);
|
|
59
|
+
state.flagY = Math.ceil((e.y - y) / 30);
|
|
62
60
|
};
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
removeClickOutside(state, box)();
|
|
69
|
-
}
|
|
70
|
-
};
|
|
61
|
+
const tableChoose = (state, vm) => (e) => {
|
|
62
|
+
if (state.flagX && state.flagY) {
|
|
63
|
+
state.editor.chain().focus().insertTable({ rows: state.flagY, cols: state.flagX, withHeaderRow: true }).run();
|
|
64
|
+
}
|
|
65
|
+
state.isShowTable = false;
|
|
71
66
|
};
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
window.removeEventListener("click", handleClickOutside(state, box));
|
|
75
|
-
};
|
|
67
|
+
const toggleTablePanel = (state) => () => {
|
|
68
|
+
state.isShowTable = !state.isShowTable;
|
|
76
69
|
};
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
e.stopPropagation();
|
|
80
|
-
if (state.isShow) {
|
|
81
|
-
if (state.flagX && state.flagY) {
|
|
82
|
-
state.editor.chain().focus().insertTable({ rows: state.flagY, cols: state.flagX, withHeaderRow: true }).run();
|
|
83
|
-
}
|
|
84
|
-
state.flagX = 0;
|
|
85
|
-
state.flagY = 0;
|
|
86
|
-
removeClickOutside(state, box)();
|
|
87
|
-
} else {
|
|
88
|
-
window.addEventListener("click", handleClickOutside(state, box));
|
|
89
|
-
}
|
|
90
|
-
state.isShow = !state.isShow;
|
|
91
|
-
};
|
|
70
|
+
const closeTablePanel = (state) => () => {
|
|
71
|
+
state.isShowTable && (state.isShowTable = false);
|
|
92
72
|
};
|
|
93
73
|
const shouldShow = ({ editor, view, state, oldState, from, to }) => {
|
|
94
74
|
return editor.isActive("table");
|
|
@@ -242,13 +222,13 @@ const Active = (item) => {
|
|
|
242
222
|
};
|
|
243
223
|
export {
|
|
244
224
|
Active,
|
|
225
|
+
closeTablePanel,
|
|
245
226
|
eventClick,
|
|
246
227
|
eventImg,
|
|
247
228
|
handleChange,
|
|
248
|
-
handleClick,
|
|
249
|
-
handleClickOutside,
|
|
250
|
-
handleMove,
|
|
251
|
-
removeClickOutside,
|
|
252
229
|
setLink,
|
|
253
|
-
shouldShow
|
|
230
|
+
shouldShow,
|
|
231
|
+
tableChoose,
|
|
232
|
+
tableMouseMove,
|
|
233
|
+
toggleTablePanel
|
|
254
234
|
};
|
package/rich-text-edtior/vue.js
CHANGED
|
@@ -5,32 +5,29 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
handleChange,
|
|
7
7
|
setLink,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
tableMouseMove,
|
|
9
|
+
tableChoose,
|
|
10
|
+
toggleTablePanel,
|
|
11
|
+
closeTablePanel,
|
|
12
12
|
shouldShow,
|
|
13
13
|
eventImg,
|
|
14
14
|
eventClick,
|
|
15
15
|
Active
|
|
16
16
|
} from "./index";
|
|
17
17
|
const api = [
|
|
18
|
-
"toolBar",
|
|
19
18
|
"state",
|
|
20
19
|
"setLink",
|
|
21
20
|
"handleChange",
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"handleClick",
|
|
21
|
+
"tableMouseMove",
|
|
22
|
+
"tableChoose",
|
|
23
|
+
"toggleTablePanel",
|
|
24
|
+
"closeTablePanel",
|
|
27
25
|
"shouldShow",
|
|
28
|
-
"fontSize",
|
|
29
26
|
"eventImg",
|
|
30
27
|
"eventClick",
|
|
31
28
|
"Active"
|
|
32
29
|
];
|
|
33
|
-
const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, ref }, { vm, emit, parent }, {
|
|
30
|
+
const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, ref, markRaw }, { vm, emit, parent }, {
|
|
34
31
|
Editor,
|
|
35
32
|
StarterKit,
|
|
36
33
|
Table,
|
|
@@ -53,15 +50,10 @@ const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, ref
|
|
|
53
50
|
CodeBlockLowlight,
|
|
54
51
|
lowlight,
|
|
55
52
|
VueNodeViewRenderer,
|
|
56
|
-
// CodehighComp,
|
|
57
|
-
// NodeViewContent,
|
|
58
|
-
// nodeViewProps,
|
|
59
|
-
// NodeViewWrapper,
|
|
60
53
|
Placeholder,
|
|
61
54
|
codeHighlight
|
|
62
55
|
}) => {
|
|
63
|
-
|
|
64
|
-
let toolBar = [
|
|
56
|
+
let defaultToolBar = [
|
|
65
57
|
"bold",
|
|
66
58
|
"italic",
|
|
67
59
|
"underline",
|
|
@@ -74,31 +66,35 @@ const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, ref
|
|
|
74
66
|
"taskList",
|
|
75
67
|
"subscript",
|
|
76
68
|
"superscript",
|
|
77
|
-
// 'nodeDelete',
|
|
78
69
|
"undo",
|
|
79
70
|
"redo",
|
|
80
71
|
"left",
|
|
81
72
|
"center",
|
|
82
73
|
"right",
|
|
74
|
+
"formatClear",
|
|
75
|
+
"link",
|
|
83
76
|
"h-box",
|
|
77
|
+
//
|
|
84
78
|
"font-size",
|
|
79
|
+
//
|
|
85
80
|
"line-height",
|
|
81
|
+
//
|
|
86
82
|
"highlight",
|
|
87
83
|
"color",
|
|
84
|
+
//
|
|
88
85
|
"backgroundColor",
|
|
89
|
-
|
|
90
|
-
"link",
|
|
86
|
+
//
|
|
91
87
|
"unlink",
|
|
88
|
+
//
|
|
92
89
|
"img",
|
|
90
|
+
//
|
|
93
91
|
"table"
|
|
92
|
+
//
|
|
94
93
|
];
|
|
95
|
-
if (props.customToolBar) {
|
|
96
|
-
toolBar = props.customToolBar;
|
|
97
|
-
}
|
|
98
94
|
const CustomImage = Image.extend({
|
|
99
95
|
addAttributes() {
|
|
100
|
-
var
|
|
101
|
-
return __spreadProps(__spreadValues({}, (
|
|
96
|
+
var _a;
|
|
97
|
+
return __spreadProps(__spreadValues({}, (_a = this.parent) == null ? void 0 : _a.call(this)), {
|
|
102
98
|
type: {
|
|
103
99
|
default: "img"
|
|
104
100
|
}
|
|
@@ -224,71 +220,64 @@ const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, ref
|
|
|
224
220
|
}
|
|
225
221
|
}).configure({ lowlight }),
|
|
226
222
|
Placeholder.configure({
|
|
227
|
-
placeholder:
|
|
223
|
+
placeholder: props.placeholder
|
|
228
224
|
})
|
|
229
225
|
],
|
|
230
|
-
content:
|
|
226
|
+
content: props.modelValue,
|
|
231
227
|
autofocus: true,
|
|
232
228
|
editable: true,
|
|
233
229
|
injectCSS: false,
|
|
234
230
|
// 事件
|
|
235
|
-
onBeforeCreate({ editor
|
|
236
|
-
emit("beforeCreate", { editor
|
|
231
|
+
onBeforeCreate({ editor }) {
|
|
232
|
+
emit("beforeCreate", { editor });
|
|
237
233
|
},
|
|
238
|
-
onCreate({ editor
|
|
239
|
-
emit("create", { editor
|
|
234
|
+
onCreate({ editor }) {
|
|
235
|
+
emit("create", { editor });
|
|
240
236
|
},
|
|
241
|
-
onUpdate({ editor
|
|
242
|
-
const json =
|
|
243
|
-
const html =
|
|
244
|
-
const text =
|
|
245
|
-
const lineText =
|
|
246
|
-
emit("update", { editor
|
|
237
|
+
onUpdate({ editor }) {
|
|
238
|
+
const json = editor.getJSON();
|
|
239
|
+
const html = editor.getHTML();
|
|
240
|
+
const text = editor.getText();
|
|
241
|
+
const lineText = editor.getText({ blockSeparator: "--" });
|
|
242
|
+
emit("update", { editor });
|
|
247
243
|
emit("update:modelValue", html);
|
|
248
244
|
},
|
|
249
|
-
onFocus({ editor
|
|
250
|
-
emit("focus", { editor
|
|
245
|
+
onFocus({ editor, event }) {
|
|
246
|
+
emit("focus", { editor, event });
|
|
251
247
|
},
|
|
252
|
-
onBlur({ editor
|
|
253
|
-
emit("blur", { editor
|
|
248
|
+
onBlur({ editor, event }) {
|
|
249
|
+
emit("blur", { editor, event });
|
|
254
250
|
},
|
|
255
|
-
onSelectionUpdate({ editor
|
|
256
|
-
emit("selectionUpdate", { editor
|
|
251
|
+
onSelectionUpdate({ editor }) {
|
|
252
|
+
emit("selectionUpdate", { editor });
|
|
257
253
|
},
|
|
258
|
-
onTransaction({ editor
|
|
259
|
-
emit("transaction", { editor
|
|
254
|
+
onTransaction({ editor, transaction }) {
|
|
255
|
+
emit("transaction", { editor, transaction });
|
|
260
256
|
},
|
|
261
257
|
onDestroy() {
|
|
262
258
|
emit("destroy");
|
|
263
259
|
}
|
|
264
260
|
}, props.options);
|
|
265
|
-
let options =
|
|
266
|
-
const editor = new Editor(options);
|
|
267
|
-
const box = ref(null);
|
|
268
|
-
const fontSize = ref("16px");
|
|
261
|
+
let options = Object.assign(defaultOptions, props.options);
|
|
269
262
|
const state = reactive({
|
|
270
|
-
editor:
|
|
263
|
+
editor: markRaw(new Editor(options)),
|
|
264
|
+
toolbar: computed(() => props.customToolBar.length ? props.customToolBar : defaultToolBar),
|
|
271
265
|
// table 变量
|
|
272
|
-
|
|
266
|
+
isShowTable: false,
|
|
273
267
|
flagX: 0,
|
|
274
268
|
flagY: 0
|
|
275
269
|
});
|
|
276
|
-
state.editor = editor;
|
|
277
270
|
const api2 = {
|
|
278
|
-
toolBar,
|
|
279
271
|
state,
|
|
280
|
-
setLink: setLink(editor),
|
|
281
|
-
handleChange: handleChange(editor),
|
|
272
|
+
setLink: setLink(state.editor),
|
|
273
|
+
handleChange: handleChange(state.editor),
|
|
282
274
|
// table处理函数
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
handleClick: handleClick(state, box),
|
|
275
|
+
tableMouseMove: tableMouseMove(state, vm),
|
|
276
|
+
toggleTablePanel: toggleTablePanel(state),
|
|
277
|
+
closeTablePanel: closeTablePanel(state),
|
|
278
|
+
tableChoose: tableChoose(state, vm),
|
|
288
279
|
// bubble 菜单
|
|
289
280
|
shouldShow,
|
|
290
|
-
//
|
|
291
|
-
fontSize,
|
|
292
281
|
eventImg,
|
|
293
282
|
eventClick,
|
|
294
283
|
Active
|
package/select/index.js
CHANGED
|
@@ -204,10 +204,16 @@ const getOption = ({ props, state }) => (value) => {
|
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
if (option) {
|
|
207
|
-
if (
|
|
208
|
-
|
|
207
|
+
if (props.optimization) {
|
|
208
|
+
const cloneOption = extend(true, {}, option);
|
|
209
|
+
cloneOption.currentLabel = cloneOption[props.textField];
|
|
210
|
+
return cloneOption;
|
|
211
|
+
} else {
|
|
212
|
+
if (!option.currentLabel) {
|
|
213
|
+
option.currentLabel = option[props.textField];
|
|
214
|
+
}
|
|
215
|
+
return option;
|
|
209
216
|
}
|
|
210
|
-
return option;
|
|
211
217
|
}
|
|
212
218
|
let label = "";
|
|
213
219
|
if (!isObject(value) && !isNull(value) && !props.clearNoMatchValue) {
|
|
@@ -367,8 +373,8 @@ const handleFocus = ({ emit, props, state, api }) => (event) => {
|
|
|
367
373
|
} else {
|
|
368
374
|
state.softFocus = false;
|
|
369
375
|
}
|
|
370
|
-
if (props.remote && state.filterOrSearch && state.
|
|
371
|
-
state.
|
|
376
|
+
if (props.remote && state.filterOrSearch && state.firstAutoSearch) {
|
|
377
|
+
state.firstAutoSearch = false;
|
|
372
378
|
api.resetFilter();
|
|
373
379
|
}
|
|
374
380
|
};
|
|
@@ -1139,8 +1145,6 @@ const buildRadioConfig = ({ props, state }) => () => {
|
|
|
1139
1145
|
return __spreadValues(__spreadValues({}, radioConfig), { checkRowKey, highlight });
|
|
1140
1146
|
};
|
|
1141
1147
|
const onMouseenterNative = ({ state }) => (e) => {
|
|
1142
|
-
if (e.target === e.currentTarget)
|
|
1143
|
-
return;
|
|
1144
1148
|
state.inputHovering = true;
|
|
1145
1149
|
if (state.searchSingleCopy && state.selectedLabel) {
|
|
1146
1150
|
state.softFocus = true;
|
package/slide-bar/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
2
|
import { emitEvent } from "../common/event";
|
|
3
|
-
const leftClick = ({ api, props,
|
|
3
|
+
const leftClick = ({ api, props, vm, state }) => () => {
|
|
4
4
|
if (state.leftLength >= 0) {
|
|
5
5
|
return;
|
|
6
6
|
}
|
|
7
7
|
state.leftLength = state.leftLength + (state.blockWidth + state.blockMargin) * props.wheelBlocks;
|
|
8
|
-
refs.insider.style.left = state.leftLength + "px";
|
|
8
|
+
vm.$refs.insider.style.left = state.leftLength + "px";
|
|
9
9
|
api.changeState();
|
|
10
10
|
};
|
|
11
|
-
const rightClick = ({ api, props,
|
|
11
|
+
const rightClick = ({ api, props, vm, state }) => () => {
|
|
12
12
|
if (state.blockWrapper < Math.abs(state.leftLength) + state.wrapperWidth) {
|
|
13
13
|
return;
|
|
14
14
|
}
|
|
15
15
|
state.leftLength = state.leftLength - (state.blockWidth + state.blockMargin) * props.wheelBlocks;
|
|
16
|
-
refs.insider.style.left = state.leftLength + "px";
|
|
16
|
+
vm.$refs.insider.style.left = state.leftLength + "px";
|
|
17
17
|
api.changeState();
|
|
18
18
|
};
|
|
19
19
|
const blockClick = ({ emit, state }) => ({ item, index }) => {
|
|
@@ -39,8 +39,8 @@ const mouseEvent = ({ api, state }) => (e) => {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
-
const changeSize = ({ props, state,
|
|
43
|
-
state.wrapperWidth = refs.wrapper.offsetWidth;
|
|
42
|
+
const changeSize = ({ props, state, vm }) => () => {
|
|
43
|
+
state.wrapperWidth = vm.$refs.wrapper.offsetWidth;
|
|
44
44
|
state.blockWidth = parseInt((1 - (props.initBlocks - 1) * 0.02) / props.initBlocks * state.wrapperWidth, 10);
|
|
45
45
|
state.blockMargin = parseInt(state.wrapperWidth * 0.02, 10);
|
|
46
46
|
state.blockWrapper = props.modelValue.length * state.blockWidth + (props.modelValue.length - 1) * state.blockMargin;
|
package/slide-bar/vue.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
2
|
import { leftClick, rightClick, blockClick, changeState, changeSize, mouseEvent } from "./index";
|
|
3
3
|
const api = ["state", "mouseEvent", "rightClick", "leftClick", "blockClick"];
|
|
4
|
-
const renderless = (props, { onMounted, reactive }, {
|
|
4
|
+
const renderless = (props, { onMounted, reactive }, { vm, parent, emit }) => {
|
|
5
5
|
const api2 = {};
|
|
6
6
|
const state = reactive({
|
|
7
7
|
leftLength: 0,
|
|
@@ -18,10 +18,10 @@ const renderless = (props, { onMounted, reactive }, { refs, parent, emit }) => {
|
|
|
18
18
|
state,
|
|
19
19
|
blockClick: blockClick({ emit, state }),
|
|
20
20
|
changeState: changeState({ props, state }),
|
|
21
|
-
changeSize: changeSize({ props,
|
|
22
|
-
leftClick: leftClick({ api: api2, props,
|
|
23
|
-
mouseEvent: mouseEvent({ api: api2, props,
|
|
24
|
-
rightClick: rightClick({ api: api2, parent, props,
|
|
21
|
+
changeSize: changeSize({ props, vm, state }),
|
|
22
|
+
leftClick: leftClick({ api: api2, props, vm, state }),
|
|
23
|
+
mouseEvent: mouseEvent({ api: api2, props, vm, state }),
|
|
24
|
+
rightClick: rightClick({ api: api2, parent, props, vm, state })
|
|
25
25
|
});
|
|
26
26
|
onMounted(api2.changeSize);
|
|
27
27
|
return api2;
|
package/slider/index.js
CHANGED
|
@@ -8,8 +8,8 @@ const bindEvent = (api) => () => {
|
|
|
8
8
|
api.bindResize();
|
|
9
9
|
};
|
|
10
10
|
const unBindEvent = (api) => () => off(window, "resize", api.bindResize);
|
|
11
|
-
const bindResize = ({
|
|
12
|
-
const handleEl =
|
|
11
|
+
const bindResize = ({ vm, props, state }) => () => {
|
|
12
|
+
const handleEl = vm.$refs.slider;
|
|
13
13
|
state.sliderSize = handleEl["client" + (props.vertical ? "Height" : "Width")];
|
|
14
14
|
state.sliderOffset = handleEl.getBoundingClientRect();
|
|
15
15
|
};
|
|
@@ -63,8 +63,17 @@ const bindMouseDown = ({
|
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
65
|
const handleEl = event.target;
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
let isClickBar = false;
|
|
67
|
+
let isClickBtn = false;
|
|
68
|
+
if (mode === "mobile-first") {
|
|
69
|
+
const role = Array.from(handleEl.attributes).find((attr) => attr.name === "role");
|
|
70
|
+
const name = role && role.value;
|
|
71
|
+
isClickBar = name === constants.PC_SLIDER_CLS || name === constants.PC_RANGE_CLS;
|
|
72
|
+
isClickBtn = name === constants.PC_BUTTON_CLS;
|
|
73
|
+
} else {
|
|
74
|
+
isClickBar = hasClass(handleEl, constants.sliderCls(mode)) || hasClass(handleEl, constants.rangeCls(mode));
|
|
75
|
+
isClickBtn = hasClass(handleEl, constants.buttonCls(mode)) || hasClass(handleEl, constants.leftSvgCls(mode)) || hasClass(handleEl, constants.rightSvgCls(mode));
|
|
76
|
+
}
|
|
68
77
|
if (state.disabled || !isClickBtn && !isClickBar) {
|
|
69
78
|
state.activeIndex = -1;
|
|
70
79
|
return;
|
|
@@ -126,7 +135,7 @@ const hideTip = (state) => () => !state.isDrag && (state.showTip = false);
|
|
|
126
135
|
const setTipStyle = ({
|
|
127
136
|
constants,
|
|
128
137
|
mode,
|
|
129
|
-
|
|
138
|
+
vm,
|
|
130
139
|
props,
|
|
131
140
|
state
|
|
132
141
|
}) => () => {
|
|
@@ -134,19 +143,25 @@ const setTipStyle = ({
|
|
|
134
143
|
return;
|
|
135
144
|
}
|
|
136
145
|
const tipStyle = { top: 0, left: 0 };
|
|
137
|
-
const tipEl =
|
|
146
|
+
const tipEl = vm.$refs.sliderTip;
|
|
138
147
|
const moveSize = (state.activeValue - props.min) / state.rangeDiff * state.sliderSize;
|
|
139
148
|
if (props.vertical) {
|
|
140
149
|
tipStyle.top = state.sliderSize - moveSize - constants.BUTTON_SIZE - constants.TIP_HEIGHT / 2 + constants.HALF_BAR_HEIGHT;
|
|
141
|
-
tipStyle.left = -tipEl.
|
|
150
|
+
tipStyle.left = -tipEl.getBoundingClientRect().width / 2 + constants.HALF_BAR_HEIGHT;
|
|
142
151
|
} else {
|
|
143
152
|
tipStyle.top = -constants.TIP_HEIGHT - constants.BUTTON_SIZE / 2 + constants.HALF_BAR_HEIGHT;
|
|
144
|
-
tipStyle.left = moveSize -
|
|
153
|
+
tipStyle.left = moveSize - tipEl.getBoundingClientRect().width / 2;
|
|
154
|
+
}
|
|
155
|
+
if (mode === "mobile-first") {
|
|
156
|
+
state.tipStyle = {
|
|
157
|
+
left: tipStyle.left + "px"
|
|
158
|
+
};
|
|
159
|
+
} else {
|
|
160
|
+
state.tipStyle = {
|
|
161
|
+
top: tipStyle.top + "px",
|
|
162
|
+
left: tipStyle.left + "px"
|
|
163
|
+
};
|
|
145
164
|
}
|
|
146
|
-
state.tipStyle = {
|
|
147
|
-
top: tipStyle.top + "px",
|
|
148
|
-
left: tipStyle.left + "px"
|
|
149
|
-
};
|
|
150
165
|
};
|
|
151
166
|
const getActiveButtonIndexFlag = ({
|
|
152
167
|
state,
|
|
@@ -156,7 +171,13 @@ const getActiveButtonIndexFlag = ({
|
|
|
156
171
|
}) => {
|
|
157
172
|
const cls = constants.buttonCls(mode);
|
|
158
173
|
const { previousElementSibling } = event.target;
|
|
159
|
-
|
|
174
|
+
if (mode === "mobile-first") {
|
|
175
|
+
const role = Array.from(previousElementSibling.attributes).find((attr) => attr.name === "role");
|
|
176
|
+
const name = role && role.value;
|
|
177
|
+
return state.isDouble && name === constants.PC_BUTTON_CLS;
|
|
178
|
+
} else {
|
|
179
|
+
return state.isDouble && (hasClass(previousElementSibling, cls) || event.target.className.baseVal === "tiny-slider-right-svg");
|
|
180
|
+
}
|
|
160
181
|
};
|
|
161
182
|
const getActiveButtonIndex = ({ constants, mode, state }) => (event) => {
|
|
162
183
|
const flag = getActiveButtonIndexFlag({ state, event, constants, mode });
|
|
@@ -200,6 +221,7 @@ const calcCurrentValue = ({
|
|
|
200
221
|
};
|
|
201
222
|
const setActiveButtonValue = ({ api, emit, props, state }) => (value) => {
|
|
202
223
|
if (Array.isArray(value)) {
|
|
224
|
+
;
|
|
203
225
|
[state.leftBtnValue, state.rightBtnValue] = value;
|
|
204
226
|
} else {
|
|
205
227
|
let currentValue = calcCurrentValue({ currentValue: value, props, state });
|
|
@@ -244,6 +266,8 @@ const setBarStyle = ({ props, state }) => () => {
|
|
|
244
266
|
}
|
|
245
267
|
};
|
|
246
268
|
const initSlider = ({ api, props, state }) => (value) => {
|
|
269
|
+
if (state.isDrag)
|
|
270
|
+
return;
|
|
247
271
|
state.isDouble = Array.isArray(value);
|
|
248
272
|
const sliders = state.isDouble ? value : [value];
|
|
249
273
|
sliders.length > 2 && (sliders.length = 2);
|
|
@@ -262,8 +286,13 @@ const initSlider = ({ api, props, state }) => (value) => {
|
|
|
262
286
|
state.isInit = false;
|
|
263
287
|
api.setBarStyle();
|
|
264
288
|
};
|
|
265
|
-
const calculateValue = ({ props, state }) => (event) => {
|
|
289
|
+
const calculateValue = ({ props, state, vm }) => (event) => {
|
|
266
290
|
let currentValue = 0;
|
|
291
|
+
if (state.sliderSize == 0) {
|
|
292
|
+
const handleEl = vm.$refs.slider;
|
|
293
|
+
state.sliderSize = handleEl["client" + (props.vertical ? "Height" : "Width")];
|
|
294
|
+
state.sliderOffset = handleEl.getBoundingClientRect();
|
|
295
|
+
}
|
|
267
296
|
const offset = state.sliderOffset;
|
|
268
297
|
if (event.type === "touchmove" || event.type === "touchstart" || event.type === "touchend") {
|
|
269
298
|
if (props.vertical) {
|
|
@@ -300,6 +329,9 @@ const customBeforeAppearHook = (props) => (el) => {
|
|
|
300
329
|
el.style.width = "0%";
|
|
301
330
|
}
|
|
302
331
|
};
|
|
332
|
+
const customAppearHook = () => (el) => {
|
|
333
|
+
el.style.transition = "all 0.5s";
|
|
334
|
+
};
|
|
303
335
|
const customAfterAppearHook = ({ state, props }) => (el) => {
|
|
304
336
|
const minSize = Math.abs(state.leftBtnPercent - state.rightBtnPercent);
|
|
305
337
|
const maxSize = Math.max(state.leftBtnPercent, state.rightBtnPercent);
|
|
@@ -396,6 +428,7 @@ export {
|
|
|
396
428
|
calculateValue,
|
|
397
429
|
changeActiveValue,
|
|
398
430
|
customAfterAppearHook,
|
|
431
|
+
customAppearHook,
|
|
399
432
|
customBeforeAppearHook,
|
|
400
433
|
displayTip,
|
|
401
434
|
formatTipValue,
|