@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/calendar-bar/vue.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
2
|
import {
|
|
3
3
|
getCalendarDays,
|
|
4
|
+
computedData,
|
|
4
5
|
computedCurrentRow,
|
|
5
6
|
computedFilteredCalendarDays,
|
|
6
7
|
handleDraggerClick,
|
|
@@ -16,7 +17,16 @@ import {
|
|
|
16
17
|
setCascaderVisible,
|
|
17
18
|
handleCascaderChange,
|
|
18
19
|
computeCascaderOptions,
|
|
19
|
-
|
|
20
|
+
getAllDatesOfCurrWeek,
|
|
21
|
+
updateCalendarDays,
|
|
22
|
+
showWeekChange,
|
|
23
|
+
getWeekOfDate,
|
|
24
|
+
getPrevWeek,
|
|
25
|
+
getNextWeek,
|
|
26
|
+
i18nYearMonth,
|
|
27
|
+
touchstart,
|
|
28
|
+
touchmove,
|
|
29
|
+
touchend
|
|
20
30
|
} from "./index";
|
|
21
31
|
import throttle from "../common/deps/throttle";
|
|
22
32
|
const api = [
|
|
@@ -29,52 +39,116 @@ const api = [
|
|
|
29
39
|
"throttledHandleDraggerTouchmove",
|
|
30
40
|
"setCascaderVisible",
|
|
31
41
|
"handleCascaderChange",
|
|
32
|
-
"i18nYearMonth"
|
|
42
|
+
"i18nYearMonth",
|
|
43
|
+
"touchstart",
|
|
44
|
+
"touchmove",
|
|
45
|
+
"touchend"
|
|
33
46
|
];
|
|
34
|
-
const
|
|
47
|
+
const initWatch = ({ watch, api: api2, state, emit }) => {
|
|
48
|
+
watch(
|
|
49
|
+
() => state.weekDates,
|
|
50
|
+
(value, oldValue) => {
|
|
51
|
+
if (state.dragging || state.touching)
|
|
52
|
+
return;
|
|
53
|
+
state.prevWeekDates = api2.getWeekOfDate("prev", state.weekDates[3].dateStr);
|
|
54
|
+
state.nextWeekDates = api2.getWeekOfDate("next", state.weekDates[3].dateStr);
|
|
55
|
+
state.copyWeekDates = state.weekDates.slice(0);
|
|
56
|
+
emit("week-change", value, oldValue);
|
|
57
|
+
},
|
|
58
|
+
{ deep: true }
|
|
59
|
+
);
|
|
60
|
+
watch(
|
|
61
|
+
() => state.showWeek,
|
|
62
|
+
(value) => {
|
|
63
|
+
api2.showWeekChange(value);
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
};
|
|
67
|
+
const renderless = (props, { reactive, computed, onBeforeMount, onMounted, watch }, { emit, vm, t }) => {
|
|
35
68
|
const state = reactive({
|
|
36
69
|
minSize2: "min-width: 3rem; min-height: 2rem",
|
|
37
70
|
minSize3: "min-width: 3rem; min-height: 3rem",
|
|
38
71
|
dayOfWeek: 7,
|
|
72
|
+
showRows: 0,
|
|
39
73
|
weekDays: [],
|
|
74
|
+
prevWeekDates: [],
|
|
75
|
+
weekDates: [],
|
|
76
|
+
nextWeekDates: [],
|
|
77
|
+
lastCalendarDays: [],
|
|
40
78
|
calendarDays: [],
|
|
79
|
+
nextCalendarDays: [],
|
|
80
|
+
threeMonthDays: [],
|
|
81
|
+
copyWeekDates: [],
|
|
82
|
+
calendarDaysCopy: [],
|
|
41
83
|
currentYear: "",
|
|
42
84
|
currentMonth: "",
|
|
85
|
+
data: computed(() => api2.computedData()),
|
|
43
86
|
currentRow: computed(() => api2.computedCurrentRow()),
|
|
44
87
|
filteredCalendarDays: computed(() => api2.computedFilteredCalendarDays()),
|
|
45
88
|
visibleRows: [],
|
|
46
89
|
itemHeight: 0,
|
|
47
90
|
totalRows: computed(() => api2.computedTotalRows()),
|
|
91
|
+
showWeek: true,
|
|
48
92
|
dragging: false,
|
|
49
93
|
touching: false,
|
|
94
|
+
delta: 0,
|
|
95
|
+
duration: 300,
|
|
96
|
+
offsetPos: {
|
|
97
|
+
X: 0,
|
|
98
|
+
Y: 0
|
|
99
|
+
},
|
|
100
|
+
deltaPos: {
|
|
101
|
+
X: 0,
|
|
102
|
+
Y: 0
|
|
103
|
+
},
|
|
104
|
+
startPos: {
|
|
105
|
+
X: 0,
|
|
106
|
+
Y: 0
|
|
107
|
+
},
|
|
108
|
+
activeRow: 0,
|
|
109
|
+
activeDate: "",
|
|
50
110
|
cascaderCurrent: [],
|
|
51
111
|
cascaderOptions: computed(() => api2.computeCascaderOptions()),
|
|
52
112
|
cascaderVisible: false
|
|
53
113
|
});
|
|
54
114
|
const api2 = {
|
|
55
115
|
state,
|
|
116
|
+
touchstart: touchstart({ state }),
|
|
117
|
+
touchmove: touchmove({ state }),
|
|
56
118
|
getCalendarDays: getCalendarDays(state),
|
|
119
|
+
computedData: computedData(state),
|
|
57
120
|
computedCurrentRow: computedCurrentRow(state),
|
|
58
121
|
computedFilteredCalendarDays: computedFilteredCalendarDays(state),
|
|
59
|
-
handleDraggerClick: handleDraggerClick(state),
|
|
122
|
+
handleDraggerClick: handleDraggerClick(state, emit),
|
|
60
123
|
calcCalendarItemHeight: calcCalendarItemHeight({ state, vm }),
|
|
61
124
|
computedTotalRows: computedTotalRows(state),
|
|
62
125
|
throttledHandleMousemove: throttle(20, handleMousemove({ state, vm })),
|
|
63
126
|
handleDraggerTouchstart: handleDraggerTouchstart({ state, vm }),
|
|
64
|
-
handleDraggerTouchend: handleDraggerTouchend({ state, vm }),
|
|
127
|
+
handleDraggerTouchend: handleDraggerTouchend({ state, vm, emit }),
|
|
65
128
|
throttledHandleDraggerTouchmove: throttle(20, handleDraggerTouchmove({ state, vm })),
|
|
66
129
|
setCascaderVisible: setCascaderVisible(state),
|
|
67
130
|
computeCascaderOptions: computeCascaderOptions(t),
|
|
68
131
|
i18nYearMonth: i18nYearMonth({ state, t })
|
|
69
132
|
};
|
|
70
133
|
Object.assign(api2, {
|
|
71
|
-
|
|
134
|
+
getPrevWeek: getPrevWeek({ props, emit, api: api2, state }),
|
|
135
|
+
getNextWeek: getNextWeek({ props, emit, api: api2, state }),
|
|
136
|
+
showWeekChange: showWeekChange({ props, state }),
|
|
137
|
+
updateCalendarDays: updateCalendarDays({ props, state, api: api2, emit }),
|
|
138
|
+
getAllDatesOfCurrWeek: getAllDatesOfCurrWeek({ state, props }),
|
|
139
|
+
getWeekOfDate: getWeekOfDate({ api: api2 }),
|
|
140
|
+
touchend: touchend({ props, state, api: api2, vm, emit }),
|
|
141
|
+
handleClickDay: handleClickDay({ api: api2, emit, props, state }),
|
|
72
142
|
handleDraggerMousedown: handleDraggerMousedown({ api: api2, state, vm }),
|
|
73
|
-
handleMouseup: handleMouseup({ api: api2, state, vm }),
|
|
143
|
+
handleMouseup: handleMouseup({ api: api2, state, vm, emit }),
|
|
74
144
|
handleCascaderChange: handleCascaderChange({ api: api2, emit, props, state })
|
|
75
145
|
});
|
|
146
|
+
initWatch({ watch, api: api2, state, emit });
|
|
76
147
|
onBeforeMount(() => {
|
|
77
|
-
api2.getCalendarDays(props.modelValue, props.config);
|
|
148
|
+
api2.getCalendarDays(props.modelValue, props.config, "cur");
|
|
149
|
+
api2.getCalendarDays(props.modelValue, props.config, "last");
|
|
150
|
+
api2.getCalendarDays(props.modelValue, props.config, "next");
|
|
151
|
+
state.weekDates = api2.getAllDatesOfCurrWeek(props.modelValue || /* @__PURE__ */ new Date());
|
|
78
152
|
});
|
|
79
153
|
onMounted(() => {
|
|
80
154
|
api2.calcCalendarItemHeight();
|
package/calendar-view/index.js
CHANGED
|
@@ -285,7 +285,7 @@ const getEventByDate = ({ state }) => (date, events) => {
|
|
|
285
285
|
const getEventByTime = ({ props, state }) => (day, start, end) => {
|
|
286
286
|
const date = typeof day === "object" ? day.year + "-" + day.month + "-" + day.value : day;
|
|
287
287
|
const startTime = getTime(date + " " + start);
|
|
288
|
-
const endTime = getTime(date + " " + (end
|
|
288
|
+
const endTime = getTime(date + " " + (end || start));
|
|
289
289
|
let result = [];
|
|
290
290
|
if (state.mode === "timeline") {
|
|
291
291
|
const halfHourMillisecond = 30 * 60 * 1e3;
|
|
@@ -314,7 +314,7 @@ const getEventByTime = ({ props, state }) => (day, start, end) => {
|
|
|
314
314
|
const isStartOrEndDay = ({ state }) => (type, day, start, end, event) => {
|
|
315
315
|
const date = day.toString().length > 2 ? day : state.activeYear + "-" + state.activeMonth + "-" + day;
|
|
316
316
|
const startTime = getTime(date + " " + start);
|
|
317
|
-
const endTime = getTime(date + " " + (end
|
|
317
|
+
const endTime = getTime(date + " " + (end || start));
|
|
318
318
|
if (type === "start") {
|
|
319
319
|
return event.start >= startTime && event.start < endTime;
|
|
320
320
|
} else {
|
package/card/index.js
CHANGED
|
@@ -5,23 +5,23 @@ const handelIconClick = ({ emit }) => (item, index, event) => {
|
|
|
5
5
|
return;
|
|
6
6
|
emit("icon-click", item, index, event);
|
|
7
7
|
};
|
|
8
|
-
const getSliceNum = ({
|
|
8
|
+
const getSliceNum = ({ state }) => () => {
|
|
9
9
|
const sliceNumMap = {
|
|
10
10
|
"mini": 1,
|
|
11
11
|
"small": 2,
|
|
12
12
|
"medium": 3,
|
|
13
13
|
"large": 5
|
|
14
14
|
};
|
|
15
|
-
return sliceNumMap[
|
|
15
|
+
return sliceNumMap[state.size];
|
|
16
16
|
};
|
|
17
|
-
const getIconNum = ({
|
|
17
|
+
const getIconNum = ({ state }) => () => {
|
|
18
18
|
const iconNumMap = {
|
|
19
19
|
"mini": 2,
|
|
20
20
|
"small": 3,
|
|
21
21
|
"medium": 4,
|
|
22
22
|
"large": 6
|
|
23
23
|
};
|
|
24
|
-
return iconNumMap[
|
|
24
|
+
return iconNumMap[state.size];
|
|
25
25
|
};
|
|
26
26
|
const handleChange = ({ constants, dispatch, emit, state, nextTick }) => () => {
|
|
27
27
|
nextTick(() => {
|
package/card/vue.js
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
computedStore,
|
|
13
13
|
getItemChecked
|
|
14
14
|
} from "./index";
|
|
15
|
-
const api = ["state", "handelIconClick"];
|
|
15
|
+
const api = ["state", "handelIconClick", "handleChange"];
|
|
16
16
|
const renderless = (props, { reactive, watch, computed }, { vm, parent, emit, constants, nextTick, dispatch }) => {
|
|
17
17
|
const api2 = {};
|
|
18
18
|
const state = reactive({
|
|
@@ -23,7 +23,7 @@ const renderless = (props, { reactive, watch, computed }, { vm, parent, emit, co
|
|
|
23
23
|
iconNum: computed(() => api2.getIconNum()),
|
|
24
24
|
effectOptions: computed(() => props.options.filter((item) => !item.hidden)),
|
|
25
25
|
store: computed(() => api2.computedStore()),
|
|
26
|
-
|
|
26
|
+
customClass: computed(() => props.customClass || state.cardGroup.customClass || ""),
|
|
27
27
|
autoWidth: computed(() => props.autoWidth || state.cardGroup.autoWidth),
|
|
28
28
|
height: computed(() => props.height || state.cardGroup.height),
|
|
29
29
|
status: computed(() => props.status || state.cardGroup.status || "default"),
|
|
@@ -52,7 +52,6 @@ const renderless = (props, { reactive, watch, computed }, { vm, parent, emit, co
|
|
|
52
52
|
handelIconClick: handelIconClick({ emit }),
|
|
53
53
|
getItemChecked: getItemChecked({ state, props })
|
|
54
54
|
});
|
|
55
|
-
watch(() => state.model, api2.handleChange, { deep: true });
|
|
56
55
|
watch(
|
|
57
56
|
() => state.disabled,
|
|
58
57
|
() => {
|
package/card-group/vue.js
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
|
-
import { getStyle } from "./index";
|
|
3
2
|
const api = ["state"];
|
|
4
|
-
const renderless = (props, { reactive
|
|
3
|
+
const renderless = (props, { reactive }, { vm }) => {
|
|
5
4
|
const api2 = {};
|
|
6
|
-
const state = reactive({
|
|
7
|
-
style: computed(() => api2.getStyle())
|
|
8
|
-
});
|
|
5
|
+
const state = reactive({});
|
|
9
6
|
Object.assign(api2, {
|
|
10
|
-
state
|
|
11
|
-
getStyle: getStyle({ props })
|
|
7
|
+
state
|
|
12
8
|
});
|
|
13
9
|
vm.$on("handleChange", (value) => {
|
|
14
10
|
vm.$emit("change", value);
|
package/carousel/index.js
CHANGED
|
@@ -1,20 +1,7 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
2
|
import throttle from "../common/deps/throttle";
|
|
3
|
+
import { getDirection } from "../common/deps/touch";
|
|
3
4
|
import { POSITION } from "../common";
|
|
4
|
-
const pauseTimer = (state) => () => clearInterval(state.timer);
|
|
5
|
-
const playSlides = ({ props, state }) => () => {
|
|
6
|
-
if (state.activeIndex < state.items.length - 1) {
|
|
7
|
-
state.activeIndex++;
|
|
8
|
-
} else if (props.loop) {
|
|
9
|
-
state.activeIndex = 0;
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
const startTimer = ({ api, props, state }) => () => {
|
|
13
|
-
if (props.interval <= 0 || !props.autoplay) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
state.timer = setInterval(api.playSlides, props.interval);
|
|
17
|
-
};
|
|
18
5
|
const handleMouseEnter = ({ api, state }) => () => {
|
|
19
6
|
state.hover = true;
|
|
20
7
|
api.pauseTimer();
|
|
@@ -52,10 +39,26 @@ const resetItemPosition = (state) => (oldIndex) => {
|
|
|
52
39
|
});
|
|
53
40
|
}
|
|
54
41
|
};
|
|
42
|
+
const playSlides = ({ props, state }) => () => {
|
|
43
|
+
if (state.activeIndex < state.items.length - 1) {
|
|
44
|
+
state.activeIndex++;
|
|
45
|
+
} else if (props.loop) {
|
|
46
|
+
state.activeIndex = 0;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
const pauseTimer = (state) => () => clearInterval(state.timer);
|
|
50
|
+
const startTimer = ({ api, props, state }) => () => {
|
|
51
|
+
if (props.interval <= 0 || !props.autoplay) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
state.timer = setInterval(api.playSlides, props.interval);
|
|
55
|
+
};
|
|
55
56
|
const setActiveItem = ({ api, props, state }) => (index) => {
|
|
56
57
|
if (typeof index === "string") {
|
|
57
|
-
const filteredItems = state.items.
|
|
58
|
-
|
|
58
|
+
const filteredItems = state.items.filter((item) => item.name === index);
|
|
59
|
+
if (filteredItems.length > 0) {
|
|
60
|
+
index = state.items.indexOf(filteredItems[0]);
|
|
61
|
+
}
|
|
59
62
|
}
|
|
60
63
|
index = Number(index);
|
|
61
64
|
if (isNaN(index) || index !== Math.floor(index)) {
|
|
@@ -101,7 +104,13 @@ const computedStyle = ({ props }) => () => {
|
|
|
101
104
|
if (props.height) {
|
|
102
105
|
return { "height": props.height };
|
|
103
106
|
} else {
|
|
104
|
-
|
|
107
|
+
if (CSS.supports("aspect-ratio", "auto")) {
|
|
108
|
+
return { "aspect-ratio": props.aspectRatio.replace(":", " / ") };
|
|
109
|
+
} else {
|
|
110
|
+
const ratio = props.aspectRatio.split(":");
|
|
111
|
+
const paddingTop = (ratio[1] / ratio[0] * 100).toFixed(2) + "%";
|
|
112
|
+
return { "width": "100%", "height": 0, "padding-top": paddingTop };
|
|
113
|
+
}
|
|
105
114
|
}
|
|
106
115
|
};
|
|
107
116
|
const onComplete = ({ count, emit, props, state }) => (total) => {
|
|
@@ -171,16 +180,6 @@ const touchend = ({ state, api }) => (event) => {
|
|
|
171
180
|
}
|
|
172
181
|
api.startTimer();
|
|
173
182
|
};
|
|
174
|
-
function getDirection(x, y) {
|
|
175
|
-
const MIN_DISTANCE = 10;
|
|
176
|
-
if (x > y && x > MIN_DISTANCE) {
|
|
177
|
-
return "horizontal";
|
|
178
|
-
}
|
|
179
|
-
if (y > x && y > MIN_DISTANCE) {
|
|
180
|
-
return "vertical";
|
|
181
|
-
}
|
|
182
|
-
return "";
|
|
183
|
-
}
|
|
184
183
|
function resetTouchStatus(state) {
|
|
185
184
|
state.direction = "";
|
|
186
185
|
state.delta = 0;
|
package/carousel/vue.js
CHANGED
|
@@ -58,19 +58,19 @@ const api = [
|
|
|
58
58
|
];
|
|
59
59
|
const initState = ({ reactive, computed, api: api2 }) => {
|
|
60
60
|
const state = reactive({
|
|
61
|
-
items: [],
|
|
62
61
|
itemsTranslate: [],
|
|
62
|
+
items: [],
|
|
63
63
|
timer: null,
|
|
64
64
|
hover: false,
|
|
65
65
|
activeIndex: -1,
|
|
66
66
|
completed: false,
|
|
67
|
-
containerWidth: 0,
|
|
68
67
|
delta: 0,
|
|
69
|
-
|
|
68
|
+
containerWidth: 0,
|
|
69
|
+
deltaPos: {
|
|
70
70
|
X: 0,
|
|
71
71
|
Y: 0
|
|
72
72
|
},
|
|
73
|
-
|
|
73
|
+
startPos: {
|
|
74
74
|
X: 0,
|
|
75
75
|
Y: 0
|
|
76
76
|
},
|
|
@@ -79,44 +79,44 @@ const initState = ({ reactive, computed, api: api2 }) => {
|
|
|
79
79
|
Y: 0
|
|
80
80
|
},
|
|
81
81
|
touchTime: 0,
|
|
82
|
-
direction: "",
|
|
83
82
|
size: 0,
|
|
83
|
+
direction: "",
|
|
84
84
|
moving: false,
|
|
85
|
-
moveDisable: false,
|
|
86
85
|
isCorrectDirection: false,
|
|
86
|
+
moveDisable: false,
|
|
87
87
|
noTouchNode: ["svg", "BUTTON", "path", "g"],
|
|
88
88
|
style: computed(() => api2.computedStyle()),
|
|
89
89
|
hasLabel: computed(() => api2.computedHasLabel(state.items))
|
|
90
90
|
});
|
|
91
91
|
return state;
|
|
92
92
|
};
|
|
93
|
-
const initApi = ({ api: api2, state, props, emit
|
|
93
|
+
const initApi = ({ vm, api: api2, state, props, emit }) => {
|
|
94
94
|
Object.assign(api2, {
|
|
95
95
|
state,
|
|
96
96
|
computedHasLabel,
|
|
97
|
+
touchend: touchend({ state, api: api2 }),
|
|
97
98
|
touchstart: touchstart({ state, api: api2 }),
|
|
98
99
|
touchmove: touchmove({ props, state, vm }),
|
|
99
|
-
touchend: touchend({ state, api: api2 }),
|
|
100
100
|
playSlides: playSlides({ props, state }),
|
|
101
|
-
pauseTimer: pauseTimer(state),
|
|
102
101
|
onComplete: onComplete({ count: 0, emit, props, state }),
|
|
102
|
+
pauseTimer: pauseTimer(state),
|
|
103
103
|
itemInStage: itemInStage(state),
|
|
104
104
|
resetItemPosition: resetItemPosition(state),
|
|
105
|
+
watchItems: watchItems({ api: api2, props }),
|
|
105
106
|
handleButtonLeave: handleButtonLeave(state),
|
|
106
107
|
handleIndicatorClick: handleIndicatorClick(state),
|
|
107
108
|
handleIndicatorHover: handleIndicatorHover({ props, state }),
|
|
108
|
-
watchItems: watchItems({ api: api2, props }),
|
|
109
109
|
watchActiveIndex: watchActiveIndex({ api: api2, emit }),
|
|
110
110
|
watchAutoplay: watchAutoplay(api2),
|
|
111
111
|
startTimer: startTimer({ api: api2, props, state }),
|
|
112
112
|
prev: prev({ api: api2, state }),
|
|
113
113
|
next: next({ api: api2, state }),
|
|
114
|
+
throttledArrowClick: throttledArrowClick(api2),
|
|
114
115
|
setActiveItem: setActiveItem({ api: api2, props, state }),
|
|
115
116
|
handleMouseEnter: handleMouseEnter({ api: api2, state }),
|
|
116
117
|
handleMouseLeave: handleMouseLeave({ api: api2, state }),
|
|
117
|
-
handleButtonEnter: handleButtonEnter({ api: api2, state }),
|
|
118
|
-
throttledArrowClick: throttledArrowClick(api2),
|
|
119
118
|
throttledIndicatorHover: throttledIndicatorHover(api2),
|
|
119
|
+
handleButtonEnter: handleButtonEnter({ api: api2, state }),
|
|
120
120
|
computedStyle: computedStyle({ props })
|
|
121
121
|
});
|
|
122
122
|
};
|
|
@@ -124,17 +124,39 @@ const initWatch = ({ watch, props, api: api2, state }) => {
|
|
|
124
124
|
watch(() => props.autoplay, api2.watchAutoplay);
|
|
125
125
|
watch(
|
|
126
126
|
() => props.loop,
|
|
127
|
-
() =>
|
|
128
|
-
api2.setActiveItem(state.activeIndex);
|
|
129
|
-
}
|
|
127
|
+
() => api2.setActiveItem(state.activeIndex)
|
|
130
128
|
);
|
|
131
129
|
};
|
|
132
|
-
const
|
|
130
|
+
const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, watch }, { vm, parent, emit, constants, childrenHandler }) => {
|
|
131
|
+
const api2 = {};
|
|
132
|
+
const state = initState({ reactive, computed, api: api2 });
|
|
133
|
+
initApi({ vm, api: api2, state, props, emit });
|
|
134
|
+
const { updateItems } = useItems({ api: api2, vm, onMounted, state, watch, constants, childrenHandler, parent });
|
|
135
|
+
api2.updateItems = updateItems;
|
|
136
|
+
useActiveIndex({ api: api2, parent, props, state, watch });
|
|
137
|
+
useResizeListener({ api: api2, onBeforeUnmount, onMounted, parent });
|
|
138
|
+
initWatch({ watch, props, api: api2, state });
|
|
139
|
+
onMounted(() => {
|
|
140
|
+
api2.startTimer();
|
|
141
|
+
api2.onComplete(state.items.length);
|
|
142
|
+
});
|
|
143
|
+
parent.$on("updateItems", api2.updateItems);
|
|
144
|
+
parent.$on("complete", () => {
|
|
145
|
+
api2.onComplete(state.items.length);
|
|
146
|
+
});
|
|
147
|
+
return api2;
|
|
148
|
+
};
|
|
149
|
+
const useItems = ({ api: api2, onMounted, state, watch, constants, childrenHandler, parent }) => {
|
|
133
150
|
const updateItems = () => {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
151
|
+
let $children = [];
|
|
152
|
+
$children = parent.$children && parent.$children[0].$children.filter((child) => {
|
|
153
|
+
return child.$el.classList && Array.from(child.$el.classList).includes("tiny-carousel__item");
|
|
137
154
|
});
|
|
155
|
+
if (!$children.length) {
|
|
156
|
+
childrenHandler(({ options, vm }) => {
|
|
157
|
+
options.name === constants.CHILD_NAME && $children.push(vm);
|
|
158
|
+
});
|
|
159
|
+
}
|
|
138
160
|
state.items = $children;
|
|
139
161
|
};
|
|
140
162
|
watch(
|
|
@@ -163,33 +185,6 @@ const useResizeListener = ({ api: api2, onBeforeUnmount, onMounted, parent }) =>
|
|
|
163
185
|
}
|
|
164
186
|
});
|
|
165
187
|
};
|
|
166
|
-
const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, watch }, { vm, parent, constants, emit, childrenHandler }) => {
|
|
167
|
-
const api2 = {};
|
|
168
|
-
const state = initState({ reactive, computed, api: api2 });
|
|
169
|
-
initApi({ api: api2, state, props, emit, vm });
|
|
170
|
-
const { updateItems } = useItems({
|
|
171
|
-
api: api2,
|
|
172
|
-
vm,
|
|
173
|
-
onMounted,
|
|
174
|
-
state,
|
|
175
|
-
watch,
|
|
176
|
-
constants,
|
|
177
|
-
childrenHandler
|
|
178
|
-
});
|
|
179
|
-
api2.updateItems = updateItems;
|
|
180
|
-
useActiveIndex({ api: api2, parent, props, state, watch });
|
|
181
|
-
useResizeListener({ api: api2, onBeforeUnmount, onMounted, parent });
|
|
182
|
-
initWatch({ watch, props, api: api2, state });
|
|
183
|
-
onMounted(() => {
|
|
184
|
-
api2.startTimer();
|
|
185
|
-
api2.onComplete(state.items.length);
|
|
186
|
-
});
|
|
187
|
-
parent.$on("updateItems", api2.updateItems);
|
|
188
|
-
parent.$on("complete", () => {
|
|
189
|
-
api2.onComplete(state.items.length);
|
|
190
|
-
});
|
|
191
|
-
return api2;
|
|
192
|
-
};
|
|
193
188
|
export {
|
|
194
189
|
api,
|
|
195
190
|
renderless,
|
package/carousel-item/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
__spreadValues
|
|
3
|
+
} from "../chunk-G2ADBYYC.js";
|
|
2
4
|
const processIndex = ({ activeIndex, index, length }) => {
|
|
3
5
|
if (activeIndex === 0 && index === length - 1) {
|
|
4
6
|
return -1;
|
|
@@ -47,20 +49,21 @@ const translateItem = ({ api, CARD_SCALE, parent, state }) => ({ activeIndex, in
|
|
|
47
49
|
}
|
|
48
50
|
state.ready = true;
|
|
49
51
|
};
|
|
50
|
-
const handleItemClick = (parent) => () => {
|
|
52
|
+
const handleItemClick = ({ state, parent }) => () => {
|
|
51
53
|
const vnode = parent.$parent;
|
|
52
54
|
if (vnode && vnode.type === parent.$constants.TYPE_CARD) {
|
|
53
|
-
const index = vnode.state.items.findIndex((item) => item
|
|
55
|
+
const index = vnode.state.items.findIndex((item) => item.state.translate === state.translate);
|
|
54
56
|
vnode.setActiveItem(index);
|
|
55
57
|
}
|
|
56
58
|
};
|
|
57
|
-
const computedTransform = ({ parent, TYPE_VERTICAL }) => (
|
|
59
|
+
const computedTransform = ({ parent, TYPE_VERTICAL, mode, state }) => () => {
|
|
58
60
|
const TRANSLATE = parent.$parent.type === TYPE_VERTICAL ? `translateY(${state.translate + state.delta}px) scale(${state.scale})` : `translateX(${state.translate + state.delta}px) scale(${state.scale})`;
|
|
59
|
-
|
|
61
|
+
const style = mode === "mobile-first" ? { width: "100%", height: "100%" } : {};
|
|
62
|
+
return __spreadValues({
|
|
60
63
|
msTransform: TRANSLATE,
|
|
61
64
|
webkitTransform: TRANSLATE,
|
|
62
65
|
transform: TRANSLATE
|
|
63
|
-
};
|
|
66
|
+
}, style);
|
|
64
67
|
};
|
|
65
68
|
const resetAnimatingMf = (state) => () => {
|
|
66
69
|
state.animatingMf = false;
|
package/carousel-item/vue.js
CHANGED
|
@@ -27,7 +27,7 @@ const api = [
|
|
|
27
27
|
"resetAnimatingMf",
|
|
28
28
|
"setDelta"
|
|
29
29
|
];
|
|
30
|
-
const renderless = (props, { computed, onMounted, onUnmounted, reactive }, { parent, dispatch }) => {
|
|
30
|
+
const renderless = (props, { computed, onMounted, onUnmounted, reactive }, { parent, dispatch, mode }) => {
|
|
31
31
|
const api2 = {};
|
|
32
32
|
const CARD_SCALE = parent.$constants.CARD_SCALE;
|
|
33
33
|
const TYPE_VERTICAL = parent.$constants.TYPE_VERTICAL;
|
|
@@ -45,14 +45,14 @@ const renderless = (props, { computed, onMounted, onUnmounted, reactive }, { par
|
|
|
45
45
|
hasTitle: computed(() => !!props.title),
|
|
46
46
|
moving: computed(() => parent.$parent.state.moving),
|
|
47
47
|
animate: computed(() => Math.abs(parent.$parent.state.delta) > 0 ? !state.animatingMf : state.animating),
|
|
48
|
-
getTransform: computed(() => api2.computedTransform(
|
|
48
|
+
getTransform: computed(() => api2.computedTransform()),
|
|
49
49
|
delta: 0
|
|
50
50
|
});
|
|
51
51
|
Object.assign(api2, {
|
|
52
52
|
state,
|
|
53
53
|
processIndex,
|
|
54
|
-
handleItemClick: handleItemClick(parent),
|
|
55
|
-
computedTransform: computedTransform({ parent, TYPE_VERTICAL }),
|
|
54
|
+
handleItemClick: handleItemClick({ state, parent }),
|
|
55
|
+
computedTransform: computedTransform({ parent, TYPE_VERTICAL, mode, state }),
|
|
56
56
|
calculateTranslate: calculateTranslate({ CARD_SCALE, state }),
|
|
57
57
|
translateItem: translateItem({ api: api2, CARD_SCALE, parent, state }),
|
|
58
58
|
setDelta: setDelta({ state }),
|
package/cascader-mobile/index.js
CHANGED
|
@@ -8,7 +8,11 @@ const close = ({ state, emit }) => () => {
|
|
|
8
8
|
const syncCheckStatus = ({ state, props, api }) => (value) => {
|
|
9
9
|
const { valueField, textField, modelValue: propsModelValue, visible } = props;
|
|
10
10
|
const { lazy, isLeaf: leafField } = api.getNodeConfig();
|
|
11
|
-
let currentData
|
|
11
|
+
let currentData;
|
|
12
|
+
let navList = [];
|
|
13
|
+
let modelValue = value || propsModelValue || [];
|
|
14
|
+
let len = modelValue.length;
|
|
15
|
+
let isLeaf;
|
|
12
16
|
if (!visible) {
|
|
13
17
|
return;
|
|
14
18
|
}
|
package/cascader-mobile/vue.js
CHANGED
|
@@ -51,7 +51,8 @@ const renderless = (props, { computed, reactive, watch }, { emit, constants }) =
|
|
|
51
51
|
filterOptions: []
|
|
52
52
|
},
|
|
53
53
|
options: computed(() => {
|
|
54
|
-
let arr
|
|
54
|
+
let arr;
|
|
55
|
+
let list = [state.rootData];
|
|
55
56
|
state.navList.map((option) => {
|
|
56
57
|
arr = option.childNodes;
|
|
57
58
|
arr && arr.length && list.push(arr);
|
package/cascader-panel/index.js
CHANGED
|
@@ -206,8 +206,12 @@ const getCheckedNodes = ({ api, state }) => (leafOnly, cascaderCheckedValue) =>
|
|
|
206
206
|
return flag;
|
|
207
207
|
}
|
|
208
208
|
for (let i = 0; i < checkedValue.length; i++) {
|
|
209
|
-
if (Array.isArray(checkedValue[i])
|
|
210
|
-
|
|
209
|
+
if (Array.isArray(checkedValue[i])) {
|
|
210
|
+
if (checkedValue[i].length) {
|
|
211
|
+
flag = checkedValue[i][checkedValue[i].length - 1] === str;
|
|
212
|
+
}
|
|
213
|
+
} else {
|
|
214
|
+
flag = checkedValue[i] === str;
|
|
211
215
|
}
|
|
212
216
|
if (flag) {
|
|
213
217
|
break;
|