@opentiny/vue-renderless 3.11.8 → 3.12.0
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 +5 -9
- package/col/vue.js +4 -3
- 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 +2 -4
- 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} +5 -1
- 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/chart-core/index.js
CHANGED
|
@@ -7,11 +7,12 @@ import {
|
|
|
7
7
|
DEFAULT_THEME,
|
|
8
8
|
STATIC_PROPS,
|
|
9
9
|
ECHARTS_SETTINGS,
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
SAAS_DEFAULT_COLORS,
|
|
11
|
+
SAAS_DEFAULT_SAME_COLORS,
|
|
12
12
|
DEFAULT_CONFIG
|
|
13
13
|
} from "./deps/constants";
|
|
14
|
-
import { getType, debounce, isObject, cloneDeep, isEqual, htmlHandler } from "./deps/utils";
|
|
14
|
+
import { getType, debounce, isObject, cloneDeep, isEqual, htmlHandler, get } from "./deps/utils";
|
|
15
|
+
import { xss } from "../common/xss";
|
|
15
16
|
import setAnimation from "./modules/animation";
|
|
16
17
|
import setExtend from "./modules/extend";
|
|
17
18
|
import setMark from "./modules/mark";
|
|
@@ -20,22 +21,77 @@ const computedCanvasStyle = (props) => () => ({
|
|
|
20
21
|
height: props.height,
|
|
21
22
|
position: "relative"
|
|
22
23
|
});
|
|
23
|
-
const
|
|
24
|
-
|
|
24
|
+
const isStack = ({ props }) => {
|
|
25
|
+
let {
|
|
26
|
+
settings: { stack },
|
|
27
|
+
data: { columns }
|
|
28
|
+
} = props;
|
|
29
|
+
let flag = false;
|
|
30
|
+
if (typeof stack !== "object" || !Array.isArray(columns))
|
|
31
|
+
return flag;
|
|
32
|
+
Object.keys(stack).forEach((key) => {
|
|
33
|
+
stack[key].forEach((stackItem) => {
|
|
34
|
+
const isExist = columns.includes(stackItem);
|
|
35
|
+
if (isExist) {
|
|
36
|
+
flag = true;
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
return flag;
|
|
41
|
+
};
|
|
42
|
+
const calcColors = ({ len, type, isStack: isStack2 }) => {
|
|
43
|
+
let SAAS_COLOR = SAAS_DEFAULT_COLORS;
|
|
44
|
+
let lastColor = "#1B3F86";
|
|
45
|
+
if (isStack2 && type === "") {
|
|
46
|
+
return len && len > 6 ? [lastColor].concat(SAAS_COLOR.slice(0, len - 1)) : SAAS_COLOR.slice(0, [len || 8]);
|
|
47
|
+
}
|
|
48
|
+
if (!isStack2 && type === "") {
|
|
49
|
+
type = "default";
|
|
50
|
+
}
|
|
51
|
+
if (type === "blue" || type === "green") {
|
|
52
|
+
SAAS_COLOR = SAAS_DEFAULT_SAME_COLORS[type].slice(0, len).sort((a, b) => a.idx - b.idx).map((item) => item.color);
|
|
53
|
+
}
|
|
54
|
+
return len && len > 6 ? SAAS_COLOR.slice(0, len - 1).concat([lastColor]) : SAAS_COLOR.slice(0, [len || 8]);
|
|
55
|
+
};
|
|
56
|
+
const computedInitColor = (props) => () => {
|
|
25
57
|
let defaultColors = DEFAULT_COLORS;
|
|
26
|
-
let { data } = props;
|
|
27
|
-
|
|
28
|
-
if (data && Array.isArray(data.rows)) {
|
|
29
|
-
|
|
58
|
+
let { data, colorMode, extend } = props;
|
|
59
|
+
let flag = isStack({ props });
|
|
60
|
+
if (data && (Array.isArray(data.rows) || Array.isArray(data.columns))) {
|
|
61
|
+
const { columns, rows } = data;
|
|
62
|
+
const len = Math.max(columns ? columns.length : 0, rows ? rows.length : 0);
|
|
63
|
+
defaultColors = calcColors({ len, type: colorMode, isStack: flag });
|
|
30
64
|
} else if (Array.isArray(data)) {
|
|
31
|
-
defaultColors = calcColors(data);
|
|
32
|
-
} else if (extend && Array.isArray(extend.series)) {
|
|
33
|
-
defaultColors = calcColors(extend.series);
|
|
65
|
+
defaultColors = calcColors({ len: data.length, type: colorMode, isStack: flag });
|
|
34
66
|
} else if (extend && extend.series && Array.isArray(extend.series.data)) {
|
|
35
|
-
defaultColors = calcColors(extend.series.data);
|
|
67
|
+
defaultColors = calcColors({ len: extend.series.data.length, type: colorMode, isStack: flag });
|
|
68
|
+
} else if (extend && Array.isArray(extend.series)) {
|
|
69
|
+
defaultColors = calcColors({ len: extend.series.length, type: colorMode, isStack: flag });
|
|
70
|
+
}
|
|
71
|
+
return props.colors || props.theme && props.theme.color || defaultColors;
|
|
72
|
+
};
|
|
73
|
+
const computedChartColor = (props) => ({ series }) => {
|
|
74
|
+
let defaultColors = DEFAULT_COLORS;
|
|
75
|
+
let { colorMode } = props;
|
|
76
|
+
let flag = isStack({ props });
|
|
77
|
+
if (series && Array.isArray(series)) {
|
|
78
|
+
const validateList = ["pie", "radar", "sankey", "heatmap", "wordCloud"];
|
|
79
|
+
let len = 0;
|
|
80
|
+
if (series.some((item) => validateList.includes(item.type))) {
|
|
81
|
+
series.forEach((item) => len += item.data && item.data.length);
|
|
82
|
+
} else {
|
|
83
|
+
len = series.length;
|
|
84
|
+
}
|
|
85
|
+
defaultColors = calcColors({ len, type: colorMode, isStack: flag });
|
|
86
|
+
} else if (series && typeof series === "object") {
|
|
87
|
+
defaultColors = calcColors({ len: series.data.length, type: colorMode, isStack: flag });
|
|
36
88
|
}
|
|
37
89
|
return props.colors || props.theme && props.theme.color || defaultColors;
|
|
38
90
|
};
|
|
91
|
+
const getDefaultThemeColors = () => () => {
|
|
92
|
+
const { blue, green } = SAAS_DEFAULT_SAME_COLORS;
|
|
93
|
+
return { default: SAAS_DEFAULT_COLORS, blue, green };
|
|
94
|
+
};
|
|
39
95
|
const dataHandler = ({ api, props, state, echartsLib, t, vm }) => () => {
|
|
40
96
|
if (!api.chartHandler) {
|
|
41
97
|
return;
|
|
@@ -94,7 +150,7 @@ const echartsResize = (state) => () => state.echarts && state.echarts.resize();
|
|
|
94
150
|
const setOptionsLegend = ({ props, options }) => {
|
|
95
151
|
if (props.legendPosition && options.legend) {
|
|
96
152
|
options.legend[props.legendPosition] = 10;
|
|
97
|
-
if (
|
|
153
|
+
if (["left", "right"].includes(props.legendPosition)) {
|
|
98
154
|
options.legend.top = "middle";
|
|
99
155
|
options.legend.orient = "vertical";
|
|
100
156
|
}
|
|
@@ -166,19 +222,19 @@ const judgeWidthHandler = ({ props, api, vm, nextTick }) => () => {
|
|
|
166
222
|
});
|
|
167
223
|
}
|
|
168
224
|
};
|
|
169
|
-
const setOption = ({ state, options, setOptionOpts, emit, api, props, echartsLib }) => {
|
|
170
|
-
state.echarts.setOption(options, setOptionOpts);
|
|
171
|
-
emit("ready", state.echarts, options, echartsLib);
|
|
172
|
-
if (!state.once["ready-once"]) {
|
|
173
|
-
state.once["ready-once"] = true;
|
|
174
|
-
emit("ready-once", state.echarts, options, echartsLib);
|
|
175
|
-
}
|
|
176
|
-
api.judgeWidthHandler(options);
|
|
177
|
-
afterSetOption({ props, state, options, echartsLib });
|
|
178
|
-
afterSetOptionOnce({ props, state, options, echartsLib });
|
|
179
|
-
};
|
|
180
225
|
const optionsHandler = ({ props, state, emit, echartsLib, api, vm }) => (options) => {
|
|
181
226
|
if (options.tooltip) {
|
|
227
|
+
if (typeof options.tooltip.formatter === "function") {
|
|
228
|
+
const formatter = options.tooltip.formatter;
|
|
229
|
+
const customFormatter = (...args) => {
|
|
230
|
+
const rerutnValue = formatter(...args);
|
|
231
|
+
return xss.filterHtml(rerutnValue);
|
|
232
|
+
};
|
|
233
|
+
options.tooltip.formatter = customFormatter;
|
|
234
|
+
} else {
|
|
235
|
+
let xssHtml = xss.filterHtml(options.tooltip.formatter);
|
|
236
|
+
options.tooltip.formatter = xssHtml;
|
|
237
|
+
}
|
|
182
238
|
const defaultTooltip = DEFAULT_CONFIG.tooltip || {};
|
|
183
239
|
options.tooltip = __spreadValues(__spreadValues({}, defaultTooltip), options.tooltip);
|
|
184
240
|
}
|
|
@@ -187,7 +243,6 @@ const optionsHandler = ({ props, state, emit, echartsLib, api, vm }) => (options
|
|
|
187
243
|
options.legend = __spreadValues(__spreadValues({}, defaultLegend), options.legend);
|
|
188
244
|
}
|
|
189
245
|
setOptionsLegend({ props, options });
|
|
190
|
-
options.color = state.chartColor;
|
|
191
246
|
selfSetting({ props, options });
|
|
192
247
|
setAnimation({ options, animation: props.animation });
|
|
193
248
|
applyMarks({ props, options });
|
|
@@ -195,7 +250,18 @@ const optionsHandler = ({ props, state, emit, echartsLib, api, vm }) => (options
|
|
|
195
250
|
setExtend({ options, extend: props.extend });
|
|
196
251
|
options.series.label = __spreadValues({ show: false }, options.series.label);
|
|
197
252
|
options.series.radius = ["25%", "100%"];
|
|
253
|
+
const series = options.series;
|
|
254
|
+
if (Array.isArray(series)) {
|
|
255
|
+
options.series = series.map((item) => {
|
|
256
|
+
if (get(item, "type") === "line" && get(item, "label.show")) {
|
|
257
|
+
item.showSymbol = true;
|
|
258
|
+
}
|
|
259
|
+
return item;
|
|
260
|
+
});
|
|
261
|
+
}
|
|
198
262
|
}
|
|
263
|
+
options.color = api.computedChartColor({ series: options.series });
|
|
264
|
+
emit("handle-color", options.color, api.getDefaultThemeColors());
|
|
199
265
|
options = afterConfig({ props, options });
|
|
200
266
|
let setOptionOpts = mapChartNotMerge(props);
|
|
201
267
|
if (props.notSetUnchange && props.notSetUnchange.length) {
|
|
@@ -218,7 +284,15 @@ const optionsHandler = ({ props, state, emit, echartsLib, api, vm }) => (options
|
|
|
218
284
|
if (vm._isDestroyed) {
|
|
219
285
|
return;
|
|
220
286
|
}
|
|
221
|
-
setOption(
|
|
287
|
+
state.echarts.setOption(options, setOptionOpts);
|
|
288
|
+
emit("ready", state.echarts, options, echartsLib);
|
|
289
|
+
if (!state.once["ready-once"]) {
|
|
290
|
+
state.once["ready-once"] = true;
|
|
291
|
+
emit("ready-once", state.echarts, options, echartsLib);
|
|
292
|
+
}
|
|
293
|
+
api.judgeWidthHandler(options);
|
|
294
|
+
afterSetOption({ props, state, options, echartsLib });
|
|
295
|
+
afterSetOptionOnce({ props, state, options, echartsLib });
|
|
222
296
|
};
|
|
223
297
|
const resizeableHandler = ({ api, state }) => (resizeable) => {
|
|
224
298
|
if (resizeable && !state.once.onresize) {
|
|
@@ -228,7 +302,7 @@ const resizeableHandler = ({ api, state }) => (resizeable) => {
|
|
|
228
302
|
api.removeResizeListener();
|
|
229
303
|
}
|
|
230
304
|
};
|
|
231
|
-
const init = ({ state, props, api,
|
|
305
|
+
const init = ({ state, props, api, vm, echartsLib, markRaw }) => () => {
|
|
232
306
|
if (state.echarts) {
|
|
233
307
|
return;
|
|
234
308
|
}
|
|
@@ -238,7 +312,9 @@ const init = ({ state, props, api, refs, echartsLib, markRaw }) => () => {
|
|
|
238
312
|
ictThemeName.line = settings.line;
|
|
239
313
|
}
|
|
240
314
|
const themeName = props.themeName || props.theme || DEFAULT_THEME;
|
|
241
|
-
state.echarts = markRaw(
|
|
315
|
+
state.echarts = markRaw(
|
|
316
|
+
echartsLib.init(vm.$refs.canvas, themeName, __spreadValues(__spreadValues({}, themeName), ictThemeName), props.initOptions)
|
|
317
|
+
);
|
|
242
318
|
if (props.data) {
|
|
243
319
|
api.changeHandler();
|
|
244
320
|
}
|
|
@@ -257,9 +333,9 @@ const removeResizeListener = ({ state, api }) => () => {
|
|
|
257
333
|
};
|
|
258
334
|
const addWatchToProps = ({ props, watch, api }) => () => {
|
|
259
335
|
Object.keys(props).forEach((prop) => {
|
|
260
|
-
if (
|
|
336
|
+
if (!STATIC_PROPS.includes(prop)) {
|
|
261
337
|
const opts = {};
|
|
262
|
-
if (
|
|
338
|
+
if (["[object Object]", "[object Array]"].includes(getType(props[prop]))) {
|
|
263
339
|
opts.deep = true;
|
|
264
340
|
} else {
|
|
265
341
|
opts.immediate = true;
|
|
@@ -349,6 +425,19 @@ const mounted = ({ state, api, vm, props, watch, t }) => () => {
|
|
|
349
425
|
state.registeredEvents = [];
|
|
350
426
|
state.once = {};
|
|
351
427
|
state.store = {};
|
|
428
|
+
if (props.extend && props.extend.tooltip) {
|
|
429
|
+
if (typeof props.extend.tooltip.formatter === "function") {
|
|
430
|
+
const formatter = props.extend.tooltip.formatter;
|
|
431
|
+
const customFormatter = (...args) => {
|
|
432
|
+
const rerutnValue = formatter(...args);
|
|
433
|
+
return xss.filterHtml(rerutnValue);
|
|
434
|
+
};
|
|
435
|
+
props.extend.tooltip.formatter = customFormatter;
|
|
436
|
+
} else {
|
|
437
|
+
let xssHtml = xss.filterHtml(props.extend.tooltip.formatter);
|
|
438
|
+
props.extend.tooltip.formatter = xssHtml;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
352
441
|
api.chartHandler = vm.chartHandler;
|
|
353
442
|
api.resizeHandler = debounce(api.resize, props.resizeDelay);
|
|
354
443
|
api.changeHandler = debounce(api.dataHandler, props.changeDelay);
|
|
@@ -365,9 +454,11 @@ export {
|
|
|
365
454
|
clean,
|
|
366
455
|
computedCanvasStyle,
|
|
367
456
|
computedChartColor,
|
|
457
|
+
computedInitColor,
|
|
368
458
|
createEventProxy,
|
|
369
459
|
dataHandler,
|
|
370
460
|
echartsResize,
|
|
461
|
+
getDefaultThemeColors,
|
|
371
462
|
init,
|
|
372
463
|
judgeWidthHandler,
|
|
373
464
|
mounted,
|
package/chart-core/vue.js
CHANGED
|
@@ -18,7 +18,9 @@ import {
|
|
|
18
18
|
clean,
|
|
19
19
|
mounted,
|
|
20
20
|
changeHandler,
|
|
21
|
-
resizeHandler
|
|
21
|
+
resizeHandler,
|
|
22
|
+
computedInitColor,
|
|
23
|
+
getDefaultThemeColors
|
|
22
24
|
} from "./index";
|
|
23
25
|
import { camelToKebab } from "./deps/utils";
|
|
24
26
|
const api = [
|
|
@@ -40,19 +42,20 @@ const api = [
|
|
|
40
42
|
"clean",
|
|
41
43
|
"mounted",
|
|
42
44
|
"changeHandler",
|
|
43
|
-
"resizeHandler"
|
|
45
|
+
"resizeHandler",
|
|
46
|
+
"getDefaultThemeColors"
|
|
44
47
|
];
|
|
45
|
-
const renderless = (props, { computed, onBeforeUnmount, onMounted, reactive, watch, markRaw }, { t, vm,
|
|
46
|
-
let api2 = {};
|
|
48
|
+
const renderless = (props, { computed, onBeforeUnmount, onMounted, reactive, watch, markRaw }, { t, vm, emit, nextTick }, { echartsLib }) => {
|
|
47
49
|
const state = reactive({
|
|
48
|
-
chartColor: computed(() => api2.
|
|
50
|
+
chartColor: computed(() => api2.computedInitColor()),
|
|
49
51
|
canvasStyle: computed(() => api2.computedCanvasStyle())
|
|
50
52
|
});
|
|
51
|
-
api2 = {
|
|
53
|
+
const api2 = {
|
|
52
54
|
state,
|
|
53
55
|
camelToKebab,
|
|
54
56
|
computedChartColor: computedChartColor(props),
|
|
55
|
-
computedCanvasStyle: computedCanvasStyle(props)
|
|
57
|
+
computedCanvasStyle: computedCanvasStyle(props),
|
|
58
|
+
computedInitColor: computedInitColor(props)
|
|
56
59
|
};
|
|
57
60
|
onMounted(() => api2.mounted());
|
|
58
61
|
onBeforeUnmount(() => api2.clean());
|
|
@@ -64,7 +67,7 @@ const renderless = (props, { computed, onBeforeUnmount, onMounted, reactive, wat
|
|
|
64
67
|
changeHandler: changeHandler({ api: api2, props }),
|
|
65
68
|
resizeHandler: resizeHandler({ api: api2, props }),
|
|
66
69
|
nextTickResize: nextTickResize({ api: api2, nextTick }),
|
|
67
|
-
init: init({ state, props, api: api2,
|
|
70
|
+
init: init({ state, props, api: api2, vm, echartsLib, markRaw }),
|
|
68
71
|
createEventProxy: createEventProxy({ api: api2, props, state }),
|
|
69
72
|
addResizeListener: addResizeListener({ state, api: api2 }),
|
|
70
73
|
resizeableHandler: resizeableHandler({ api: api2, state }),
|
|
@@ -73,6 +76,7 @@ const renderless = (props, { computed, onBeforeUnmount, onMounted, reactive, wat
|
|
|
73
76
|
addWatchToProps: addWatchToProps({ vm, props, watch, api: api2 }),
|
|
74
77
|
dataHandler: dataHandler({ api: api2, props, state, echartsLib, t, vm }),
|
|
75
78
|
judgeWidthHandler: judgeWidthHandler({ props, api: api2, vm, nextTick }),
|
|
79
|
+
getDefaultThemeColors: getDefaultThemeColors(),
|
|
76
80
|
optionsHandler: optionsHandler({
|
|
77
81
|
props,
|
|
78
82
|
state,
|
package/chart-radar/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { getFormated } from "../chart-core/deps/utils";
|
|
|
3
3
|
import { itemPoint, itemLabel, itemContent } from "../chart-core/deps/constants";
|
|
4
4
|
import { isNull } from "../common/type";
|
|
5
5
|
const getRadarLegend = (rows, dimension, legendName) => {
|
|
6
|
-
let legendData = rows.map((row) => row[dimension]);
|
|
6
|
+
let legendData = rows.map((row) => row[dimension]).filter((i) => i);
|
|
7
7
|
function formatter(name) {
|
|
8
8
|
return isNull(legendName[name]) ? name : legendName[name];
|
|
9
9
|
}
|
|
@@ -61,7 +61,7 @@ const getRadarSeries = (args) => {
|
|
|
61
61
|
const seriesData = rows.map((row) => {
|
|
62
62
|
const serieData = {
|
|
63
63
|
value: [],
|
|
64
|
-
name: row[dimension],
|
|
64
|
+
name: row[dimension] || "",
|
|
65
65
|
symbol: "circle",
|
|
66
66
|
symbolSize: 8,
|
|
67
67
|
showSymbol: false,
|
package/checkbox-button/vue.js
CHANGED
|
@@ -10,7 +10,14 @@ import {
|
|
|
10
10
|
computedIsDisabled,
|
|
11
11
|
toggleEvent
|
|
12
12
|
} from "./index";
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
addToStore,
|
|
15
|
+
computedIsChecked,
|
|
16
|
+
computedStore,
|
|
17
|
+
computedIsLimitDisabled,
|
|
18
|
+
computedIsShowText,
|
|
19
|
+
computedShowText
|
|
20
|
+
} from "../checkbox";
|
|
14
21
|
const api = ["state", "handleChange"];
|
|
15
22
|
const initState = ({ reactive, computed, api: api2 }) => {
|
|
16
23
|
const state = reactive({
|
package/checkbox-group/vue.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
2
|
import { computedFormItemSize, computedCheckboxGroupSize } from "./index";
|
|
3
3
|
const api = ["state"];
|
|
4
|
-
const renderless = (props, { computed, reactive, watch }, { dispatch, constants }) => {
|
|
4
|
+
const renderless = (props, { computed, reactive, watch, provide }, { dispatch, constants }) => {
|
|
5
5
|
const api2 = {
|
|
6
6
|
computedFormItemSize: computedFormItemSize(props)
|
|
7
7
|
};
|
|
@@ -11,15 +11,14 @@ const renderless = (props, { computed, reactive, watch }, { dispatch, constants
|
|
|
11
11
|
});
|
|
12
12
|
Object.assign(api2, {
|
|
13
13
|
state,
|
|
14
|
-
computedCheckboxGroupSize: computedCheckboxGroupSize({
|
|
15
|
-
props,
|
|
16
|
-
formItemSize
|
|
17
|
-
})
|
|
14
|
+
computedCheckboxGroupSize: computedCheckboxGroupSize({ props, formItemSize })
|
|
18
15
|
});
|
|
19
16
|
watch(
|
|
20
17
|
() => props.modelValue,
|
|
21
18
|
(value) => dispatch(constants.FORM_ITEM, constants.FORM_CHANGE, [value])
|
|
22
19
|
);
|
|
20
|
+
provide("size", props.size);
|
|
21
|
+
provide("vertical", props.vertical);
|
|
23
22
|
return api2;
|
|
24
23
|
};
|
|
25
24
|
export {
|
package/col/index.js
CHANGED
|
@@ -27,8 +27,9 @@ const setGlobalAttrValue = ({ attr, className, value }) => {
|
|
|
27
27
|
className[`col-lg-${attr}`] = value;
|
|
28
28
|
className[`col-xl-${attr}`] = value;
|
|
29
29
|
};
|
|
30
|
-
const getClassName = ({ api, props }) => () => {
|
|
31
|
-
|
|
30
|
+
const getClassName = ({ api, props, state }) => () => {
|
|
31
|
+
var _a;
|
|
32
|
+
const multiple = 24 / (((_a = state.layout) == null ? void 0 : _a.cols) || 12);
|
|
32
33
|
const span = props.span * multiple;
|
|
33
34
|
const offset = props.offset;
|
|
34
35
|
const push = props.move ? props.move : 0;
|
|
@@ -80,14 +81,9 @@ const getStyle = ({ props, state }) => () => {
|
|
|
80
81
|
const no = props.no;
|
|
81
82
|
const styles = [];
|
|
82
83
|
let gutter = parent ? parent.gutter : null;
|
|
83
|
-
let noSpace = parent ? parent.noSpace : null;
|
|
84
84
|
let order = "";
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
styles.push(`padding-left:${gutter}px;padding-right:${gutter}px;`);
|
|
88
|
-
} else if (noSpace) {
|
|
89
|
-
styles.push("padding-left:0;padding-right:0;");
|
|
90
|
-
}
|
|
85
|
+
gutter = gutter / 2;
|
|
86
|
+
styles.push(`padding-left:${gutter}px;padding-right:${gutter}px;`);
|
|
91
87
|
if (parent && parent.flex && parent.order) {
|
|
92
88
|
order = parent.order === "asc" ? no : -no;
|
|
93
89
|
styles.push(`order:${order};-webkit-order:${order};-ms-order:${order};-moz-order:${order};`);
|
package/col/vue.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
2
|
import { setSubitemAttrValue, setGlobalAttrValue, getClassName, getStyle, row } from "./index";
|
|
3
3
|
const api = ["state"];
|
|
4
|
-
const renderless = (props, { computed, reactive }, { parent }) => {
|
|
4
|
+
const renderless = (props, { computed, reactive, inject }, { parent }) => {
|
|
5
5
|
const api2 = {};
|
|
6
6
|
const state = reactive({
|
|
7
7
|
row: computed(() => api2.row()),
|
|
8
8
|
style: computed(() => api2.getStyle()),
|
|
9
|
-
className: computed(() => api2.getClassName())
|
|
9
|
+
className: computed(() => api2.getClassName()),
|
|
10
|
+
layout: inject("layout")
|
|
10
11
|
});
|
|
11
12
|
Object.assign(api2, {
|
|
12
13
|
state,
|
|
@@ -14,7 +15,7 @@ const renderless = (props, { computed, reactive }, { parent }) => {
|
|
|
14
15
|
setGlobalAttrValue,
|
|
15
16
|
setSubitemAttrValue,
|
|
16
17
|
getStyle: getStyle({ props, state }),
|
|
17
|
-
getClassName: getClassName({ api: api2, props })
|
|
18
|
+
getClassName: getClassName({ api: api2, props, state })
|
|
18
19
|
});
|
|
19
20
|
return api2;
|
|
20
21
|
};
|
package/collapse-item/index.js
CHANGED
|
@@ -8,7 +8,14 @@ const handleFocus = ({ state, interval }) => () => {
|
|
|
8
8
|
}
|
|
9
9
|
}, interval);
|
|
10
10
|
};
|
|
11
|
-
const handleHeaderClick = ({
|
|
11
|
+
const handleHeaderClick = ({
|
|
12
|
+
componentName,
|
|
13
|
+
dispatch,
|
|
14
|
+
eventName,
|
|
15
|
+
props,
|
|
16
|
+
parent,
|
|
17
|
+
state
|
|
18
|
+
}) => () => {
|
|
12
19
|
if (props.disabled) {
|
|
13
20
|
return;
|
|
14
21
|
}
|
|
@@ -16,7 +23,12 @@ const handleHeaderClick = ({ componentName, dispatch, eventName, props, parent,
|
|
|
16
23
|
state.focusing = false;
|
|
17
24
|
state.isClick = true;
|
|
18
25
|
};
|
|
19
|
-
const handleEnterClick = ({
|
|
26
|
+
const handleEnterClick = ({
|
|
27
|
+
componentName,
|
|
28
|
+
dispatch,
|
|
29
|
+
eventName,
|
|
30
|
+
parent
|
|
31
|
+
}) => () => dispatch(componentName, eventName, parent);
|
|
20
32
|
export {
|
|
21
33
|
handleEnterClick,
|
|
22
34
|
handleFocus,
|
package/color-picker/index.js
CHANGED
|
@@ -1,52 +1,42 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
|
-
const
|
|
2
|
+
const onCancel = (tmpColor, triggerBg, isShow, pre, emit) => {
|
|
3
3
|
return (color) => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
triggerBg.value = res.value;
|
|
7
|
-
emit("confirm", res.value);
|
|
4
|
+
tmpColor.reset(color.value.getHex());
|
|
5
|
+
triggerBg.value = pre.value;
|
|
8
6
|
isShow.value = false;
|
|
7
|
+
emit("cancel");
|
|
9
8
|
};
|
|
10
9
|
};
|
|
11
|
-
const
|
|
12
|
-
return () => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
color.reset(hex.value);
|
|
17
|
-
emit("cancel");
|
|
18
|
-
}
|
|
10
|
+
const onConfirm = (triggerBg, pre, hex, isShow, emit) => {
|
|
11
|
+
return (color) => {
|
|
12
|
+
pre.value = triggerBg.value;
|
|
13
|
+
triggerBg.value = color;
|
|
14
|
+
hex.value = color;
|
|
19
15
|
isShow.value = false;
|
|
16
|
+
emit("confirm", color);
|
|
20
17
|
};
|
|
21
18
|
};
|
|
22
|
-
const
|
|
23
|
-
|
|
19
|
+
const onHueUpdate = (tmpColor, triggerBg) => {
|
|
20
|
+
return (h) => {
|
|
21
|
+
triggerBg.value = tmpColor.getHex();
|
|
22
|
+
tmpColor.set({ h });
|
|
23
|
+
};
|
|
24
24
|
};
|
|
25
|
-
const
|
|
26
|
-
return {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
onColorUpdate(color, res);
|
|
30
|
-
hex.value = color.getHex();
|
|
31
|
-
},
|
|
32
|
-
onSVUpdate: ({ s, v }) => {
|
|
33
|
-
color.set({ s, v });
|
|
34
|
-
onColorUpdate(color, res);
|
|
35
|
-
}
|
|
25
|
+
const onSVUpdate = (tmpColor, triggerBg) => {
|
|
26
|
+
return ({ s, v }) => {
|
|
27
|
+
triggerBg.value = tmpColor.getHex();
|
|
28
|
+
tmpColor.set({ s, v });
|
|
36
29
|
};
|
|
37
30
|
};
|
|
38
|
-
const
|
|
39
|
-
return {
|
|
40
|
-
|
|
41
|
-
color.set({ a: alpha });
|
|
42
|
-
onColorUpdate(color, res);
|
|
43
|
-
}
|
|
31
|
+
const onColorUpdate = (triggerBg) => {
|
|
32
|
+
return (color) => {
|
|
33
|
+
triggerBg.value = color.value.getHex();
|
|
44
34
|
};
|
|
45
35
|
};
|
|
46
36
|
export {
|
|
47
|
-
onAlphaUpdate,
|
|
48
37
|
onCancel,
|
|
49
38
|
onColorUpdate,
|
|
50
39
|
onConfirm,
|
|
51
|
-
|
|
40
|
+
onHueUpdate,
|
|
41
|
+
onSVUpdate
|
|
52
42
|
};
|
|
@@ -33,6 +33,7 @@ class Color {
|
|
|
33
33
|
this.s = 0;
|
|
34
34
|
this.v = 0;
|
|
35
35
|
this.a = 100;
|
|
36
|
+
this.preH = 0;
|
|
36
37
|
this.enableAlpha = false;
|
|
37
38
|
this.reset(value);
|
|
38
39
|
this.enableAlpha = alpha;
|
|
@@ -52,6 +53,7 @@ class Color {
|
|
|
52
53
|
this.s = s;
|
|
53
54
|
this.v = v;
|
|
54
55
|
this.a = a;
|
|
56
|
+
this.preH = h;
|
|
55
57
|
}
|
|
56
58
|
set({ h, s, v, a }) {
|
|
57
59
|
this.h = h != null ? h : this.h;
|
|
@@ -59,6 +61,9 @@ class Color {
|
|
|
59
61
|
this.v = v != null ? v : this.v;
|
|
60
62
|
this.a = a != null ? a : this.a;
|
|
61
63
|
}
|
|
64
|
+
setPrevH(val) {
|
|
65
|
+
this.preH = val;
|
|
66
|
+
}
|
|
62
67
|
/**
|
|
63
68
|
*
|
|
64
69
|
* @returns [R,G,B]
|
|
@@ -92,5 +97,6 @@ class Color {
|
|
|
92
97
|
}
|
|
93
98
|
}
|
|
94
99
|
export {
|
|
95
|
-
Color as default
|
|
100
|
+
Color as default,
|
|
101
|
+
normalizeHexColor
|
|
96
102
|
};
|
package/color-picker/vue.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
2
|
import Color from "./utils/color";
|
|
3
|
-
import { onConfirm, onCancel,
|
|
3
|
+
import { onConfirm, onCancel, onHueUpdate, onSVUpdate, onColorUpdate } from "./index";
|
|
4
4
|
const api = [
|
|
5
5
|
"state",
|
|
6
6
|
"changeVisible",
|
|
@@ -14,46 +14,59 @@ const api = [
|
|
|
14
14
|
"alpha"
|
|
15
15
|
];
|
|
16
16
|
const renderless = (props, context, { emit }) => {
|
|
17
|
-
var _a, _b, _c, _d;
|
|
18
|
-
const { modelValue, visible } = context.toRefs(props);
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
17
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
18
|
+
const { modelValue, visible, predefine, size, history } = context.toRefs(props);
|
|
19
|
+
const pre = context.ref((_a = modelValue.value) != null ? _a : "transparent");
|
|
20
|
+
const triggerBg = context.ref((_b = pre.value) != null ? _b : "transparent");
|
|
21
|
+
const tmpColor = new Color((_c = triggerBg.value) != null ? _c : "transparent");
|
|
22
|
+
const hex = context.ref((_d = modelValue.value) != null ? _d : "transparent");
|
|
23
|
+
const isShow = context.ref((_e = visible == null ? void 0 : visible.value) != null ? _e : false);
|
|
24
24
|
const changeVisible = (state2) => {
|
|
25
25
|
isShow.value = state2;
|
|
26
26
|
};
|
|
27
|
-
const
|
|
27
|
+
const stack = context.ref([...(_f = history == null ? void 0 : history.value) != null ? _f : []]);
|
|
28
|
+
const predefineStack = context.ref([...(_g = predefine == null ? void 0 : predefine.value) != null ? _g : []]);
|
|
28
29
|
const state = context.reactive({
|
|
29
30
|
isShow,
|
|
30
31
|
hex,
|
|
31
|
-
color,
|
|
32
32
|
triggerBg,
|
|
33
33
|
defaultValue: modelValue,
|
|
34
|
-
|
|
34
|
+
stack,
|
|
35
|
+
predefineStack,
|
|
36
|
+
size: size != null ? size : ""
|
|
35
37
|
});
|
|
38
|
+
const api2 = {
|
|
39
|
+
state,
|
|
40
|
+
changeVisible,
|
|
41
|
+
onCancel: onCancel(tmpColor, triggerBg, isShow, pre, emit),
|
|
42
|
+
onConfirm: onConfirm(triggerBg, pre, hex, isShow, emit),
|
|
43
|
+
onHueUpdate: onHueUpdate(tmpColor, triggerBg),
|
|
44
|
+
onSVUpdate: onSVUpdate(tmpColor, triggerBg),
|
|
45
|
+
onColorUpdate: onColorUpdate(triggerBg)
|
|
46
|
+
};
|
|
47
|
+
context.watch(
|
|
48
|
+
predefine,
|
|
49
|
+
(newPredefine) => {
|
|
50
|
+
predefineStack.value = [...newPredefine];
|
|
51
|
+
},
|
|
52
|
+
{ deep: true }
|
|
53
|
+
);
|
|
54
|
+
context.watch(
|
|
55
|
+
history,
|
|
56
|
+
(newHistory) => {
|
|
57
|
+
stack.value = [...newHistory];
|
|
58
|
+
},
|
|
59
|
+
{ deep: true }
|
|
60
|
+
);
|
|
36
61
|
context.watch(modelValue, (newValue) => {
|
|
62
|
+
pre.value = newValue;
|
|
37
63
|
hex.value = newValue;
|
|
38
|
-
|
|
39
|
-
triggerBg
|
|
40
|
-
color.reset(hex.value);
|
|
64
|
+
state.hex = newValue;
|
|
65
|
+
state.triggerBg = newValue;
|
|
41
66
|
});
|
|
42
67
|
context.watch(visible, (visible2) => {
|
|
43
68
|
isShow.value = visible2;
|
|
44
69
|
});
|
|
45
|
-
const { onHueUpdate, onSVUpdate } = onHSVUpdate(color, res, hex);
|
|
46
|
-
const { update } = onAlphaUpdate(color, res);
|
|
47
|
-
const api2 = {
|
|
48
|
-
state,
|
|
49
|
-
changeVisible,
|
|
50
|
-
onHueUpdate,
|
|
51
|
-
onSVUpdate,
|
|
52
|
-
onConfirm: onConfirm(hex, triggerBg, res, emit, isShow),
|
|
53
|
-
onCancel: onCancel(res, triggerBg, emit, isShow, hex, color),
|
|
54
|
-
onAlphaUpdate: update,
|
|
55
|
-
cursor
|
|
56
|
-
};
|
|
57
70
|
return api2;
|
|
58
71
|
};
|
|
59
72
|
export {
|