@opentiny/vue-renderless 3.11.7 → 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 +3 -4
- 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 +6 -6
- package/select/vue.js +1 -1
- 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/file-upload/vue.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
2
|
import { downloadFile as ordinaryDownload } from "../upload-list";
|
|
3
|
+
import { formatFileSize } from "../common/string";
|
|
3
4
|
import {
|
|
4
5
|
initService,
|
|
5
6
|
getNewTabPreviewUrl,
|
|
@@ -22,6 +23,8 @@ import {
|
|
|
22
23
|
handleSuccess,
|
|
23
24
|
handleError,
|
|
24
25
|
handleRemove,
|
|
26
|
+
handleReUpload,
|
|
27
|
+
handleReUploadTotal,
|
|
25
28
|
onBeforeDestroy,
|
|
26
29
|
submit,
|
|
27
30
|
watchListType,
|
|
@@ -54,6 +57,7 @@ import {
|
|
|
54
57
|
downloadFileSingle,
|
|
55
58
|
downloadFileBatch,
|
|
56
59
|
downloadFileSingleHwh5,
|
|
60
|
+
downloadAsyncPackage,
|
|
57
61
|
validateDownloadStatus,
|
|
58
62
|
mounted,
|
|
59
63
|
handleChange,
|
|
@@ -66,6 +70,7 @@ import {
|
|
|
66
70
|
handleClickFileList,
|
|
67
71
|
computedSourcetype,
|
|
68
72
|
getFileSourceType,
|
|
73
|
+
encryptDialogConfirm,
|
|
69
74
|
handleTriggerClick
|
|
70
75
|
} from "./index";
|
|
71
76
|
import { isEmptyObject } from "../common/type";
|
|
@@ -82,6 +87,8 @@ const api = [
|
|
|
82
87
|
"handleSuccess",
|
|
83
88
|
"handleError",
|
|
84
89
|
"handleRemove",
|
|
90
|
+
"handleReUpload",
|
|
91
|
+
"handleReUploadTotal",
|
|
85
92
|
"submit",
|
|
86
93
|
"handleClick",
|
|
87
94
|
"getFileUploadUrl",
|
|
@@ -91,7 +98,9 @@ const api = [
|
|
|
91
98
|
"handleChange",
|
|
92
99
|
"abortDownload",
|
|
93
100
|
"handleClickFileList",
|
|
94
|
-
"handleTriggerClick"
|
|
101
|
+
"handleTriggerClick",
|
|
102
|
+
"encryptDialogConfirm",
|
|
103
|
+
"formatFileSize"
|
|
95
104
|
];
|
|
96
105
|
const initState = ({ api: api2, reactive, computed, inject, ref, vm, props, httpRequest, service }) => {
|
|
97
106
|
const state = reactive({
|
|
@@ -152,7 +161,11 @@ const initState = ({ api: api2, reactive, computed, inject, ref, vm, props, http
|
|
|
152
161
|
types: computed(() => api2.computedSourcetype()),
|
|
153
162
|
triggerClickType: "",
|
|
154
163
|
visible: false,
|
|
155
|
-
downloadParamsWhitelist: ["docId", "wmType", "docVersion"]
|
|
164
|
+
downloadParamsWhitelist: ["docId", "wmType", "docVersion"],
|
|
165
|
+
encryptDialogConfig: {
|
|
166
|
+
show: false,
|
|
167
|
+
selectFileMethod: null
|
|
168
|
+
}
|
|
156
169
|
});
|
|
157
170
|
return state;
|
|
158
171
|
};
|
|
@@ -179,7 +192,7 @@ const initApi = ({ api: api2, state, props, constants, vm, $service, t, Modal })
|
|
|
179
192
|
ordinaryDownload: ordinaryDownload($service),
|
|
180
193
|
clearUploadingFiles: clearUploadingFiles({ constants, state }),
|
|
181
194
|
calcUploadingFilesInfo: calcUploadingFilesInfo({ state, constants }),
|
|
182
|
-
properFileSize: properFileSize({ props, state, constants, Modal, t }),
|
|
195
|
+
properFileSize: properFileSize({ props, state, api: api2, constants, Modal, t }),
|
|
183
196
|
mounted: mounted({ vm, state }),
|
|
184
197
|
previewFileSingle: previewFileSingle({ api: api2, state, props, constants, service: $service }),
|
|
185
198
|
previewFileBatch: previewFileBatch({ service: $service, props, state, api: api2 }),
|
|
@@ -188,7 +201,9 @@ const initApi = ({ api: api2, state, props, constants, vm, $service, t, Modal })
|
|
|
188
201
|
abortDownload: abortDownload({ state }),
|
|
189
202
|
createDownloadCancelToken: createDownloadCancelToken({ state, service: $service }),
|
|
190
203
|
computedSourcetype: computedSourcetype({ props, constants }),
|
|
191
|
-
getFileSourceType: getFileSourceType({ state, props, constants })
|
|
204
|
+
getFileSourceType: getFileSourceType({ state, props, constants }),
|
|
205
|
+
encryptDialogConfirm: encryptDialogConfirm({ state }),
|
|
206
|
+
formatFileSize
|
|
192
207
|
});
|
|
193
208
|
};
|
|
194
209
|
const mergeApi = ({ api: api2, props, $service, state, constants, emit, mode, Modal, t, vm, CryptoJS, Streamsaver }) => {
|
|
@@ -206,9 +221,11 @@ const mergeApi = ({ api: api2, props, $service, state, constants, emit, mode, Mo
|
|
|
206
221
|
batchSegmentUpload: batchSegmentUpload({ api: api2, constants, props, vm, state }),
|
|
207
222
|
largeDocumentUpload: largeDocumentUpload({ api: api2, Modal, state, emit, constants, t }),
|
|
208
223
|
handleProgress: handleProgress({ api: api2, constants, emit, state }),
|
|
209
|
-
handleSuccess: handleSuccess({ api: api2, constants, emit, props, state }),
|
|
210
|
-
handleError: handleError({ api: api2, constants, emit, state }),
|
|
224
|
+
handleSuccess: handleSuccess({ api: api2, constants, emit, Modal, props, state, t }),
|
|
225
|
+
handleError: handleError({ api: api2, constants, emit, state, props }),
|
|
211
226
|
handleRemove: handleRemove({ api: api2, emit, props, state, constants }),
|
|
227
|
+
handleReUpload: handleReUpload({ vm, constants }),
|
|
228
|
+
handleReUploadTotal: handleReUploadTotal(api2),
|
|
212
229
|
updateUrl: updateUrl({ api: api2, props, state }),
|
|
213
230
|
startUpload: startUpload({ api: api2, state, constants, vm, Modal, t }),
|
|
214
231
|
beforeUpload: beforeUpload({ api: api2, props, Modal, constants, t, state }),
|
|
@@ -225,6 +242,7 @@ const mergeApi = ({ api: api2, props, $service, state, constants, emit, mode, Mo
|
|
|
225
242
|
downloadFileSingle: downloadFileSingle({ service: $service, constants, props, state, api: api2, emit }),
|
|
226
243
|
downloadFileBatch: downloadFileBatch({ api: api2, service: $service, props, state, emit }),
|
|
227
244
|
downloadFileSingleHwh5: downloadFileSingleHwh5({ state, props, emit, constants }),
|
|
245
|
+
downloadAsyncPackage: downloadAsyncPackage({ state, props, api: api2, constants, service: $service }),
|
|
228
246
|
validateDownloadStatus: validateDownloadStatus({ state, Modal }),
|
|
229
247
|
handleChange: handleChange({ vm, constants }),
|
|
230
248
|
handleClickFileList: handleClickFileList({ state, emit }),
|
package/filter/index.js
CHANGED
|
@@ -13,8 +13,9 @@ const resize = ({ state, vm, props }) => () => {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
|
-
const panelToggle = ({ state, props, api }) => (index) => {
|
|
16
|
+
const panelToggle = ({ state, props, api, emit }) => (index) => {
|
|
17
17
|
const { modelValue } = props;
|
|
18
|
+
emit("panel", { index, modelValue });
|
|
18
19
|
if (index === "filter") {
|
|
19
20
|
state.showPanelIndex = -1;
|
|
20
21
|
state.filterPanel.show = !state.filterPanel.show;
|
package/filter/vue.js
CHANGED
|
@@ -44,7 +44,7 @@ const renderless = (props, { reactive, computed, onMounted, onBeforeUnmount }, {
|
|
|
44
44
|
});
|
|
45
45
|
Object.assign(api2, {
|
|
46
46
|
state,
|
|
47
|
-
panelToggle: panelToggle({ state, props, api: api2 }),
|
|
47
|
+
panelToggle: panelToggle({ state, props, api: api2, emit }),
|
|
48
48
|
filterSelectOption: filterSelectOption({ state, props, emit, api: api2 }),
|
|
49
49
|
filterConfirm: filterConfirm({ state, props, emit }),
|
|
50
50
|
selectOption: selectOption({ state, props, emit, api: api2 }),
|
package/form-item/index.js
CHANGED
|
@@ -85,10 +85,10 @@ const computedContentStyle = ({ props, state }) => () => {
|
|
|
85
85
|
}
|
|
86
86
|
return result;
|
|
87
87
|
};
|
|
88
|
-
const computedForm = ({ constants,
|
|
88
|
+
const computedForm = ({ constants, vm, state }) => () => {
|
|
89
89
|
var _a, _b, _c;
|
|
90
90
|
const { FORM_NAME, FORM_ITEM_NAME } = constants;
|
|
91
|
-
let parent = (_a =
|
|
91
|
+
let parent = (_a = vm.$parent) == null ? void 0 : _a.$parent;
|
|
92
92
|
let parentName = (_b = parent == null ? void 0 : parent.$options) == null ? void 0 : _b.componentName;
|
|
93
93
|
while (parent && parentName !== FORM_NAME) {
|
|
94
94
|
if (parentName === FORM_ITEM_NAME) {
|
|
@@ -153,16 +153,10 @@ const computedFieldValue = ({ props, state }) => () => {
|
|
|
153
153
|
}
|
|
154
154
|
return getPropByPath(model, path, true).v;
|
|
155
155
|
};
|
|
156
|
-
const mounted = ({
|
|
157
|
-
|
|
158
|
-
instance,
|
|
159
|
-
props,
|
|
160
|
-
state,
|
|
161
|
-
refs
|
|
162
|
-
}) => () => {
|
|
163
|
-
state.tooltip = refs.tooltip;
|
|
156
|
+
const mounted = ({ api, vm, props, state }) => () => {
|
|
157
|
+
state.tooltip = vm.$refs.tooltip;
|
|
164
158
|
if (props.prop) {
|
|
165
|
-
api.dispatch("Form", "form:addField",
|
|
159
|
+
api.dispatch("Form", "form:addField", vm);
|
|
166
160
|
let initialValue = state.fieldValue;
|
|
167
161
|
if (Array.isArray(initialValue)) {
|
|
168
162
|
initialValue = [].concat(initialValue);
|
|
@@ -171,14 +165,14 @@ const mounted = ({
|
|
|
171
165
|
api.addValidateEvents();
|
|
172
166
|
}
|
|
173
167
|
};
|
|
174
|
-
const unmounted = ({ api,
|
|
168
|
+
const unmounted = ({ api, vm, state }) => () => {
|
|
175
169
|
state.canShowTip = false;
|
|
176
|
-
api.dispatch("Form", "form:removeField",
|
|
170
|
+
api.dispatch("Form", "form:removeField", vm);
|
|
177
171
|
};
|
|
178
172
|
const validate = ({ api, props, state, t }) => (trigger, callback = () => void 0) => {
|
|
179
173
|
state.validateDisabled = false;
|
|
180
174
|
const rules = api.getFilteredRule(trigger);
|
|
181
|
-
if ((!rules || rules.length === 0) && props.required === void 0) {
|
|
175
|
+
if ((!rules || rules.length === 0) && props.required === void 0 || props.validateDisabled) {
|
|
182
176
|
callback();
|
|
183
177
|
return;
|
|
184
178
|
}
|
|
@@ -271,24 +265,24 @@ const onFieldChange = ({ api, state }) => () => {
|
|
|
271
265
|
const updateComputedLabelWidth = (state) => (width) => {
|
|
272
266
|
state.computedLabelWidth = width ? `${width}px` : "";
|
|
273
267
|
};
|
|
274
|
-
const addValidateEvents = ({ api,
|
|
268
|
+
const addValidateEvents = ({ api, vm, props, state }) => () => {
|
|
275
269
|
const rules = api.getRules();
|
|
276
270
|
if (rules.length || props.required !== void 0) {
|
|
277
271
|
const manual = props.manual || (state.formInstance ? state.formInstance.manual : false);
|
|
278
272
|
if (!manual) {
|
|
279
|
-
|
|
280
|
-
|
|
273
|
+
vm.$on("form.blur", api.onFieldBlur);
|
|
274
|
+
vm.$on("form.change", api.onFieldChange);
|
|
281
275
|
}
|
|
282
276
|
}
|
|
283
277
|
};
|
|
284
|
-
const removeValidateEvents = (
|
|
285
|
-
|
|
278
|
+
const removeValidateEvents = (vm) => () => {
|
|
279
|
+
vm.$off();
|
|
286
280
|
};
|
|
287
|
-
const updateTip = ({
|
|
281
|
+
const updateTip = ({ vm, state }) => () => {
|
|
288
282
|
if (state.getValidateType !== "tip" && !state.canShowTip) {
|
|
289
283
|
return;
|
|
290
284
|
}
|
|
291
|
-
const tooltip = refs.tooltip;
|
|
285
|
+
const tooltip = vm.$refs.tooltip;
|
|
292
286
|
if (!tooltip) {
|
|
293
287
|
return;
|
|
294
288
|
}
|
|
@@ -341,6 +335,14 @@ const handleMouseenter = ({ state }) => (e) => {
|
|
|
341
335
|
state.form.showTooltip(dom, state.displayedValue);
|
|
342
336
|
}
|
|
343
337
|
};
|
|
338
|
+
const handleLabelMouseenter = ({ props, state, slots }) => (e) => {
|
|
339
|
+
if (!state.form.overflowTitle || !state.form || slots.label)
|
|
340
|
+
return;
|
|
341
|
+
const label = e.target;
|
|
342
|
+
if (label && label.scrollWidth > label.offsetWidth) {
|
|
343
|
+
state.form.showTooltip(label, props.label + state.form.labelSuffix);
|
|
344
|
+
}
|
|
345
|
+
};
|
|
344
346
|
const handleMouseleave = (state) => () => {
|
|
345
347
|
state.form && state.form.hideTooltip();
|
|
346
348
|
};
|
|
@@ -375,6 +377,7 @@ export {
|
|
|
375
377
|
getPropByPath,
|
|
376
378
|
getRules,
|
|
377
379
|
getValueByPath,
|
|
380
|
+
handleLabelMouseenter,
|
|
378
381
|
handleMouseenter,
|
|
379
382
|
handleMouseleave,
|
|
380
383
|
mounted,
|
package/form-item/vue.js
CHANGED
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
wrapValidate,
|
|
29
29
|
getDisplayedValue,
|
|
30
30
|
clearDisplayedValue,
|
|
31
|
+
handleLabelMouseenter,
|
|
31
32
|
handleMouseenter,
|
|
32
33
|
handleMouseleave
|
|
33
34
|
} from "./index";
|
|
@@ -45,6 +46,7 @@ const api = [
|
|
|
45
46
|
"removeValidateEvents",
|
|
46
47
|
"updateTip",
|
|
47
48
|
"getDisplayedValue",
|
|
49
|
+
"handleLabelMouseenter",
|
|
48
50
|
"handleMouseenter",
|
|
49
51
|
"handleMouseleave"
|
|
50
52
|
];
|
|
@@ -88,7 +90,6 @@ const initState = ({
|
|
|
88
90
|
isDisplayOnly: computed(() => state.formInstance.displayOnly),
|
|
89
91
|
labelPosition: computed(() => state.formInstance.labelPosition),
|
|
90
92
|
hideRequiredAsterisk: computed(() => state.formInstance.state.hideRequiredAsterisk),
|
|
91
|
-
// isErrorInline: computed(() => state.formInstance.state.isErrorInline),
|
|
92
93
|
labelSuffix: computed(() => state.formInstance.labelSuffix),
|
|
93
94
|
labelWidth: computed(() => state.formInstance.labelWidth),
|
|
94
95
|
showMessage: computed(() => state.formInstance.showMessage),
|
|
@@ -100,18 +101,18 @@ const initState = ({
|
|
|
100
101
|
});
|
|
101
102
|
return state;
|
|
102
103
|
};
|
|
103
|
-
const initApi = ({ api: api2, state, dispatch, broadcast,
|
|
104
|
+
const initApi = ({ api: api2, state, dispatch, broadcast, props, constants, vm, t, nextTick, slots }) => {
|
|
104
105
|
Object.assign(api2, {
|
|
105
106
|
state,
|
|
106
107
|
dispatch,
|
|
107
108
|
broadcast,
|
|
108
109
|
watchError: watchError(state),
|
|
109
|
-
updateTip: updateTip({
|
|
110
|
+
updateTip: updateTip({ vm, state }),
|
|
110
111
|
watchValidateStatus: watchValidateStatus(state),
|
|
111
112
|
computedLabelStyle: computedLabelStyle({ props, state }),
|
|
112
113
|
computedValueStyle: computedValueStyle({ props, state }),
|
|
113
114
|
computedContentStyle: computedContentStyle({ props, state }),
|
|
114
|
-
computedForm: computedForm({ constants,
|
|
115
|
+
computedForm: computedForm({ constants, vm, state }),
|
|
115
116
|
computedFieldValue: computedFieldValue({ props, state }),
|
|
116
117
|
computedGetValidateType: computedGetValidateType({ props, state }),
|
|
117
118
|
computedValidateIcon: computedValidateIcon({ props, state }),
|
|
@@ -120,18 +121,19 @@ const initApi = ({ api: api2, state, dispatch, broadcast, refs, props, constants
|
|
|
120
121
|
clearValidate: clearValidate(state),
|
|
121
122
|
getRules: getRules({ props, state }),
|
|
122
123
|
updateComputedLabelWidth: updateComputedLabelWidth(state),
|
|
123
|
-
removeValidateEvents: removeValidateEvents(
|
|
124
|
-
unmounted: unmounted({ api: api2,
|
|
125
|
-
mounted: mounted({ api: api2,
|
|
124
|
+
removeValidateEvents: removeValidateEvents(vm),
|
|
125
|
+
unmounted: unmounted({ api: api2, vm, state }),
|
|
126
|
+
mounted: mounted({ api: api2, vm, props, state }),
|
|
126
127
|
computedIsRequired: computedIsRequired({ api: api2, state }),
|
|
127
128
|
resetField: resetField({ api: api2, nextTick, props, state }),
|
|
128
129
|
getFilteredRule: getFilteredRule(api2),
|
|
129
130
|
onFieldBlur: onFieldBlur(api2),
|
|
130
131
|
onFieldChange: onFieldChange({ api: api2, state }),
|
|
131
|
-
addValidateEvents: addValidateEvents({ api: api2,
|
|
132
|
+
addValidateEvents: addValidateEvents({ api: api2, vm, props, state }),
|
|
132
133
|
validate: wrapValidate({ validateFunc: validate({ api: api2, props, state, t }), props }),
|
|
133
134
|
getDisplayedValue: getDisplayedValue({ state }),
|
|
134
135
|
clearDisplayedValue: clearDisplayedValue({ state }),
|
|
136
|
+
handleLabelMouseenter: handleLabelMouseenter({ props, state, slots }),
|
|
135
137
|
handleMouseenter: handleMouseenter({ state }),
|
|
136
138
|
handleMouseleave: handleMouseleave(state)
|
|
137
139
|
});
|
|
@@ -141,14 +143,14 @@ const initWatch = ({ watch, api: api2, props, state }) => {
|
|
|
141
143
|
watch(() => props.validateStatus, api2.watchValidateStatus);
|
|
142
144
|
watch(() => state.formInstance.displayOnly, api2.clearDisplayedValue);
|
|
143
145
|
};
|
|
144
|
-
const renderless = (props, { computed, inject, onMounted, onUnmounted, provide, reactive, watch }, { vm
|
|
146
|
+
const renderless = (props, { computed, inject, onMounted, onUnmounted, provide, reactive, watch }, { vm, constants, t, nextTick, broadcast, dispatch, mode, slots }) => {
|
|
145
147
|
const api2 = {};
|
|
146
148
|
const state = initState({ reactive, computed, api: api2, mode, inject, props });
|
|
147
|
-
provide("formItem",
|
|
148
|
-
initApi({ api: api2, state, dispatch, broadcast,
|
|
149
|
+
provide("formItem", vm);
|
|
150
|
+
initApi({ api: api2, state, dispatch, broadcast, props, constants, vm, t, nextTick, slots });
|
|
149
151
|
initWatch({ watch, api: api2, props, state });
|
|
150
152
|
onMounted(api2.mounted);
|
|
151
|
-
|
|
153
|
+
vm.$on("displayed-value-changed", (param) => {
|
|
152
154
|
api2.getDisplayedValue(param);
|
|
153
155
|
});
|
|
154
156
|
onUnmounted(api2.unmounted);
|
package/grid/plugins/export.js
CHANGED
|
@@ -81,14 +81,6 @@ const downloadCsc = (options, content) => {
|
|
|
81
81
|
}
|
|
82
82
|
if (navigator.msSaveBlob && window.Blob) {
|
|
83
83
|
navigator.msSaveBlob(new Blob([content], { type: "text/csv;charset=utf-8" }), options.filename);
|
|
84
|
-
} else if (browser.name === "ie") {
|
|
85
|
-
const win = window.top.open("about:blank", "_blank");
|
|
86
|
-
win.opener = null;
|
|
87
|
-
win.document.charset = "utf-8";
|
|
88
|
-
win.document.write(content);
|
|
89
|
-
win.document.close();
|
|
90
|
-
win.document.execCommand("SaveAs", options.filename);
|
|
91
|
-
win.close();
|
|
92
84
|
} else {
|
|
93
85
|
const linkElem = document.createElement("a");
|
|
94
86
|
linkElem.target = "_blank";
|
package/grid/utils/common.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
__spreadValues
|
|
3
|
+
} from "../../chunk-G2ADBYYC.js";
|
|
3
4
|
import { isNull } from "../../common/type";
|
|
4
5
|
import { find } from "../../common/array";
|
|
5
6
|
import { get, isFunction, set, findTree } from "../static";
|
|
@@ -27,21 +28,17 @@ const getFilters = (filters) => (filters || []).map(({ label, value, data, check
|
|
|
27
28
|
checked: !!checked
|
|
28
29
|
}));
|
|
29
30
|
const initFilter = (filter) => {
|
|
30
|
-
return
|
|
31
|
-
{
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
value: []
|
|
38
|
-
},
|
|
39
|
-
hasFilter: false,
|
|
40
|
-
custom: null
|
|
31
|
+
return __spreadValues({
|
|
32
|
+
condition: {
|
|
33
|
+
input: "",
|
|
34
|
+
relation: "equals",
|
|
35
|
+
empty: null,
|
|
36
|
+
type: null,
|
|
37
|
+
value: []
|
|
41
38
|
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
);
|
|
39
|
+
hasFilter: false,
|
|
40
|
+
custom: null
|
|
41
|
+
}, filter);
|
|
45
42
|
};
|
|
46
43
|
const formatText = (value) => `${isNull(value) ? "" : value}`;
|
|
47
44
|
const setCellValue = (row, column, value) => {
|
package/image-viewer/index.js
CHANGED
|
@@ -529,7 +529,7 @@ const touchmove = (state) => (event) => {
|
|
|
529
529
|
clearTimeout(state.time);
|
|
530
530
|
};
|
|
531
531
|
const touchend = (state) => (e) => {
|
|
532
|
-
|
|
532
|
+
let moveX = 0;
|
|
533
533
|
state.endX = e.changedTouches[0].clientX;
|
|
534
534
|
moveX = state.endX - state.firstX;
|
|
535
535
|
if (!state.boxVisibility) {
|
package/ip-address/index.js
CHANGED
|
@@ -6,7 +6,9 @@ const ipValidator = ({ props, api }) => (value) => {
|
|
|
6
6
|
let result = true;
|
|
7
7
|
if (props.type) {
|
|
8
8
|
if (api.isIP6(props.type)) {
|
|
9
|
-
result = /^(((([\da-fA-F]{1,4}):){7}([\da-fA-F]{1,4}))|(((([\da-fA-F]{1,4}):){1,7}:)|((([\da-fA-F]{1,4}):){6}:([\da-fA-F]{1,4}))|((([\da-fA-F]{1,4}):){5}:(([\da-fA-F]{1,4}):)?([\da-fA-F]{1,4}))|((([\da-fA-F]{1,4}):){4}:(([\da-fA-F]{1,4}):){0,2}([\da-fA-F]{1,4}))|((([\da-fA-F]{1,4}):){3}:(([\da-fA-F]{1,4}):){0,3}([\da-fA-F]{1,4}))|((([\da-fA-F]{1,4}):){2}:(([\da-fA-F]{1,4}):){0,4}([\da-fA-F]{1,4}))|((([\da-fA-F]{1,4}):){1}:(([\da-fA-F]{1,4}):){0,5}([\da-fA-F]{1,4}))|(::(([\da-fA-F]{1,4}):){0,6}([\da-fA-F]{1,4}))|(::([\da-fA-F]{1,4})?))|(((([\da-fA-F]{1,4}):){6}(((1?[1-9]?\d)|(10\d)|(2[0-4]\d)|(25[0-5]))\.){3}((1?[1-9]?\d)|(10\d)|(2[0-4]\d)|(25[0-5])))|((([\da-fA-F]{1,4}):){5}:(((1?[1-9]?\d)|(10\d)|(2[0-4]\d)|(25[0-5]))\.){3}((1?[1-9]?\d)|(10\d)|(2[0-4]\d)|(25[0-5])))|((([\da-fA-F]{1,4}):){4}:(([\da-fA-F]{1,4}):)?(((1?[1-9]?\d)|(10\d)|(2[0-4]\d)|(25[0-5]))\.){3}((1?[1-9]?\d)|(10\d)|(2[0-4]\d)|(25[0-5])))|((([\da-fA-F]{1,4}):){3}:(([\da-fA-F]{1,4}):){0,2}(((1?[1-9]?\d)|(10\d)|(2[0-4]\d)|(25[0-5]))\.){3}((1?[1-9]?\d)|(10\d)|(2[0-4]\d)|(25[0-5])))|((([\da-fA-F]{1,4}):){2}:(([\da-fA-F]{1,4}):){0,3}(((1?[1-9]?\d)|(10\d)|(2[0-4]\d)|(25[0-5]))\.){3}((1?[1-9]?\d)|(10\d)|(2[0-4]\d)|(25[0-5])))|(([\da-fA-F]{1,4})::(([\da-fA-F]{1,4}):){0,4}(((1?[1-9]?\d)|(10\d)|(2[0-4]\d)|(25[0-5]))\.){3}((1?[1-9]?\d)|(10\d)|(2[0-4]\d)|(25[0-5])))|(::(([\da-fA-F]{1,4}):){0,5}(((1?[1-9]?\d)|(10\d)|(2[0-4]\d)|(25[0-5]))\.){3}((1?[1-9]?\d)|(10\d)|(2[0-4]\d)|(25[0-5])))))$/.test(
|
|
9
|
+
result = /^(((([\da-fA-F]{1,4}):){7}([\da-fA-F]{1,4}))|(((([\da-fA-F]{1,4}):){1,7}:)|((([\da-fA-F]{1,4}):){6}:([\da-fA-F]{1,4}))|((([\da-fA-F]{1,4}):){5}:(([\da-fA-F]{1,4}):)?([\da-fA-F]{1,4}))|((([\da-fA-F]{1,4}):){4}:(([\da-fA-F]{1,4}):){0,2}([\da-fA-F]{1,4}))|((([\da-fA-F]{1,4}):){3}:(([\da-fA-F]{1,4}):){0,3}([\da-fA-F]{1,4}))|((([\da-fA-F]{1,4}):){2}:(([\da-fA-F]{1,4}):){0,4}([\da-fA-F]{1,4}))|((([\da-fA-F]{1,4}):){1}:(([\da-fA-F]{1,4}):){0,5}([\da-fA-F]{1,4}))|(::(([\da-fA-F]{1,4}):){0,6}([\da-fA-F]{1,4}))|(::([\da-fA-F]{1,4})?))|(((([\da-fA-F]{1,4}):){6}(((1?[1-9]?\d)|(10\d)|(2[0-4]\d)|(25[0-5]))\.){3}((1?[1-9]?\d)|(10\d)|(2[0-4]\d)|(25[0-5])))|((([\da-fA-F]{1,4}):){5}:(((1?[1-9]?\d)|(10\d)|(2[0-4]\d)|(25[0-5]))\.){3}((1?[1-9]?\d)|(10\d)|(2[0-4]\d)|(25[0-5])))|((([\da-fA-F]{1,4}):){4}:(([\da-fA-F]{1,4}):)?(((1?[1-9]?\d)|(10\d)|(2[0-4]\d)|(25[0-5]))\.){3}((1?[1-9]?\d)|(10\d)|(2[0-4]\d)|(25[0-5])))|((([\da-fA-F]{1,4}):){3}:(([\da-fA-F]{1,4}):){0,2}(((1?[1-9]?\d)|(10\d)|(2[0-4]\d)|(25[0-5]))\.){3}((1?[1-9]?\d)|(10\d)|(2[0-4]\d)|(25[0-5])))|((([\da-fA-F]{1,4}):){2}:(([\da-fA-F]{1,4}):){0,3}(((1?[1-9]?\d)|(10\d)|(2[0-4]\d)|(25[0-5]))\.){3}((1?[1-9]?\d)|(10\d)|(2[0-4]\d)|(25[0-5])))|(([\da-fA-F]{1,4})::(([\da-fA-F]{1,4}):){0,4}(((1?[1-9]?\d)|(10\d)|(2[0-4]\d)|(25[0-5]))\.){3}((1?[1-9]?\d)|(10\d)|(2[0-4]\d)|(25[0-5])))|(::(([\da-fA-F]{1,4}):){0,5}(((1?[1-9]?\d)|(10\d)|(2[0-4]\d)|(25[0-5]))\.){3}((1?[1-9]?\d)|(10\d)|(2[0-4]\d)|(25[0-5])))))$/.test(
|
|
10
|
+
value
|
|
11
|
+
);
|
|
10
12
|
} else if (api.isIP4(props.type)) {
|
|
11
13
|
result = /^((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3}$/.test(value);
|
|
12
14
|
}
|
|
@@ -61,7 +63,7 @@ const setValue = ({ api, props, state }) => (value) => {
|
|
|
61
63
|
insertIndex = index;
|
|
62
64
|
}
|
|
63
65
|
});
|
|
64
|
-
for (
|
|
66
|
+
for (let i = 0; i <= 8 - state.address.length; i++) {
|
|
65
67
|
state.address.splice(insertIndex, 0, { value: "0000" });
|
|
66
68
|
}
|
|
67
69
|
}
|
|
@@ -70,7 +72,8 @@ const setValue = ({ api, props, state }) => (value) => {
|
|
|
70
72
|
}
|
|
71
73
|
}
|
|
72
74
|
} else {
|
|
73
|
-
|
|
75
|
+
const createValue = () => ({ value: "" });
|
|
76
|
+
state.address = api.isIP6(props.type) ? new Array(8).fill("").map(createValue) : new Array(4).fill("").map(createValue);
|
|
74
77
|
}
|
|
75
78
|
};
|
|
76
79
|
const activeEvent = ({ emit, parent, state, index, event, type }) => {
|
package/menu/index.js
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import "../chunk-G2ADBYYC.js";
|
|
2
|
+
import { cloneDeep } from "../chart-core/deps/utils";
|
|
3
|
+
const filterInput = ({ state }) => (val) => {
|
|
4
|
+
state.filterValue = val;
|
|
5
|
+
};
|
|
6
|
+
const setIsCurrent = ({ props, vm, state }) => (data, node) => {
|
|
7
|
+
if (props.onlyCheckChildren && node.children)
|
|
8
|
+
return;
|
|
9
|
+
const nodeId = node.id;
|
|
10
|
+
if (state.filterValue && state.filterData.length) {
|
|
11
|
+
getIsCurrent(vm, { children: state.filterData }, nodeId);
|
|
12
|
+
state.activedKeys = nodeId;
|
|
13
|
+
} else {
|
|
14
|
+
getIsCurrent(vm, { children: data }, nodeId);
|
|
15
|
+
state.filterCheckedId = null;
|
|
16
|
+
}
|
|
17
|
+
state.activedNodeId = nodeId;
|
|
18
|
+
if (props.onlyCheckChildren) {
|
|
19
|
+
state.currentPaths = findPaths(data, nodeId);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
const getIsCurrent = (vm, node, nodeId) => {
|
|
23
|
+
if (!node.children)
|
|
24
|
+
return;
|
|
25
|
+
for (let i = 0; i < node.children.length; i++) {
|
|
26
|
+
const isCurrentNode = node.children[i].id === nodeId;
|
|
27
|
+
vm.$set(node.children[i], "isCurrent", isCurrentNode);
|
|
28
|
+
getIsCurrent(vm, node.children[i], nodeId);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
const filterNodes = ({ state, api, nextTick }) => (label) => {
|
|
32
|
+
if (label !== "") {
|
|
33
|
+
state.filterData = filterTree(cloneDeep(state.data), label);
|
|
34
|
+
} else {
|
|
35
|
+
state.filterData = [];
|
|
36
|
+
if (state.activedKeys) {
|
|
37
|
+
api.getActivedKeysPath(state.activedKeys);
|
|
38
|
+
nextTick(() => {
|
|
39
|
+
api.setIsCurrent(state.data, { id: state.activedKeys });
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
const getExpandedKeysPath = ({ state }) => (keys) => {
|
|
45
|
+
const paths = [];
|
|
46
|
+
const len = keys.length;
|
|
47
|
+
for (let i = 0; i < len; i++) {
|
|
48
|
+
if (!paths.includes(keys[i])) {
|
|
49
|
+
paths.push(...findPaths(state.data, keys[i]));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
state.expandedKeysPath = paths;
|
|
53
|
+
};
|
|
54
|
+
const getActivedKeysPath = ({ state }) => (key) => {
|
|
55
|
+
if (key !== null && key !== void 0) {
|
|
56
|
+
state.activedKeysPath = findPaths(state.data, key) || [];
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
const setNodeHidden = ({ props, vm, state }) => (nodeId) => {
|
|
60
|
+
if (state.filterValue && state.filterData.length) {
|
|
61
|
+
hiddenNode(vm, state.filterData, nodeId);
|
|
62
|
+
}
|
|
63
|
+
if (props.expandAll && !state.filterValue) {
|
|
64
|
+
hiddenNode(vm, state.data, nodeId);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
const setAllNodeVisible = ({ vm, state }) => () => {
|
|
68
|
+
setNodeVisible(vm, state.data);
|
|
69
|
+
};
|
|
70
|
+
const setNodeVisible = (vm, nodes) => {
|
|
71
|
+
if (!nodes)
|
|
72
|
+
return;
|
|
73
|
+
for (let i = 0; i < nodes.length; i++) {
|
|
74
|
+
vm.$set(nodes[i], "visible", true);
|
|
75
|
+
if (nodes[i].children) {
|
|
76
|
+
setNodeVisible(vm, nodes[i].children);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
const existChildren = (node) => node.children && node.children.length;
|
|
81
|
+
const filterTree = (nodes, label) => {
|
|
82
|
+
const result = [];
|
|
83
|
+
for (const node of nodes) {
|
|
84
|
+
if (existChildren(node)) {
|
|
85
|
+
node.children = filterTree(node.children, label);
|
|
86
|
+
}
|
|
87
|
+
if (node.label.includes(label) || existChildren(node)) {
|
|
88
|
+
node.visible = true;
|
|
89
|
+
result.push(node);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return result;
|
|
93
|
+
};
|
|
94
|
+
const hiddenNode = (vm, nodes, nodeId) => {
|
|
95
|
+
if (!nodes)
|
|
96
|
+
return;
|
|
97
|
+
for (let i = 0; i < nodes.length; i++) {
|
|
98
|
+
if (nodes[i].id === nodeId) {
|
|
99
|
+
vm.$set(nodes[i], "visible", false);
|
|
100
|
+
}
|
|
101
|
+
if (nodes[i].children) {
|
|
102
|
+
hiddenNode(vm, nodes[i].children, nodeId);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
const findPaths = (nodes, nodeId) => {
|
|
107
|
+
for (let i in nodes) {
|
|
108
|
+
if (nodes[i].id === nodeId) {
|
|
109
|
+
return [nodes[i].id];
|
|
110
|
+
}
|
|
111
|
+
if (nodes[i].children) {
|
|
112
|
+
let res = findPaths(nodes[i].children, nodeId);
|
|
113
|
+
if (res) {
|
|
114
|
+
return res.concat(nodes[i].id);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
export {
|
|
120
|
+
filterInput,
|
|
121
|
+
filterNodes,
|
|
122
|
+
getActivedKeysPath,
|
|
123
|
+
getExpandedKeysPath,
|
|
124
|
+
setAllNodeVisible,
|
|
125
|
+
setIsCurrent,
|
|
126
|
+
setNodeHidden
|
|
127
|
+
};
|
package/menu/vue.js
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import "../chunk-G2ADBYYC.js";
|
|
2
|
+
import {
|
|
3
|
+
setIsCurrent,
|
|
4
|
+
filterNodes,
|
|
5
|
+
getExpandedKeysPath,
|
|
6
|
+
getActivedKeysPath,
|
|
7
|
+
setNodeHidden,
|
|
8
|
+
setAllNodeVisible,
|
|
9
|
+
filterInput
|
|
10
|
+
} from "./index";
|
|
11
|
+
import debounce from "../common/deps/debounce";
|
|
12
|
+
const api = ["state", "setIsCurrent", "filterNodes", "filterInput"];
|
|
13
|
+
const renderless = (props, { reactive, watch, onMounted, computed }, { vm, emit, nextTick }) => {
|
|
14
|
+
const api2 = {};
|
|
15
|
+
const state = reactive({
|
|
16
|
+
isEmpty: computed(() => props.data.length !== 0 && state.filterValue && state.filterData.length === 0),
|
|
17
|
+
activedNodeId: null,
|
|
18
|
+
filterCheckedId: null,
|
|
19
|
+
activedKeys: props.activedKeys,
|
|
20
|
+
expandedKeysPath: [],
|
|
21
|
+
activedKeysPath: [],
|
|
22
|
+
filterText: "",
|
|
23
|
+
filterValue: "",
|
|
24
|
+
currentPaths: [],
|
|
25
|
+
filterData: [],
|
|
26
|
+
data: props.data
|
|
27
|
+
});
|
|
28
|
+
Object.assign(api2, {
|
|
29
|
+
state,
|
|
30
|
+
setIsCurrent: setIsCurrent({ props, vm, state, emit, nextTick }),
|
|
31
|
+
filterNodes: debounce(100, filterNodes({ vm, state, api: api2, nextTick })),
|
|
32
|
+
setNodeHidden: setNodeHidden({ props, vm, state }),
|
|
33
|
+
getActivedKeysPath: getActivedKeysPath({ state }),
|
|
34
|
+
getExpandedKeysPath: getExpandedKeysPath({ state }),
|
|
35
|
+
setAllNodeVisible: setAllNodeVisible({ vm, state }),
|
|
36
|
+
filterInput: filterInput({ state })
|
|
37
|
+
});
|
|
38
|
+
watch(
|
|
39
|
+
() => props.expandAll,
|
|
40
|
+
() => {
|
|
41
|
+
props.expandAll && api2.setAllNodeVisible();
|
|
42
|
+
},
|
|
43
|
+
{ immediate: true }
|
|
44
|
+
);
|
|
45
|
+
watch(
|
|
46
|
+
() => state.filterValue,
|
|
47
|
+
() => {
|
|
48
|
+
api2.filterNodes(state.filterValue);
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
watch(
|
|
52
|
+
() => props.expandedKeys,
|
|
53
|
+
() => {
|
|
54
|
+
if (props.expandedKeys && props.expandedKeys.length) {
|
|
55
|
+
api2.getExpandedKeysPath(props.expandedKeys);
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{ deep: true, immediate: true }
|
|
59
|
+
);
|
|
60
|
+
watch(
|
|
61
|
+
() => props.activedKeys,
|
|
62
|
+
() => {
|
|
63
|
+
state.activedKeys = props.activedKeys;
|
|
64
|
+
api2.getActivedKeysPath(props.activedKeys);
|
|
65
|
+
},
|
|
66
|
+
{ immediate: true }
|
|
67
|
+
);
|
|
68
|
+
watch(
|
|
69
|
+
() => props.data,
|
|
70
|
+
() => {
|
|
71
|
+
state.data = props.data;
|
|
72
|
+
},
|
|
73
|
+
{ deep: true, immediate: true }
|
|
74
|
+
);
|
|
75
|
+
onMounted(() => {
|
|
76
|
+
vm.$on("node-clicked", (param) => {
|
|
77
|
+
api2.setNodeHidden(param.id);
|
|
78
|
+
vm.$emit("node-click", param);
|
|
79
|
+
});
|
|
80
|
+
vm.$on("node-changed", (param) => {
|
|
81
|
+
vm.$emit("current-change", param);
|
|
82
|
+
api2.setIsCurrent(state.data, param);
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
return api2;
|
|
86
|
+
};
|
|
87
|
+
export {
|
|
88
|
+
api,
|
|
89
|
+
renderless
|
|
90
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "../chunk-G2ADBYYC.js";
|
|
2
|
+
const handelNodeClick = ({ state, dispatch }) => (node) => {
|
|
3
|
+
dispatch("Menu", "node-clicked", node);
|
|
4
|
+
if (node.disabled)
|
|
5
|
+
return;
|
|
6
|
+
state.showNodes = !state.showNodes;
|
|
7
|
+
state.activeNodeId = node.id;
|
|
8
|
+
dispatch("Menu", "node-changed", node);
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
handelNodeClick
|
|
12
|
+
};
|