@aplus-frontend/ui 0.0.1-beta.7 → 0.0.1-beta.9
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/es/index.mjs +163 -156
- package/es/src/ap-action/group/index.vue.mjs +22 -18
- package/es/src/ap-action/index.mjs +7 -4
- package/es/src/ap-action/interface.mjs +1 -0
- package/es/src/ap-action/item/index.vue.mjs +2 -47
- package/es/src/ap-action/item/index.vue2.mjs +47 -2
- package/es/src/ap-action/item-dropdown/index.vue.mjs +14 -11
- package/es/src/ap-action/item-modal/index.vue.mjs +9 -8
- package/es/src/ap-action/item-popconfirm/index.vue.mjs +10 -8
- package/es/src/ap-field/checkbox/index.vue.mjs +32 -25
- package/es/src/ap-field/date/index.vue.mjs +19 -20
- package/es/src/ap-field/date-range/index.vue.mjs +9 -9
- package/es/src/ap-field/index.d.ts +12 -0
- package/es/src/ap-field/index.mjs +42 -0
- package/es/src/ap-field/interface.d.ts +3 -2
- package/es/src/ap-field/interface.mjs +1 -0
- package/es/src/ap-field/number/helper.mjs +2 -2
- package/es/src/ap-field/number/index.vue.mjs +30 -32
- package/es/src/ap-field/radio/index.vue.mjs +40 -34
- package/es/src/ap-field/select/index.vue.mjs +1 -1
- package/es/src/ap-field/switch/index.vue.mjs +6 -6
- package/es/src/ap-field/text/index.vue.d.ts +5 -5
- package/es/src/ap-field/text/index.vue.mjs +29 -29
- package/es/src/ap-field/text-area/index.vue.mjs +5 -5
- package/es/src/ap-form/ap-form-item-group/index.vue.mjs +2 -56
- package/es/src/ap-form/ap-form-item-group/index.vue2.mjs +56 -2
- package/es/src/ap-form/ap-form-item.vue.d.ts +3 -0
- package/es/src/ap-form/ap-form-item.vue.mjs +2 -74
- package/es/src/ap-form/ap-form-item.vue2.mjs +80 -2
- package/es/src/ap-form/index.d.ts +31 -1682
- package/es/src/ap-form/index.mjs +12 -7
- package/es/src/ap-form/interface.d.ts +3 -1
- package/es/src/ap-form/items/index.d.ts +3 -0
- package/es/src/ap-form/items/index.mjs +1 -0
- package/es/src/ap-form/items/interface.d.ts +12 -0
- package/es/src/ap-form/items/text/index.vue.d.ts +69 -0
- package/es/src/ap-form/items/text/index.vue.mjs +102 -0
- package/es/src/ap-form/items/text/index.vue2.mjs +4 -0
- package/es/src/ap-form/style/ap-form-item.css +4 -0
- package/es/src/base-button/button.vue.mjs +2 -58
- package/es/src/base-button/button.vue2.mjs +59 -2
- package/es/src/base-button/index.mjs +8 -8
- package/es/src/base-button/interface.mjs +1 -0
- package/es/src/base-button/modal-button.vue.mjs +12 -11
- package/es/src/base-button/pop-confirm-button.vue.mjs +15 -14
- package/es/src/basic/arrow.vue.mjs +2 -38
- package/es/src/basic/arrow.vue2.mjs +38 -2
- package/es/src/basic/help.vue.mjs +2 -96
- package/es/src/basic/help.vue2.mjs +96 -2
- package/es/src/basic/index.mjs +11 -7
- package/es/src/basic/interface.mjs +1 -0
- package/es/src/basic/title.vue.mjs +2 -32
- package/es/src/basic/title.vue2.mjs +33 -2
- package/es/src/config-provider/config-provider-props.d.ts +4 -0
- package/es/src/config-provider/config-provider-props.mjs +6 -2
- package/es/src/config-provider/config-provider.d.ts +9 -0
- package/es/src/config-provider/config-provider.mjs +20 -16
- package/es/src/config-provider/hooks/use-global-config.d.ts +4 -0
- package/es/src/config-provider/hooks/use-locale.mjs +1 -0
- package/es/src/config-provider/index.d.ts +19 -0
- package/es/src/config-provider/index.mjs +26 -13
- package/es/src/container/collapse/header.vue.mjs +2 -49
- package/es/src/container/collapse/header.vue2.mjs +49 -2
- package/es/src/container/collapse/index.vue.mjs +2 -85
- package/es/src/container/collapse/index.vue2.mjs +86 -2
- package/es/src/container/collapse/style/header.css +1 -1
- package/es/src/container/collapse/style/index.css +1 -1
- package/es/src/container/index.mjs +8 -5
- package/es/src/container/interface.mjs +1 -0
- package/es/src/container/scroll-container.vue.mjs +2 -60
- package/es/src/container/scroll-container.vue2.mjs +60 -2
- package/es/src/count-down/button.vue.mjs +2 -44
- package/es/src/count-down/button.vue2.mjs +44 -2
- package/es/src/count-down/index.mjs +8 -5
- package/es/src/count-down/input.vue.mjs +2 -44
- package/es/src/count-down/input.vue2.mjs +45 -2
- package/es/src/count-down/interface.mjs +1 -0
- package/es/src/cropper/cropper-avatar.vue.mjs +2 -94
- package/es/src/cropper/cropper-avatar.vue2.mjs +96 -2
- package/es/src/cropper/cropper-image.vue.mjs +2 -129
- package/es/src/cropper/cropper-image.vue2.mjs +129 -2
- package/es/src/cropper/cropper-modal.vue.mjs +2 -270
- package/es/src/cropper/cropper-modal.vue2.mjs +271 -2
- package/es/src/cropper/index.mjs +8 -5
- package/es/src/cropper/interface.mjs +1 -0
- package/es/src/cropper/style/avatar.css +1 -1
- package/es/src/cropper/style/modal.css +2 -2
- package/es/src/description/description.vue.mjs +2 -169
- package/es/src/description/description.vue2.mjs +169 -2
- package/es/src/description/index.mjs +8 -5
- package/es/src/description/interface.mjs +1 -0
- package/es/src/dropdown/dropdown.vue.mjs +2 -92
- package/es/src/dropdown/dropdown.vue2.mjs +92 -2
- package/es/src/dropdown/index.mjs +5 -3
- package/es/src/dropdown/interface.mjs +1 -0
- package/es/src/hooks/index.mjs +6 -0
- package/es/src/hooks/useMessage.mjs +1 -1
- package/es/src/icon/icon.vue.mjs +2 -66
- package/es/src/icon/icon.vue2.mjs +67 -2
- package/es/src/icon/index.mjs +8 -5
- package/es/src/icon/interface.mjs +1 -0
- package/es/src/icon/svg-icon.vue.mjs +2 -32
- package/es/src/icon/svg-icon.vue2.mjs +32 -2
- package/es/src/icon-picker/icon-picker.vue.mjs +2 -166
- package/es/src/icon-picker/icon-picker.vue2.mjs +168 -2
- package/es/src/icon-picker/index.mjs +7 -5
- package/es/src/icon-picker/interface.mjs +1 -0
- package/es/src/index.mjs +163 -155
- package/es/src/locale/index.mjs +7 -0
- package/es/src/locale/interface.mjs +1 -0
- package/es/src/modal/basic.vue.mjs +2 -195
- package/es/src/modal/basic.vue2.mjs +199 -2
- package/es/src/modal/components/modal-close.vue.mjs +2 -72
- package/es/src/modal/components/modal-close.vue2.mjs +72 -2
- package/es/src/modal/components/modal-footer.vue.mjs +2 -43
- package/es/src/modal/components/modal-footer.vue2.mjs +43 -2
- package/es/src/modal/components/modal-header.vue.mjs +1 -18
- package/es/src/modal/components/modal-header.vue2.mjs +18 -1
- package/es/src/modal/components/modal-wrapper.vue.mjs +2 -99
- package/es/src/modal/components/modal-wrapper.vue2.mjs +102 -2
- package/es/src/modal/components/modal.mjs +6 -6
- package/es/src/modal/hooks/use-modal-drag.mjs +1 -1
- package/es/src/modal/hooks/use-modal.mjs +8 -8
- package/es/src/modal/index.mjs +10 -7
- package/es/src/modal/interface.mjs +1 -0
- package/es/src/modal/style/index.css +1 -1
- package/es/src/pro-form/component-map.mjs +56 -41
- package/es/src/pro-form/components/api-tree-select.vue.mjs +1 -1
- package/es/src/pro-form/components/form-action.vue.mjs +2 -105
- package/es/src/pro-form/components/form-action.vue2.mjs +105 -2
- package/es/src/pro-form/components/form-item.vue.mjs +2 -352
- package/es/src/pro-form/components/form-item.vue2.mjs +352 -2
- package/es/src/pro-form/components/interface.mjs +1 -0
- package/es/src/pro-form/hooks/use-break-point.mjs +21 -20
- package/es/src/pro-form/hooks/use-component-register.d.ts +4 -0
- package/es/src/pro-form/hooks/use-component-register.mjs +13 -0
- package/es/src/pro-form/hooks/use-form-events.mjs +1 -1
- package/es/src/pro-form/hooks/use-form-values.mjs +1 -1
- package/es/src/pro-form/hooks/use-form.mjs +4 -4
- package/es/src/pro-form/index.d.ts +1 -0
- package/es/src/pro-form/index.mjs +34 -34
- package/es/src/pro-form/pro-form.vue.d.ts +1 -1
- package/es/src/pro-form/pro-form.vue.mjs +39 -37
- package/es/src/pro-form/types/form-item.mjs +1 -0
- package/es/src/pro-form/types/form.d.ts +8 -8
- package/es/src/pro-table/component-map.mjs +29 -37
- package/es/src/pro-table/components/editable/editable-cell.vue.mjs +2 -378
- package/es/src/pro-table/components/editable/editable-cell.vue2.mjs +378 -2
- package/es/src/pro-table/components/editable/index.mjs +7 -6
- package/es/src/pro-table/components/header-cell.vue.mjs +2 -43
- package/es/src/pro-table/components/header-cell.vue2.mjs +44 -2
- package/es/src/pro-table/components/settings/column-setting.vue.mjs +2 -307
- package/es/src/pro-table/components/settings/column-setting.vue2.mjs +308 -2
- package/es/src/pro-table/components/settings/full-screen-setting.vue.mjs +2 -30
- package/es/src/pro-table/components/settings/full-screen-setting.vue2.mjs +30 -2
- package/es/src/pro-table/components/settings/index.vue.mjs +2 -59
- package/es/src/pro-table/components/settings/index.vue2.mjs +63 -2
- package/es/src/pro-table/components/settings/redo-setting.vue.mjs +2 -26
- package/es/src/pro-table/components/settings/redo-setting.vue2.mjs +26 -2
- package/es/src/pro-table/components/settings/size-setting.vue.mjs +2 -71
- package/es/src/pro-table/components/settings/size-setting.vue2.mjs +71 -2
- package/es/src/pro-table/components/table-action.vue.mjs +2 -2
- package/es/src/pro-table/components/table-footer.vue.mjs +2 -61
- package/es/src/pro-table/components/table-footer.vue2.mjs +61 -2
- package/es/src/pro-table/components/table-header.vue.mjs +2 -86
- package/es/src/pro-table/components/table-header.vue2.mjs +89 -2
- package/es/src/pro-table/components/table-selection-bar.vue.mjs +2 -40
- package/es/src/pro-table/components/table-selection-bar.vue2.mjs +40 -2
- package/es/src/pro-table/components/table-title.vue.mjs +2 -41
- package/es/src/pro-table/components/table-title.vue2.mjs +41 -2
- package/es/src/pro-table/hooks/use-columns.mjs +5 -5
- package/es/src/pro-table/hooks/use-data-source.mjs +1 -1
- package/es/src/pro-table/hooks/use-pagination.mjs +4 -4
- package/es/src/pro-table/hooks/use-scroll-to.mjs +1 -1
- package/es/src/pro-table/hooks/use-table-footer.mjs +8 -7
- package/es/src/pro-table/hooks/use-table-header.mjs +12 -11
- package/es/src/pro-table/index.mjs +12 -0
- package/es/src/pro-table/interface.d.ts +1 -1
- package/es/src/pro-table/interface.mjs +1 -0
- package/es/src/pro-table/pro-table.vue.d.ts +3 -0
- package/es/src/pro-table/pro-table.vue.mjs +69 -70
- package/es/src/pro-table/types/pagination.mjs +1 -0
- package/es/src/pro-table/types/table-action.mjs +1 -0
- package/es/src/pro-table/types/table.mjs +1 -0
- package/es/src/prompt/dialog.vue.mjs +2 -61
- package/es/src/prompt/dialog.vue2.mjs +58 -2
- package/es/src/prompt/index.mjs +9 -8
- package/es/src/prompt/utils.d.ts +3 -3
- package/es/src/scroll-bar/bar-item.mjs +4 -4
- package/es/src/scroll-bar/index.mjs +5 -3
- package/es/src/scroll-bar/interface.mjs +1 -0
- package/es/src/scroll-bar/scroll-bar.vue.mjs +2 -84
- package/es/src/scroll-bar/scroll-bar.vue2.mjs +84 -2
- package/es/src/strength-meter/index.mjs +5 -3
- package/es/src/strength-meter/interface.mjs +1 -0
- package/es/src/strength-meter/strength-meter.vue.mjs +2 -61
- package/es/src/strength-meter/strength-meter.vue2.mjs +61 -2
- package/es/src/theme/ap-form/ap-form-item.css +4 -0
- package/es/src/theme/collapse-container/header.css +1 -1
- package/es/src/theme/collapse-container/index.css +1 -1
- package/es/src/theme/cropper/avatar.css +1 -1
- package/es/src/theme/cropper/modal.css +2 -2
- package/es/src/theme/modal/index.css +1 -1
- package/es/src/transition/index.mjs +21 -24
- package/es/src/type.d.ts +1 -0
- package/es/src/utils/index.d.ts +1 -0
- package/es/src/utils/index.mjs +21 -8
- package/es/src/utils/tree.mjs +103 -13
- package/es/src/utils/uuid.mjs +15 -9
- package/lib/index.js +1 -1
- package/lib/src/ap-action/group/index.vue.js +1 -1
- package/lib/src/ap-action/index.js +1 -1
- package/lib/src/ap-action/interface.js +1 -0
- package/lib/src/ap-action/item/index.vue.js +1 -1
- package/lib/src/ap-action/item/index.vue2.js +1 -1
- package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
- package/lib/src/ap-action/item-modal/index.vue.js +1 -1
- package/lib/src/ap-action/item-popconfirm/index.vue.js +1 -1
- package/lib/src/ap-field/checkbox/index.vue.js +1 -1
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/index.d.ts +12 -0
- package/lib/src/ap-field/index.js +1 -0
- package/lib/src/ap-field/interface.d.ts +3 -2
- package/lib/src/ap-field/interface.js +1 -0
- package/lib/src/ap-field/number/helper.js +1 -1
- package/lib/src/ap-field/number/index.vue.js +1 -1
- package/lib/src/ap-field/radio/index.vue.js +1 -1
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-field/switch/index.vue.js +1 -1
- package/lib/src/ap-field/text/index.vue.d.ts +5 -5
- package/lib/src/ap-field/text/index.vue.js +1 -1
- package/lib/src/ap-field/text-area/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form-item-group/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form-item-group/index.vue2.js +1 -1
- package/lib/src/ap-form/ap-form-item.vue.d.ts +3 -0
- package/lib/src/ap-form/ap-form-item.vue.js +1 -1
- package/lib/src/ap-form/ap-form-item.vue2.js +1 -1
- package/lib/src/ap-form/index.d.ts +31 -1682
- package/lib/src/ap-form/index.js +1 -1
- package/lib/src/ap-form/interface.d.ts +3 -1
- package/lib/src/ap-form/items/index.d.ts +3 -0
- package/lib/src/ap-form/items/index.js +1 -0
- package/lib/src/ap-form/items/interface.d.ts +12 -0
- package/lib/src/ap-form/items/text/index.vue.d.ts +69 -0
- package/lib/src/ap-form/items/text/index.vue.js +1 -0
- package/lib/src/ap-form/items/text/index.vue2.js +1 -0
- package/lib/src/ap-form/style/ap-form-item.css +4 -0
- package/lib/src/base-button/button.vue.js +1 -1
- package/lib/src/base-button/button.vue2.js +1 -1
- package/lib/src/base-button/index.js +1 -1
- package/lib/src/base-button/interface.js +1 -0
- package/lib/src/base-button/modal-button.vue.js +1 -1
- package/lib/src/base-button/pop-confirm-button.vue.js +1 -1
- package/lib/src/basic/arrow.vue.js +1 -1
- package/lib/src/basic/arrow.vue2.js +1 -1
- package/lib/src/basic/help.vue.js +1 -1
- package/lib/src/basic/help.vue2.js +1 -1
- package/lib/src/basic/index.js +1 -1
- package/lib/src/basic/interface.js +1 -0
- package/lib/src/basic/title.vue.js +1 -1
- package/lib/src/basic/title.vue2.js +1 -1
- package/lib/src/config-provider/config-provider-props.d.ts +4 -0
- package/lib/src/config-provider/config-provider-props.js +1 -1
- package/lib/src/config-provider/config-provider.d.ts +9 -0
- package/lib/src/config-provider/config-provider.js +1 -1
- package/lib/src/config-provider/hooks/use-global-config.d.ts +4 -0
- package/lib/src/config-provider/hooks/use-locale.js +1 -1
- package/lib/src/config-provider/index.d.ts +19 -0
- package/lib/src/config-provider/index.js +1 -1
- package/lib/src/container/collapse/header.vue.js +1 -1
- package/lib/src/container/collapse/header.vue2.js +1 -1
- package/lib/src/container/collapse/index.vue.js +1 -1
- package/lib/src/container/collapse/index.vue2.js +1 -1
- package/lib/src/container/collapse/style/header.css +1 -1
- package/lib/src/container/collapse/style/index.css +1 -1
- package/lib/src/container/index.js +1 -1
- package/lib/src/container/interface.js +1 -0
- package/lib/src/container/scroll-container.vue.js +1 -1
- package/lib/src/container/scroll-container.vue2.js +1 -1
- package/lib/src/count-down/button.vue.js +1 -1
- package/lib/src/count-down/button.vue2.js +1 -1
- package/lib/src/count-down/index.js +1 -1
- package/lib/src/count-down/input.vue.js +1 -1
- package/lib/src/count-down/input.vue2.js +1 -1
- package/lib/src/count-down/interface.js +1 -0
- package/lib/src/cropper/cropper-avatar.vue.js +1 -1
- package/lib/src/cropper/cropper-avatar.vue2.js +1 -1
- package/lib/src/cropper/cropper-image.vue.js +1 -1
- package/lib/src/cropper/cropper-image.vue2.js +1 -1
- package/lib/src/cropper/cropper-modal.vue.js +1 -1
- package/lib/src/cropper/cropper-modal.vue2.js +1 -1
- package/lib/src/cropper/index.js +1 -1
- package/lib/src/cropper/interface.js +1 -0
- package/lib/src/cropper/style/avatar.css +1 -1
- package/lib/src/cropper/style/modal.css +2 -2
- package/lib/src/description/description.vue.js +1 -1
- package/lib/src/description/description.vue2.js +1 -1
- package/lib/src/description/index.js +1 -1
- package/lib/src/description/interface.js +1 -0
- package/lib/src/dropdown/dropdown.vue.js +1 -1
- package/lib/src/dropdown/dropdown.vue2.js +1 -1
- package/lib/src/dropdown/index.js +1 -1
- package/lib/src/dropdown/interface.js +1 -0
- package/lib/src/hooks/index.js +1 -0
- package/lib/src/icon/icon.vue.js +1 -1
- package/lib/src/icon/icon.vue2.js +1 -1
- package/lib/src/icon/index.js +1 -1
- package/lib/src/icon/interface.js +1 -0
- package/lib/src/icon/svg-icon.vue.js +1 -1
- package/lib/src/icon/svg-icon.vue2.js +1 -1
- package/lib/src/icon-picker/icon-picker.vue.js +1 -1
- package/lib/src/icon-picker/icon-picker.vue2.js +1 -1
- package/lib/src/icon-picker/index.js +1 -1
- package/lib/src/icon-picker/interface.js +1 -0
- package/lib/src/index.js +1 -1
- package/lib/src/locale/index.js +1 -0
- package/lib/src/locale/interface.js +1 -0
- package/lib/src/modal/basic.vue.js +1 -1
- package/lib/src/modal/basic.vue2.js +1 -1
- package/lib/src/modal/components/modal-close.vue.js +1 -1
- package/lib/src/modal/components/modal-close.vue2.js +1 -1
- package/lib/src/modal/components/modal-footer.vue.js +1 -1
- package/lib/src/modal/components/modal-footer.vue2.js +1 -1
- package/lib/src/modal/components/modal-header.vue.js +1 -1
- package/lib/src/modal/components/modal-header.vue2.js +1 -1
- package/lib/src/modal/components/modal-wrapper.vue.js +1 -1
- package/lib/src/modal/components/modal-wrapper.vue2.js +1 -1
- package/lib/src/modal/index.js +1 -1
- package/lib/src/modal/interface.js +1 -0
- package/lib/src/modal/style/index.css +1 -1
- package/lib/src/pro-form/component-map.js +1 -1
- package/lib/src/pro-form/components/form-action.vue.js +1 -1
- package/lib/src/pro-form/components/form-action.vue2.js +1 -1
- package/lib/src/pro-form/components/form-item.vue.js +1 -1
- package/lib/src/pro-form/components/form-item.vue2.js +1 -1
- package/lib/src/pro-form/components/interface.js +1 -0
- package/lib/src/pro-form/hooks/use-break-point.js +1 -1
- package/lib/src/pro-form/hooks/use-component-register.d.ts +4 -0
- package/lib/src/pro-form/hooks/use-component-register.js +1 -0
- package/lib/src/pro-form/index.d.ts +1 -0
- package/lib/src/pro-form/index.js +1 -1
- package/lib/src/pro-form/pro-form.vue.d.ts +1 -1
- package/lib/src/pro-form/pro-form.vue.js +1 -1
- package/lib/src/pro-form/types/form-item.js +1 -0
- package/lib/src/pro-form/types/form.d.ts +8 -8
- package/lib/src/pro-table/component-map.js +1 -1
- package/lib/src/pro-table/components/editable/editable-cell.vue.js +1 -1
- package/lib/src/pro-table/components/editable/editable-cell.vue2.js +1 -1
- package/lib/src/pro-table/components/editable/index.js +1 -1
- package/lib/src/pro-table/components/header-cell.vue.js +1 -1
- package/lib/src/pro-table/components/header-cell.vue2.js +1 -1
- package/lib/src/pro-table/components/settings/column-setting.vue.js +1 -1
- package/lib/src/pro-table/components/settings/column-setting.vue2.js +1 -1
- package/lib/src/pro-table/components/settings/full-screen-setting.vue.js +1 -1
- package/lib/src/pro-table/components/settings/full-screen-setting.vue2.js +1 -1
- package/lib/src/pro-table/components/settings/index.vue.js +1 -1
- package/lib/src/pro-table/components/settings/index.vue2.js +1 -1
- package/lib/src/pro-table/components/settings/redo-setting.vue.js +1 -1
- package/lib/src/pro-table/components/settings/redo-setting.vue2.js +1 -1
- package/lib/src/pro-table/components/settings/size-setting.vue.js +1 -1
- package/lib/src/pro-table/components/settings/size-setting.vue2.js +1 -1
- package/lib/src/pro-table/components/table-action.vue.js +1 -1
- package/lib/src/pro-table/components/table-footer.vue.js +1 -1
- package/lib/src/pro-table/components/table-footer.vue2.js +1 -1
- package/lib/src/pro-table/components/table-header.vue.js +1 -1
- package/lib/src/pro-table/components/table-header.vue2.js +1 -1
- package/lib/src/pro-table/components/table-selection-bar.vue.js +1 -1
- package/lib/src/pro-table/components/table-selection-bar.vue2.js +1 -1
- package/lib/src/pro-table/components/table-title.vue.js +1 -1
- package/lib/src/pro-table/components/table-title.vue2.js +1 -1
- package/lib/src/pro-table/hooks/use-table-footer.js +1 -1
- package/lib/src/pro-table/hooks/use-table-header.js +1 -1
- package/lib/src/pro-table/index.js +1 -0
- package/lib/src/pro-table/interface.d.ts +1 -1
- package/lib/src/pro-table/interface.js +1 -0
- package/lib/src/pro-table/pro-table.vue.d.ts +3 -0
- package/lib/src/pro-table/pro-table.vue.js +1 -1
- package/lib/src/pro-table/types/pagination.js +1 -0
- package/lib/src/pro-table/types/table-action.js +1 -0
- package/lib/src/pro-table/types/table.js +1 -0
- package/lib/src/prompt/dialog.vue.js +1 -1
- package/lib/src/prompt/dialog.vue2.js +1 -1
- package/lib/src/prompt/index.js +1 -1
- package/lib/src/prompt/utils.d.ts +3 -3
- package/lib/src/scroll-bar/index.js +1 -1
- package/lib/src/scroll-bar/interface.js +1 -0
- package/lib/src/scroll-bar/scroll-bar.vue.js +1 -1
- package/lib/src/scroll-bar/scroll-bar.vue2.js +1 -1
- package/lib/src/strength-meter/index.js +1 -1
- package/lib/src/strength-meter/interface.js +1 -0
- package/lib/src/strength-meter/strength-meter.vue.js +1 -1
- package/lib/src/strength-meter/strength-meter.vue2.js +1 -1
- package/lib/src/theme/ap-form/ap-form-item.css +4 -0
- package/lib/src/theme/collapse-container/header.css +1 -1
- package/lib/src/theme/collapse-container/index.css +1 -1
- package/lib/src/theme/cropper/avatar.css +1 -1
- package/lib/src/theme/cropper/modal.css +2 -2
- package/lib/src/theme/modal/index.css +1 -1
- package/lib/src/transition/index.js +1 -1
- package/lib/src/type.d.ts +1 -0
- package/lib/src/utils/index.d.ts +1 -0
- package/lib/src/utils/index.js +1 -1
- package/lib/src/utils/tree.js +1 -1
- package/lib/src/utils/uuid.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,88 @@
|
|
|
1
|
-
import f from "
|
|
1
|
+
import { defineComponent as p, ref as f, createVNode as t, unref as d, mergeProps as u, withDirectives as c, vShow as s } from "vue";
|
|
2
|
+
import "../../transition/index.mjs";
|
|
3
|
+
import { useTimeoutFn as g } from "@vueuse/core";
|
|
4
|
+
import { triggerWindowResize as v } from "@aplus-frontend/utils";
|
|
5
|
+
import { Skeleton as w } from "ant-design-vue";
|
|
6
|
+
import { isNil as y } from "lodash-unified";
|
|
7
|
+
import "../../config-provider/index.mjs";
|
|
8
|
+
import "./header.vue.mjs";
|
|
9
|
+
import "./style/index.css";
|
|
10
|
+
import { useNamespace as h } from "../../config-provider/hooks/use-namespace.mjs";
|
|
11
|
+
import _ from "./header.vue2.mjs";
|
|
12
|
+
import x from "../../transition/collapse-transition.vue.mjs";
|
|
13
|
+
const z = {
|
|
14
|
+
title: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: ""
|
|
17
|
+
},
|
|
18
|
+
loading: {
|
|
19
|
+
type: Boolean
|
|
20
|
+
},
|
|
21
|
+
/**
|
|
22
|
+
* Can it be expanded
|
|
23
|
+
*/
|
|
24
|
+
canExpand: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: !0
|
|
27
|
+
},
|
|
28
|
+
/**
|
|
29
|
+
* Warm reminder on the right side of the title
|
|
30
|
+
*/
|
|
31
|
+
helpMessage: {
|
|
32
|
+
type: [Array, String],
|
|
33
|
+
default: ""
|
|
34
|
+
},
|
|
35
|
+
/**
|
|
36
|
+
* Whether to trigger window.resize when expanding and contracting,
|
|
37
|
+
* Can adapt to tables and forms, when the form shrinks, the form triggers resize to adapt to the height
|
|
38
|
+
*/
|
|
39
|
+
triggerWindowResize: {
|
|
40
|
+
type: Boolean
|
|
41
|
+
},
|
|
42
|
+
/**
|
|
43
|
+
* Delayed loading time
|
|
44
|
+
*/
|
|
45
|
+
lazyTime: {
|
|
46
|
+
type: Number,
|
|
47
|
+
default: 0
|
|
48
|
+
}
|
|
49
|
+
}, k = /* @__PURE__ */ p({
|
|
50
|
+
name: "ApCollapseContainer",
|
|
51
|
+
props: z,
|
|
52
|
+
setup(i, {
|
|
53
|
+
expose: l,
|
|
54
|
+
slots: e
|
|
55
|
+
}) {
|
|
56
|
+
const {
|
|
57
|
+
b: m,
|
|
58
|
+
e: n
|
|
59
|
+
} = h("collapse-container"), r = f(!0), a = (o) => {
|
|
60
|
+
r.value = y(o) ? !r.value : o, i.triggerWindowResize && g(v, 200);
|
|
61
|
+
};
|
|
62
|
+
return l({
|
|
63
|
+
handleExpand: a
|
|
64
|
+
}), () => t("div", {
|
|
65
|
+
class: d(m())
|
|
66
|
+
}, [t(_, u(i, {
|
|
67
|
+
onExpand: a,
|
|
68
|
+
show: r.value
|
|
69
|
+
}), {
|
|
70
|
+
title: e.title,
|
|
71
|
+
action: e.action
|
|
72
|
+
}), t("div", {
|
|
73
|
+
class: n("content-wrapper")
|
|
74
|
+
}, [t(x, null, {
|
|
75
|
+
default: () => {
|
|
76
|
+
var o;
|
|
77
|
+
return [i.loading ? t(w, {
|
|
78
|
+
active: i.loading
|
|
79
|
+
}, null) : c(t("div", null, [(o = e.default) == null ? void 0 : o.call(e)]), [[s, r.value]])];
|
|
80
|
+
}
|
|
81
|
+
})]), e.footer && t("div", {
|
|
82
|
+
class: n("footer")
|
|
83
|
+
}, [e.footer()])]);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
2
86
|
export {
|
|
3
|
-
|
|
87
|
+
k as default
|
|
4
88
|
};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import "./scroll-container.vue.mjs";
|
|
2
|
+
import "./collapse/index.vue.mjs";
|
|
3
3
|
import { withInstall as o } from "@aplus-frontend/utils";
|
|
4
|
-
|
|
4
|
+
import "./interface.mjs";
|
|
5
|
+
import r from "./scroll-container.vue2.mjs";
|
|
6
|
+
import t from "./collapse/index.vue2.mjs";
|
|
7
|
+
const s = o(r), c = o(t);
|
|
5
8
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
9
|
+
c as CollapseContainer,
|
|
10
|
+
s as ScrollContainer
|
|
8
11
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,62 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Scrollbar as S } from "../scroll-bar/index.mjs";
|
|
3
|
-
import { useScrollTo as n } from "@aplus-frontend/hooks";
|
|
4
|
-
import "../config-provider/index.mjs";
|
|
5
|
-
import "./style/scroll-container.css";
|
|
6
|
-
import { useNamespace as k } from "../config-provider/hooks/use-namespace.mjs";
|
|
7
|
-
const y = /* @__PURE__ */ m({
|
|
8
|
-
name: "ApScrollContainer",
|
|
9
|
-
__name: "scroll-container",
|
|
10
|
-
props: {
|
|
11
|
-
scrollHeight: {}
|
|
12
|
-
},
|
|
13
|
-
setup(w, { expose: a }) {
|
|
14
|
-
const { b: i } = k("scroll-container"), l = g(null);
|
|
15
|
-
function s() {
|
|
16
|
-
const r = o(l);
|
|
17
|
-
return r ? r.wrap : null;
|
|
18
|
-
}
|
|
19
|
-
function p(r, t = 500) {
|
|
20
|
-
const e = o(s());
|
|
21
|
-
c(() => {
|
|
22
|
-
if (!e)
|
|
23
|
-
return;
|
|
24
|
-
const { start: u } = n({
|
|
25
|
-
el: e,
|
|
26
|
-
to: r,
|
|
27
|
-
duration: t
|
|
28
|
-
});
|
|
29
|
-
u();
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
function f() {
|
|
33
|
-
const r = o(s());
|
|
34
|
-
c(() => {
|
|
35
|
-
if (!r)
|
|
36
|
-
return;
|
|
37
|
-
const t = r.scrollHeight, { start: e } = n({
|
|
38
|
-
el: r,
|
|
39
|
-
to: t
|
|
40
|
-
});
|
|
41
|
-
e();
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
return a({
|
|
45
|
-
scrollTo: p,
|
|
46
|
-
scrollBottom: f
|
|
47
|
-
}), (r, t) => (h(), _(o(S), H({
|
|
48
|
-
ref_key: "scrollbarRef",
|
|
49
|
-
ref: l,
|
|
50
|
-
class: o(i)(),
|
|
51
|
-
scrollHeight: r.scrollHeight
|
|
52
|
-
}, r.$attrs), {
|
|
53
|
-
default: b(() => [
|
|
54
|
-
d(r.$slots, "default")
|
|
55
|
-
]),
|
|
56
|
-
_: 3
|
|
57
|
-
}, 16, ["class", "scrollHeight"]));
|
|
58
|
-
}
|
|
59
|
-
});
|
|
1
|
+
import f from "./scroll-container.vue2.mjs";
|
|
60
2
|
export {
|
|
61
|
-
|
|
3
|
+
f as default
|
|
62
4
|
};
|
|
@@ -1,4 +1,62 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { defineComponent as m, ref as g, unref as o, nextTick as c, openBlock as h, createBlock as _, mergeProps as H, withCtx as b, renderSlot as d } from "vue";
|
|
2
|
+
import { Scrollbar as S } from "../scroll-bar/index.mjs";
|
|
3
|
+
import { useScrollTo as n } from "@aplus-frontend/hooks";
|
|
4
|
+
import "../config-provider/index.mjs";
|
|
5
|
+
import "./style/scroll-container.css";
|
|
6
|
+
import { useNamespace as k } from "../config-provider/hooks/use-namespace.mjs";
|
|
7
|
+
const y = /* @__PURE__ */ m({
|
|
8
|
+
name: "ApScrollContainer",
|
|
9
|
+
__name: "scroll-container",
|
|
10
|
+
props: {
|
|
11
|
+
scrollHeight: {}
|
|
12
|
+
},
|
|
13
|
+
setup(w, { expose: a }) {
|
|
14
|
+
const { b: i } = k("scroll-container"), l = g(null);
|
|
15
|
+
function s() {
|
|
16
|
+
const r = o(l);
|
|
17
|
+
return r ? r.wrap : null;
|
|
18
|
+
}
|
|
19
|
+
function p(r, t = 500) {
|
|
20
|
+
const e = o(s());
|
|
21
|
+
c(() => {
|
|
22
|
+
if (!e)
|
|
23
|
+
return;
|
|
24
|
+
const { start: u } = n({
|
|
25
|
+
el: e,
|
|
26
|
+
to: r,
|
|
27
|
+
duration: t
|
|
28
|
+
});
|
|
29
|
+
u();
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function f() {
|
|
33
|
+
const r = o(s());
|
|
34
|
+
c(() => {
|
|
35
|
+
if (!r)
|
|
36
|
+
return;
|
|
37
|
+
const t = r.scrollHeight, { start: e } = n({
|
|
38
|
+
el: r,
|
|
39
|
+
to: t
|
|
40
|
+
});
|
|
41
|
+
e();
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
return a({
|
|
45
|
+
scrollTo: p,
|
|
46
|
+
scrollBottom: f
|
|
47
|
+
}), (r, t) => (h(), _(o(S), H({
|
|
48
|
+
ref_key: "scrollbarRef",
|
|
49
|
+
ref: l,
|
|
50
|
+
class: o(i)(),
|
|
51
|
+
scrollHeight: r.scrollHeight
|
|
52
|
+
}, r.$attrs), {
|
|
53
|
+
default: b(() => [
|
|
54
|
+
d(r.$slots, "default")
|
|
55
|
+
]),
|
|
56
|
+
_: 3
|
|
57
|
+
}, 16, ["class", "scrollHeight"]));
|
|
58
|
+
}
|
|
59
|
+
});
|
|
2
60
|
export {
|
|
3
|
-
|
|
61
|
+
y as default
|
|
4
62
|
};
|
|
@@ -1,46 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Button as B } from "ant-design-vue";
|
|
3
|
-
import { useCountdown as h } from "@aplus-frontend/hooks";
|
|
4
|
-
import "../config-provider/index.mjs";
|
|
5
|
-
import { isFunction as y } from "@fruits-chain/utils";
|
|
6
|
-
import { useLocale as T } from "../config-provider/hooks/use-locale.mjs";
|
|
7
|
-
const N = /* @__PURE__ */ d({
|
|
8
|
-
name: "ApCountButton",
|
|
9
|
-
__name: "button",
|
|
10
|
-
props: {
|
|
11
|
-
value: {},
|
|
12
|
-
count: { default: 60 },
|
|
13
|
-
beforeStartFunc: {}
|
|
14
|
-
},
|
|
15
|
-
setup(c) {
|
|
16
|
-
const o = c, { t: a } = T(), n = m(!1), { currentCount: s, isStart: r, start: u, reset: l } = h(o.count), i = S(() => e(r) ? a("ap.countdown.sendText", { sec: e(s) }) : a("ap.countdown.normalText"));
|
|
17
|
-
g(() => {
|
|
18
|
-
!o.value && l();
|
|
19
|
-
});
|
|
20
|
-
async function f() {
|
|
21
|
-
const { beforeStartFunc: t } = o;
|
|
22
|
-
if (t && y(t)) {
|
|
23
|
-
n.value = !0;
|
|
24
|
-
try {
|
|
25
|
-
await t() && u();
|
|
26
|
-
} finally {
|
|
27
|
-
n.value = !1;
|
|
28
|
-
}
|
|
29
|
-
} else
|
|
30
|
-
u();
|
|
31
|
-
}
|
|
32
|
-
return (t, p) => (v(), w(e(B), x(t.$attrs, {
|
|
33
|
-
disabled: e(r),
|
|
34
|
-
onClick: f,
|
|
35
|
-
loading: n.value
|
|
36
|
-
}), {
|
|
37
|
-
default: C(() => [
|
|
38
|
-
_(b(i.value), 1)
|
|
39
|
-
]),
|
|
40
|
-
_: 1
|
|
41
|
-
}, 16, ["disabled", "loading"]));
|
|
42
|
-
}
|
|
43
|
-
});
|
|
1
|
+
import f from "./button.vue2.mjs";
|
|
44
2
|
export {
|
|
45
|
-
|
|
3
|
+
f as default
|
|
46
4
|
};
|
|
@@ -1,4 +1,46 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { defineComponent as d, ref as m, computed as S, unref as e, watchEffect as g, openBlock as v, createBlock as w, mergeProps as x, withCtx as C, createTextVNode as _, toDisplayString as b } from "vue";
|
|
2
|
+
import { Button as B } from "ant-design-vue";
|
|
3
|
+
import { useCountdown as h } from "@aplus-frontend/hooks";
|
|
4
|
+
import "../config-provider/index.mjs";
|
|
5
|
+
import { isFunction as y } from "@fruits-chain/utils";
|
|
6
|
+
import { useLocale as T } from "../config-provider/hooks/use-locale.mjs";
|
|
7
|
+
const N = /* @__PURE__ */ d({
|
|
8
|
+
name: "ApCountButton",
|
|
9
|
+
__name: "button",
|
|
10
|
+
props: {
|
|
11
|
+
value: {},
|
|
12
|
+
count: { default: 60 },
|
|
13
|
+
beforeStartFunc: {}
|
|
14
|
+
},
|
|
15
|
+
setup(c) {
|
|
16
|
+
const o = c, { t: a } = T(), n = m(!1), { currentCount: s, isStart: r, start: u, reset: l } = h(o.count), i = S(() => e(r) ? a("ap.countdown.sendText", { sec: e(s) }) : a("ap.countdown.normalText"));
|
|
17
|
+
g(() => {
|
|
18
|
+
!o.value && l();
|
|
19
|
+
});
|
|
20
|
+
async function f() {
|
|
21
|
+
const { beforeStartFunc: t } = o;
|
|
22
|
+
if (t && y(t)) {
|
|
23
|
+
n.value = !0;
|
|
24
|
+
try {
|
|
25
|
+
await t() && u();
|
|
26
|
+
} finally {
|
|
27
|
+
n.value = !1;
|
|
28
|
+
}
|
|
29
|
+
} else
|
|
30
|
+
u();
|
|
31
|
+
}
|
|
32
|
+
return (t, p) => (v(), w(e(B), x(t.$attrs, {
|
|
33
|
+
disabled: e(r),
|
|
34
|
+
onClick: f,
|
|
35
|
+
loading: n.value
|
|
36
|
+
}), {
|
|
37
|
+
default: C(() => [
|
|
38
|
+
_(b(i.value), 1)
|
|
39
|
+
]),
|
|
40
|
+
_: 1
|
|
41
|
+
}, 16, ["disabled", "loading"]));
|
|
42
|
+
}
|
|
43
|
+
});
|
|
2
44
|
export {
|
|
3
|
-
|
|
45
|
+
N as default
|
|
4
46
|
};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { withInstall as o } from "@aplus-frontend/utils";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
2
|
+
import "./button.vue.mjs";
|
|
3
|
+
import "./input.vue.mjs";
|
|
4
|
+
import "./interface.mjs";
|
|
5
|
+
import t from "./button.vue2.mjs";
|
|
6
|
+
import m from "./input.vue2.mjs";
|
|
7
|
+
const c = o(t), u = o(m);
|
|
5
8
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
9
|
+
c as CountdownButton,
|
|
10
|
+
u as CountdownInput
|
|
8
11
|
};
|
|
@@ -1,46 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Input as b } from "ant-design-vue";
|
|
3
|
-
import S from "./button.vue.mjs";
|
|
4
|
-
import { useRuleFormItem as $ } from "../pro-form/hooks/use-form-item.mjs";
|
|
5
|
-
import "../config-provider/index.mjs";
|
|
6
|
-
import "./style/input.css";
|
|
7
|
-
import { useNamespace as h } from "../config-provider/hooks/use-namespace.mjs";
|
|
8
|
-
const R = /* @__PURE__ */ p({
|
|
9
|
-
name: "ApCountDownInput",
|
|
10
|
-
inheritAttrs: !1,
|
|
11
|
-
__name: "input",
|
|
12
|
-
props: {
|
|
13
|
-
value: {},
|
|
14
|
-
size: {},
|
|
15
|
-
count: { default: 60 },
|
|
16
|
-
sendCodeApi: {}
|
|
17
|
-
},
|
|
18
|
-
setup(s) {
|
|
19
|
-
const a = s, { b: u } = h("countdown-input"), [r] = $(a);
|
|
20
|
-
return (e, k) => (m(), l(o(b), c(e.$attrs, {
|
|
21
|
-
class: o(u)(),
|
|
22
|
-
size: e.size,
|
|
23
|
-
value: o(r)
|
|
24
|
-
}), f({
|
|
25
|
-
addonAfter: n(() => [
|
|
26
|
-
d(S, {
|
|
27
|
-
size: e.size,
|
|
28
|
-
count: e.count,
|
|
29
|
-
value: o(r),
|
|
30
|
-
beforeStartFunc: e.sendCodeApi
|
|
31
|
-
}, null, 8, ["size", "count", "value", "beforeStartFunc"])
|
|
32
|
-
]),
|
|
33
|
-
_: 2
|
|
34
|
-
}, [
|
|
35
|
-
z(Object.keys(e.$slots).filter((t) => t !== "addonAfter"), (t) => ({
|
|
36
|
-
name: t,
|
|
37
|
-
fn: n((i) => [
|
|
38
|
-
v(e.$slots, t, A(C(i || {})))
|
|
39
|
-
])
|
|
40
|
-
}))
|
|
41
|
-
]), 1040, ["class", "size", "value"]));
|
|
42
|
-
}
|
|
43
|
-
});
|
|
1
|
+
import f from "./input.vue2.mjs";
|
|
44
2
|
export {
|
|
45
|
-
|
|
3
|
+
f as default
|
|
46
4
|
};
|
|
@@ -1,4 +1,47 @@
|
|
|
1
|
-
import f from "
|
|
1
|
+
import { defineComponent as p, openBlock as m, createBlock as l, unref as o, mergeProps as c, createSlots as f, withCtx as n, createVNode as d, renderList as z, renderSlot as v, normalizeProps as A, guardReactiveProps as C } from "vue";
|
|
2
|
+
import { Input as b } from "ant-design-vue";
|
|
3
|
+
import "./button.vue.mjs";
|
|
4
|
+
import { useRuleFormItem as S } from "../pro-form/hooks/use-form-item.mjs";
|
|
5
|
+
import "../config-provider/index.mjs";
|
|
6
|
+
import "./style/input.css";
|
|
7
|
+
import { useNamespace as $ } from "../config-provider/hooks/use-namespace.mjs";
|
|
8
|
+
import h from "./button.vue2.mjs";
|
|
9
|
+
const _ = /* @__PURE__ */ p({
|
|
10
|
+
name: "ApCountDownInput",
|
|
11
|
+
inheritAttrs: !1,
|
|
12
|
+
__name: "input",
|
|
13
|
+
props: {
|
|
14
|
+
value: {},
|
|
15
|
+
size: {},
|
|
16
|
+
count: { default: 60 },
|
|
17
|
+
sendCodeApi: {}
|
|
18
|
+
},
|
|
19
|
+
setup(s) {
|
|
20
|
+
const a = s, { b: u } = $("countdown-input"), [r] = S(a);
|
|
21
|
+
return (e, k) => (m(), l(o(b), c(e.$attrs, {
|
|
22
|
+
class: o(u)(),
|
|
23
|
+
size: e.size,
|
|
24
|
+
value: o(r)
|
|
25
|
+
}), f({
|
|
26
|
+
addonAfter: n(() => [
|
|
27
|
+
d(h, {
|
|
28
|
+
size: e.size,
|
|
29
|
+
count: e.count,
|
|
30
|
+
value: o(r),
|
|
31
|
+
beforeStartFunc: e.sendCodeApi
|
|
32
|
+
}, null, 8, ["size", "count", "value", "beforeStartFunc"])
|
|
33
|
+
]),
|
|
34
|
+
_: 2
|
|
35
|
+
}, [
|
|
36
|
+
z(Object.keys(e.$slots).filter((t) => t !== "addonAfter"), (t) => ({
|
|
37
|
+
name: t,
|
|
38
|
+
fn: n((i) => [
|
|
39
|
+
v(e.$slots, t, A(C(i || {})))
|
|
40
|
+
])
|
|
41
|
+
}))
|
|
42
|
+
]), 1040, ["class", "size", "value"]));
|
|
43
|
+
}
|
|
44
|
+
});
|
|
2
45
|
export {
|
|
3
|
-
|
|
46
|
+
_ as default
|
|
4
47
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,96 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Button as R } from "ant-design-vue";
|
|
3
|
-
import U from "./cropper-modal.vue.mjs";
|
|
4
|
-
import "../modal/index.mjs";
|
|
5
|
-
import { useMessage as D } from "../hooks/useMessage.mjs";
|
|
6
|
-
import L from "../icon/icon.vue.mjs";
|
|
7
|
-
import "../config-provider/index.mjs";
|
|
8
|
-
import "./style/avatar.css";
|
|
9
|
-
import { useModal as j } from "../modal/hooks/use-modal.mjs";
|
|
10
|
-
import { useNamespace as q } from "../config-provider/hooks/use-namespace.mjs";
|
|
11
|
-
import { useLocale as F } from "../config-provider/hooks/use-locale.mjs";
|
|
12
|
-
const G = ["src"], se = /* @__PURE__ */ N({
|
|
13
|
-
name: "ApCropperAvatar",
|
|
14
|
-
__name: "cropper-avatar",
|
|
15
|
-
props: {
|
|
16
|
-
width: { default: "200px" },
|
|
17
|
-
value: {},
|
|
18
|
-
showBtn: { type: Boolean, default: !0 },
|
|
19
|
-
btnProps: {},
|
|
20
|
-
btnText: { default: "" },
|
|
21
|
-
uploadApi: {},
|
|
22
|
-
size: { default: 5 }
|
|
23
|
-
},
|
|
24
|
-
emits: ["update:value", "change"],
|
|
25
|
-
setup(w, { expose: b, emit: k }) {
|
|
26
|
-
const l = w, d = k, a = V(l.value || ""), { b: r } = q("cropper-avatar"), [z, { openModal: i, closeModal: C }] = j(), { createMessage: x } = D(), { t: m } = F(), B = s(() => [r()]), p = s(() => `${l.width}`.replace(/px/, "") + "px"), S = s(
|
|
27
|
-
() => parseInt(`${l.width}`.replace(/px/, "")) / 2 + "px"
|
|
28
|
-
), A = s(() => ({ width: t(p) })), v = s(
|
|
29
|
-
() => ({
|
|
30
|
-
width: t(p),
|
|
31
|
-
height: t(p)
|
|
32
|
-
})
|
|
33
|
-
);
|
|
34
|
-
$(() => {
|
|
35
|
-
a.value = l.value || "";
|
|
36
|
-
}), I(
|
|
37
|
-
() => a.value,
|
|
38
|
-
(e) => {
|
|
39
|
-
d("update:value", e);
|
|
40
|
-
}
|
|
41
|
-
);
|
|
42
|
-
function M({
|
|
43
|
-
source: e,
|
|
44
|
-
data: o
|
|
45
|
-
}) {
|
|
46
|
-
a.value = e, d("change", { source: e, data: o }), x.success(m("ap.cropper.uploadSuccess"));
|
|
47
|
-
}
|
|
48
|
-
return b({ openModal: i.bind(null, !0), closeModal: C }), (e, o) => (u(), f("div", {
|
|
49
|
-
class: c(B.value),
|
|
50
|
-
style: n(A.value)
|
|
51
|
-
}, [
|
|
52
|
-
g("div", {
|
|
53
|
-
class: c(t(r)("image-wrapper")),
|
|
54
|
-
style: n(v.value),
|
|
55
|
-
onClick: o[0] || (o[0] = (H) => t(i)())
|
|
56
|
-
}, [
|
|
57
|
-
g("div", {
|
|
58
|
-
class: c(t(r)("image-mask")),
|
|
59
|
-
style: n(v.value)
|
|
60
|
-
}, [
|
|
61
|
-
h(L, {
|
|
62
|
-
icon: "ant-design:cloud-upload-outlined",
|
|
63
|
-
size: S.value,
|
|
64
|
-
style: n({ height: p.value }),
|
|
65
|
-
color: "#d6d6d6"
|
|
66
|
-
}, null, 8, ["size", "style"])
|
|
67
|
-
], 6),
|
|
68
|
-
a.value ? (u(), f("img", {
|
|
69
|
-
key: 0,
|
|
70
|
-
src: a.value,
|
|
71
|
-
alt: "avatar"
|
|
72
|
-
}, null, 8, G)) : y("", !0)
|
|
73
|
-
], 6),
|
|
74
|
-
e.showBtn ? (u(), T(t(R), E({
|
|
75
|
-
key: 0,
|
|
76
|
-
class: t(r)("upload-btn"),
|
|
77
|
-
onClick: o[1] || (o[1] = () => t(i)())
|
|
78
|
-
}, e.btnProps), {
|
|
79
|
-
default: P(() => [
|
|
80
|
-
W(_(e.btnText ? e.btnText : t(m)("ap.cropper.selectImage")), 1)
|
|
81
|
-
]),
|
|
82
|
-
_: 1
|
|
83
|
-
}, 16, ["class"])) : y("", !0),
|
|
84
|
-
h(U, {
|
|
85
|
-
onRegister: t(z),
|
|
86
|
-
onUploadSuccess: M,
|
|
87
|
-
uploadApi: e.uploadApi,
|
|
88
|
-
src: a.value,
|
|
89
|
-
size: e.size
|
|
90
|
-
}, null, 8, ["onRegister", "uploadApi", "src", "size"])
|
|
91
|
-
], 6));
|
|
92
|
-
}
|
|
93
|
-
});
|
|
1
|
+
import f from "./cropper-avatar.vue2.mjs";
|
|
94
2
|
export {
|
|
95
|
-
|
|
3
|
+
f as default
|
|
96
4
|
};
|
|
@@ -1,4 +1,98 @@
|
|
|
1
|
-
import f from "
|
|
1
|
+
import { defineComponent as N, ref as V, computed as s, unref as t, watchEffect as $, watch as I, openBlock as u, createElementBlock as f, normalizeClass as c, normalizeStyle as n, createElementVNode as g, createVNode as h, createCommentVNode as y, createBlock as T, mergeProps as E, withCtx as P, createTextVNode as W, toDisplayString as _ } from "vue";
|
|
2
|
+
import { Button as R } from "ant-design-vue";
|
|
3
|
+
import "./cropper-modal.vue.mjs";
|
|
4
|
+
import "../modal/index.mjs";
|
|
5
|
+
import { useMessage as U } from "../hooks/useMessage.mjs";
|
|
6
|
+
import "../icon/icon.vue.mjs";
|
|
7
|
+
import "../config-provider/index.mjs";
|
|
8
|
+
import "./style/avatar.css";
|
|
9
|
+
import { useNamespace as D } from "../config-provider/hooks/use-namespace.mjs";
|
|
10
|
+
import { useModal as L } from "../modal/hooks/use-modal.mjs";
|
|
11
|
+
import { useLocale as j } from "../config-provider/hooks/use-locale.mjs";
|
|
12
|
+
import q from "../icon/icon.vue2.mjs";
|
|
13
|
+
import F from "./cropper-modal.vue2.mjs";
|
|
14
|
+
const G = ["src"], re = /* @__PURE__ */ N({
|
|
15
|
+
name: "ApCropperAvatar",
|
|
16
|
+
__name: "cropper-avatar",
|
|
17
|
+
props: {
|
|
18
|
+
width: { default: "200px" },
|
|
19
|
+
value: {},
|
|
20
|
+
showBtn: { type: Boolean, default: !0 },
|
|
21
|
+
btnProps: {},
|
|
22
|
+
btnText: { default: "" },
|
|
23
|
+
uploadApi: {},
|
|
24
|
+
size: { default: 5 }
|
|
25
|
+
},
|
|
26
|
+
emits: ["update:value", "change"],
|
|
27
|
+
setup(w, { expose: b, emit: k }) {
|
|
28
|
+
const l = w, d = k, o = V(l.value || ""), { b: r } = D("cropper-avatar"), [z, { openModal: i, closeModal: C }] = L(), { createMessage: x } = U(), { t: m } = j(), B = s(() => [r()]), p = s(() => `${l.width}`.replace(/px/, "") + "px"), S = s(
|
|
29
|
+
() => parseInt(`${l.width}`.replace(/px/, "")) / 2 + "px"
|
|
30
|
+
), A = s(() => ({ width: t(p) })), v = s(
|
|
31
|
+
() => ({
|
|
32
|
+
width: t(p),
|
|
33
|
+
height: t(p)
|
|
34
|
+
})
|
|
35
|
+
);
|
|
36
|
+
$(() => {
|
|
37
|
+
o.value = l.value || "";
|
|
38
|
+
}), I(
|
|
39
|
+
() => o.value,
|
|
40
|
+
(e) => {
|
|
41
|
+
d("update:value", e);
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
function M({
|
|
45
|
+
source: e,
|
|
46
|
+
data: a
|
|
47
|
+
}) {
|
|
48
|
+
o.value = e, d("change", { source: e, data: a }), x.success(m("ap.cropper.uploadSuccess"));
|
|
49
|
+
}
|
|
50
|
+
return b({ openModal: i.bind(null, !0), closeModal: C }), (e, a) => (u(), f("div", {
|
|
51
|
+
class: c(B.value),
|
|
52
|
+
style: n(A.value)
|
|
53
|
+
}, [
|
|
54
|
+
g("div", {
|
|
55
|
+
class: c(t(r)("image-wrapper")),
|
|
56
|
+
style: n(v.value),
|
|
57
|
+
onClick: a[0] || (a[0] = (H) => t(i)())
|
|
58
|
+
}, [
|
|
59
|
+
g("div", {
|
|
60
|
+
class: c(t(r)("image-mask")),
|
|
61
|
+
style: n(v.value)
|
|
62
|
+
}, [
|
|
63
|
+
h(q, {
|
|
64
|
+
icon: "ant-design:cloud-upload-outlined",
|
|
65
|
+
size: S.value,
|
|
66
|
+
style: n({ height: p.value }),
|
|
67
|
+
color: "#d6d6d6"
|
|
68
|
+
}, null, 8, ["size", "style"])
|
|
69
|
+
], 6),
|
|
70
|
+
o.value ? (u(), f("img", {
|
|
71
|
+
key: 0,
|
|
72
|
+
src: o.value,
|
|
73
|
+
alt: "avatar"
|
|
74
|
+
}, null, 8, G)) : y("", !0)
|
|
75
|
+
], 6),
|
|
76
|
+
e.showBtn ? (u(), T(t(R), E({
|
|
77
|
+
key: 0,
|
|
78
|
+
class: t(r)("upload-btn"),
|
|
79
|
+
onClick: a[1] || (a[1] = () => t(i)())
|
|
80
|
+
}, e.btnProps), {
|
|
81
|
+
default: P(() => [
|
|
82
|
+
W(_(e.btnText ? e.btnText : t(m)("ap.cropper.selectImage")), 1)
|
|
83
|
+
]),
|
|
84
|
+
_: 1
|
|
85
|
+
}, 16, ["class"])) : y("", !0),
|
|
86
|
+
h(F, {
|
|
87
|
+
onRegister: t(z),
|
|
88
|
+
onUploadSuccess: M,
|
|
89
|
+
uploadApi: e.uploadApi,
|
|
90
|
+
src: o.value,
|
|
91
|
+
size: e.size
|
|
92
|
+
}, null, 8, ["onRegister", "uploadApi", "src", "size"])
|
|
93
|
+
], 6));
|
|
94
|
+
}
|
|
95
|
+
});
|
|
2
96
|
export {
|
|
3
|
-
|
|
97
|
+
re as default
|
|
4
98
|
};
|