@aplus-frontend/ui 7.5.0 → 7.7.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/es/index.mjs +200 -198
- package/es/src/ag-grid/editable/form-item.vue.mjs +14 -14
- package/es/src/ag-grid/editable/index.vue.mjs +20 -20
- package/es/src/ag-grid/hooks/use-columns-def.mjs +32 -31
- package/es/src/ag-grid/hooks/use-editable-api.mjs +9 -8
- package/es/src/ag-grid/hooks/use-editable-columns.mjs +26 -25
- package/es/src/ag-grid/hooks/use-editable-form-item-api.mjs +11 -10
- package/es/src/ag-grid/index.vue.mjs +37 -36
- package/es/src/ag-grid/renderer/number.mjs +7 -7
- package/es/src/ag-grid/style/custom-header.mjs +3 -3
- package/es/src/ag-grid/style/index.mjs +1 -1
- package/es/src/ap-action/style/index.mjs +1 -1
- package/es/src/ap-drawer/style/index.mjs +12 -12
- package/es/src/ap-field/date/index.vue.mjs +14 -14
- package/es/src/ap-field/date/read.vue2.mjs +3 -3
- package/es/src/ap-field/date-range/index.vue.mjs +8 -8
- package/es/src/ap-field/date-range/read.vue2.mjs +3 -3
- package/es/src/ap-field/hooks/use-default-placeholder.mjs +5 -4
- package/es/src/ap-field/number/helper.mjs +1 -1
- package/es/src/ap-field/number/index.vue.mjs +9 -9
- package/es/src/ap-field/number/read.vue2.mjs +5 -5
- package/es/src/ap-field/style/checkbox.d.ts +2 -2
- package/es/src/ap-field/style/number.d.ts +2 -2
- package/es/src/ap-field/style/radio.d.ts +2 -2
- package/es/src/ap-field/style/textarea.d.ts +2 -2
- package/es/src/ap-field/switch/index.vue.mjs +4 -3
- package/es/src/ap-form/ap-form.vue2.mjs +18 -17
- package/es/src/ap-form/item/index.vue.mjs +6 -6
- package/es/src/ap-form/item-group/helper.mjs +8 -7
- package/es/src/ap-form/item-group/index.vue.mjs +15 -14
- package/es/src/ap-form/items/number/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/select/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/text/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/text/password.vue.d.ts +2 -2
- package/es/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
- package/es/src/ap-form/search-form/components/popover-filter.vue.d.ts +1 -1
- package/es/src/ap-form/search-form/components/popover-filter.vue2.mjs +24 -22
- package/es/src/ap-form/search-form/components/popover-sorter/index.vue2.mjs +4 -1
- package/es/src/ap-form/search-form/hooks/use-sorter.mjs +9 -8
- package/es/src/ap-form/search-form/index.vue.mjs +12 -11
- package/es/src/ap-form/set/index.vue.mjs +1 -1
- package/es/src/ap-form/style/item.mjs +15 -15
- package/es/src/ap-form/style/modal-form.mjs +2 -1
- package/es/src/ap-form/style/search-form-sorter.mjs +1 -1
- package/es/src/ap-form/style/search-form.d.ts +7 -1
- package/es/src/ap-form/style/search-form.mjs +37 -34
- package/es/src/ap-grid/editable/form-item.vue.mjs +11 -10
- package/es/src/ap-grid/editable/index.vue.mjs +42 -41
- package/es/src/ap-grid/index.vue.mjs +14 -13
- package/es/src/ap-grid/style/editable.mjs +7 -7
- package/es/src/ap-grid/style/index.mjs +11 -11
- package/es/src/ap-grid/utils/table.mjs +14 -13
- package/es/src/ap-list/hooks/use-offline-list.d.ts +2 -2
- package/es/src/ap-list/hooks/use-offline-list.mjs +13 -12
- package/es/src/ap-list/style/index.mjs +1 -1
- package/es/src/ap-pro-card/style/divider.mjs +2 -2
- package/es/src/ap-pro-card/style/index.mjs +14 -14
- package/es/src/ap-pro-card/style/operation.mjs +1 -2
- package/es/src/ap-pro-card/style/statistic.mjs +12 -12
- package/es/src/ap-pro-card/style/statistics-card.mjs +13 -13
- package/es/src/ap-pro-card/style/title.mjs +13 -33
- package/es/src/ap-table/ap-table.vue2.mjs +4 -3
- package/es/src/ap-table/constants.d.ts +5 -5
- package/es/src/ap-table/hooks/use-table-column-state.mjs +23 -22
- package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +2 -2
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +4 -3
- package/es/src/ap-table/style/index-comp.d.ts +2 -1
- package/es/src/ap-table/style/index-comp.mjs +15 -12
- package/es/src/ap-table/style/index.d.ts +3 -0
- package/es/src/ap-table/style/index.mjs +14 -11
- package/es/src/ap-table/style/setting.d.ts +2 -1
- package/es/src/ap-table/style/setting.mjs +73 -61
- package/es/src/ap-table/utils.mjs +61 -62
- package/es/src/business/ag-grid-modal/modal-layout/index.vue2.mjs +15 -15
- package/es/src/business/ag-grid-modal/style/index.d.ts +3 -0
- package/es/src/business/ag-grid-modal/style/index.mjs +24 -20
- package/es/src/business/ag-grid-modal/style/selected-items.mjs +8 -8
- package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +26 -27
- package/es/src/business/ap-appendix/style/index.mjs +20 -21
- package/es/src/business/ap-attachment/style/index.d.ts +6 -0
- package/es/src/business/ap-attachment/style/index.mjs +28 -25
- package/es/src/business/ap-batch-action/style/index.d.ts +2 -2
- package/es/src/business/ap-batch-action/style/index.mjs +18 -18
- package/es/src/business/ap-card/style/index.d.ts +2 -2
- package/es/src/business/ap-card/style/index.mjs +8 -8
- package/es/src/business/ap-copy/style/index.mjs +16 -22
- package/es/src/business/ap-descriptions/formatter/index.mjs +1 -1
- package/es/src/business/ap-descriptions/style/index.mjs +8 -6
- package/es/src/business/ap-download/style/index.mjs +4 -4
- package/es/src/business/ap-draggable-grid/style/index.mjs +7 -7
- package/es/src/business/ap-expand-alert/style/index.mjs +30 -26
- package/es/src/business/ap-image/style/index.d.ts +2 -2
- package/es/src/business/ap-image/style/index.mjs +8 -7
- package/es/src/business/ap-input-radio/style/index.mjs +1 -1
- package/es/src/business/ap-label/style/index.d.ts +14 -0
- package/es/src/business/ap-label/style/index.mjs +29 -19
- package/es/src/business/ap-ladder/style/index.mjs +7 -6
- package/es/src/business/ap-product-info/style/index.d.ts +10 -0
- package/es/src/business/ap-product-info/style/index.mjs +35 -28
- package/es/src/business/ap-radio-group/style/index.mjs +3 -3
- package/es/src/business/ap-select-layout/select-layout.vue2.mjs +6 -6
- package/es/src/business/ap-select-layout/style/index.d.ts +6 -0
- package/es/src/business/ap-select-layout/style/index.mjs +59 -53
- package/es/src/business/ap-size-input/style/index.mjs +3 -3
- package/es/src/business/ap-status/style/index.mjs +1 -1
- package/es/src/business/ap-summary/style/index.d.ts +10 -0
- package/es/src/business/ap-summary/style/index.mjs +18 -11
- package/es/src/business/ap-table-modal/style/index.d.ts +11 -1
- package/es/src/business/ap-table-modal/style/index.mjs +17 -12
- package/es/src/business/ap-tag/ap-tag-group.vue.mjs +2 -2
- package/es/src/business/ap-tag/style/index.mjs +33 -31
- package/es/src/business/ap-title/style/index.d.ts +2 -1
- package/es/src/business/ap-title/style/index.mjs +41 -49
- package/es/src/business/ap-upload/style/index.mjs +10 -5
- package/es/src/business/ap-upload/style/multiple-file.d.ts +2 -2
- package/es/src/business/ap-upload/style/multiple-file.mjs +8 -7
- package/es/src/business/ap-upload/style/picture.d.ts +3 -2
- package/es/src/business/ap-upload/style/picture.mjs +26 -26
- package/es/src/business/ap-upload/style/single-file.d.ts +3 -2
- package/es/src/business/ap-upload/style/single-file.mjs +30 -29
- package/es/src/business/ap-upload/style/token.d.ts +19 -0
- package/es/src/business/ap-upload/style/token.mjs +9 -0
- package/es/src/business/ap-upload-file/ap-upload-single/style/index.d.ts +24 -2
- package/es/src/business/ap-upload-file/ap-upload-single/style/index.mjs +51 -42
- package/es/src/business/ap-upload-file/icon/delete-icon.vue.mjs +2 -2
- package/es/src/business/ap-upload-file/icon/file-icon.vue.mjs +2 -2
- package/es/src/business/ap-value-select-card/style/index.mjs +45 -43
- package/es/src/business/ap-view/components/main-button-content.vue2.mjs +14 -14
- package/es/src/business/ap-view/components/menu-list-content.vue2.mjs +35 -34
- package/es/src/business/ap-view/icons/line-delete.vue.mjs +2 -2
- package/es/src/business/ap-view/icons/line-down.vue.mjs +2 -2
- package/es/src/business/ap-view/icons/line-eye.vue.mjs +2 -2
- package/es/src/business/ap-view/style/index.d.ts +6 -2
- package/es/src/business/ap-view/style/index.mjs +43 -35
- package/es/src/business/batch-input-group/index.vue.d.ts +1 -1
- package/es/src/business/batch-input-group/index.vue.mjs +23 -22
- package/es/src/business/batch-input-group/style/index.mjs +2 -2
- package/es/src/check-card/style/index.mjs +17 -17
- package/es/src/design-token/constants.mjs +9 -1
- package/es/src/design-token/interface.d.ts +139 -12
- package/es/src/editable-table/form-item.vue.mjs +4 -3
- package/es/src/editable-table/index.vue.mjs +4 -3
- package/es/src/editable-table/style/index.mjs +11 -11
- package/es/src/editable-table/utils.d.ts +1 -1
- package/es/src/editable-table/utils.mjs +27 -26
- package/es/src/highlight/index.d.ts +3 -0
- package/es/src/highlight/index.mjs +2 -0
- package/es/src/highlight/index.vue.d.ts +31 -0
- package/es/src/highlight/index.vue.mjs +49 -0
- package/es/src/highlight/index.vue2.mjs +4 -0
- package/es/src/highlight/interface.d.ts +14 -0
- package/es/src/highlight/interface.mjs +1 -0
- package/es/src/highlight/style/index.d.ts +8 -0
- package/es/src/highlight/style/index.mjs +23 -0
- package/es/src/hooks/useMessage.mjs +4 -4
- package/es/src/index.d.ts +1 -0
- package/es/src/index.mjs +296 -293
- package/es/src/loading-bar/index.vue2.mjs +4 -3
- package/es/src/loading-bar/style/index.mjs +10 -10
- package/es/src/scroll-view/hooks/use-scroll-smooth.mjs +10 -9
- package/es/src/scroll-view/index.vue.mjs +4 -3
- package/es/src/splitter/style/index.mjs +11 -11
- package/es/src/text/index.vue.mjs +8 -7
- package/es/src/time-ago/index.vue.mjs +17 -16
- package/es/src/time-ago/useTimeAgo.mjs +31 -30
- package/es/src/utils/cssinjs/TokenUtil.d.ts +1 -0
- package/es/src/utils/cssinjs/TokenUtil.mjs +3 -0
- package/es/src/utils/decimal.d.ts +36 -0
- package/es/src/utils/decimal.mjs +45 -0
- package/es/src/utils/format.d.ts +21 -0
- package/es/src/utils/format.mjs +32 -0
- package/es/src/utils/index.d.ts +2 -1
- package/es/src/utils/index.mjs +20 -22
- package/es/src/utils/is.d.ts +54 -0
- package/es/src/utils/is.mjs +26 -0
- package/es/src/utils/slot.mjs +1 -2
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ag-grid/editable/index.vue.js +1 -1
- package/lib/src/ag-grid/hooks/use-columns-def.js +1 -1
- package/lib/src/ag-grid/hooks/use-editable-api.js +1 -1
- package/lib/src/ag-grid/hooks/use-editable-columns.js +1 -1
- package/lib/src/ag-grid/hooks/use-editable-form-item-api.js +1 -1
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ag-grid/renderer/number.js +1 -1
- package/lib/src/ag-grid/style/custom-header.js +1 -1
- package/lib/src/ag-grid/style/index.js +1 -1
- package/lib/src/ap-action/style/index.js +1 -1
- package/lib/src/ap-drawer/style/index.js +1 -1
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-field/date/read.vue2.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/read.vue2.js +1 -1
- package/lib/src/ap-field/hooks/use-default-placeholder.js +1 -1
- 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/number/read.vue2.js +1 -1
- package/lib/src/ap-field/style/checkbox.d.ts +2 -2
- package/lib/src/ap-field/style/number.d.ts +2 -2
- package/lib/src/ap-field/style/radio.d.ts +2 -2
- package/lib/src/ap-field/style/textarea.d.ts +2 -2
- package/lib/src/ap-field/switch/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-form/item-group/helper.js +1 -1
- package/lib/src/ap-form/item-group/index.vue.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/select/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/text/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/text/password.vue.d.ts +2 -2
- package/lib/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
- package/lib/src/ap-form/search-form/components/popover-filter.vue.d.ts +1 -1
- package/lib/src/ap-form/search-form/components/popover-filter.vue2.js +1 -1
- package/lib/src/ap-form/search-form/components/popover-sorter/index.vue2.js +1 -1
- package/lib/src/ap-form/search-form/hooks/use-sorter.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-form/set/index.vue.js +1 -1
- package/lib/src/ap-form/style/item.js +1 -1
- package/lib/src/ap-form/style/modal-form.js +1 -1
- package/lib/src/ap-form/style/search-form-sorter.js +1 -1
- package/lib/src/ap-form/style/search-form.d.ts +7 -1
- package/lib/src/ap-form/style/search-form.js +1 -1
- package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ap-grid/editable/index.vue.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/style/editable.js +1 -1
- package/lib/src/ap-grid/style/index.js +1 -1
- package/lib/src/ap-grid/utils/table.js +1 -1
- package/lib/src/ap-list/hooks/use-offline-list.d.ts +2 -2
- package/lib/src/ap-list/hooks/use-offline-list.js +1 -1
- package/lib/src/ap-list/style/index.js +1 -1
- package/lib/src/ap-pro-card/style/divider.js +1 -1
- package/lib/src/ap-pro-card/style/index.js +1 -1
- package/lib/src/ap-pro-card/style/operation.js +1 -1
- package/lib/src/ap-pro-card/style/statistic.js +1 -1
- package/lib/src/ap-pro-card/style/statistics-card.js +1 -1
- package/lib/src/ap-pro-card/style/title.js +1 -1
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/constants.d.ts +5 -5
- package/lib/src/ap-table/hooks/use-table-column-state.js +1 -1
- package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +2 -2
- package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
- package/lib/src/ap-table/style/index-comp.d.ts +2 -1
- package/lib/src/ap-table/style/index-comp.js +1 -1
- package/lib/src/ap-table/style/index.d.ts +3 -0
- package/lib/src/ap-table/style/index.js +1 -1
- package/lib/src/ap-table/style/setting.d.ts +2 -1
- package/lib/src/ap-table/style/setting.js +1 -1
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/business/ag-grid-modal/modal-layout/index.vue2.js +1 -1
- package/lib/src/business/ag-grid-modal/style/index.d.ts +3 -0
- package/lib/src/business/ag-grid-modal/style/index.js +1 -1
- package/lib/src/business/ag-grid-modal/style/selected-items.js +1 -1
- package/lib/src/business/ap-appendix/ap-appendix.vue2.js +1 -1
- package/lib/src/business/ap-appendix/style/index.js +1 -1
- package/lib/src/business/ap-attachment/style/index.d.ts +6 -0
- package/lib/src/business/ap-attachment/style/index.js +1 -1
- package/lib/src/business/ap-batch-action/style/index.d.ts +2 -2
- package/lib/src/business/ap-batch-action/style/index.js +1 -1
- package/lib/src/business/ap-card/style/index.d.ts +2 -2
- package/lib/src/business/ap-card/style/index.js +1 -1
- package/lib/src/business/ap-copy/style/index.js +1 -1
- package/lib/src/business/ap-descriptions/formatter/index.js +1 -1
- package/lib/src/business/ap-descriptions/style/index.js +1 -1
- package/lib/src/business/ap-download/style/index.js +1 -1
- package/lib/src/business/ap-draggable-grid/style/index.js +1 -1
- package/lib/src/business/ap-expand-alert/style/index.js +1 -1
- package/lib/src/business/ap-image/style/index.d.ts +2 -2
- package/lib/src/business/ap-image/style/index.js +1 -1
- package/lib/src/business/ap-input-radio/style/index.js +1 -1
- package/lib/src/business/ap-label/style/index.d.ts +14 -0
- package/lib/src/business/ap-label/style/index.js +1 -1
- package/lib/src/business/ap-ladder/style/index.js +1 -1
- package/lib/src/business/ap-product-info/style/index.d.ts +10 -0
- package/lib/src/business/ap-product-info/style/index.js +1 -1
- package/lib/src/business/ap-radio-group/style/index.js +1 -1
- package/lib/src/business/ap-select-layout/select-layout.vue2.js +1 -1
- package/lib/src/business/ap-select-layout/style/index.d.ts +6 -0
- package/lib/src/business/ap-select-layout/style/index.js +1 -1
- package/lib/src/business/ap-size-input/style/index.js +1 -1
- package/lib/src/business/ap-status/style/index.js +1 -1
- package/lib/src/business/ap-summary/style/index.d.ts +10 -0
- package/lib/src/business/ap-summary/style/index.js +1 -1
- package/lib/src/business/ap-table-modal/style/index.d.ts +11 -1
- package/lib/src/business/ap-table-modal/style/index.js +1 -1
- package/lib/src/business/ap-tag/ap-tag-group.vue.js +1 -1
- package/lib/src/business/ap-tag/style/index.js +1 -1
- package/lib/src/business/ap-title/style/index.d.ts +2 -1
- package/lib/src/business/ap-title/style/index.js +1 -1
- package/lib/src/business/ap-upload/style/index.js +1 -1
- package/lib/src/business/ap-upload/style/multiple-file.d.ts +2 -2
- package/lib/src/business/ap-upload/style/multiple-file.js +1 -1
- package/lib/src/business/ap-upload/style/picture.d.ts +3 -2
- package/lib/src/business/ap-upload/style/picture.js +1 -1
- package/lib/src/business/ap-upload/style/single-file.d.ts +3 -2
- package/lib/src/business/ap-upload/style/single-file.js +1 -1
- package/lib/src/business/ap-upload/style/token.d.ts +19 -0
- package/lib/src/business/ap-upload/style/token.js +1 -0
- package/lib/src/business/ap-upload-file/ap-upload-single/style/index.d.ts +24 -2
- package/lib/src/business/ap-upload-file/ap-upload-single/style/index.js +1 -1
- package/lib/src/business/ap-upload-file/icon/delete-icon.vue.js +1 -1
- package/lib/src/business/ap-upload-file/icon/file-icon.vue.js +1 -1
- package/lib/src/business/ap-value-select-card/style/index.js +1 -1
- package/lib/src/business/ap-view/components/main-button-content.vue2.js +1 -1
- package/lib/src/business/ap-view/components/menu-list-content.vue2.js +1 -1
- package/lib/src/business/ap-view/icons/line-delete.vue.js +1 -1
- package/lib/src/business/ap-view/icons/line-down.vue.js +1 -1
- package/lib/src/business/ap-view/icons/line-eye.vue.js +1 -1
- package/lib/src/business/ap-view/style/index.d.ts +6 -2
- package/lib/src/business/ap-view/style/index.js +1 -1
- package/lib/src/business/batch-input-group/index.vue.d.ts +1 -1
- package/lib/src/business/batch-input-group/index.vue.js +2 -2
- package/lib/src/business/batch-input-group/style/index.js +1 -1
- package/lib/src/check-card/style/index.js +1 -1
- package/lib/src/design-token/constants.js +1 -1
- package/lib/src/design-token/interface.d.ts +139 -12
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/editable-table/style/index.js +1 -1
- package/lib/src/editable-table/utils.d.ts +1 -1
- package/lib/src/editable-table/utils.js +1 -1
- package/lib/src/highlight/index.d.ts +3 -0
- package/lib/src/highlight/index.js +1 -0
- package/lib/src/highlight/index.vue.d.ts +31 -0
- package/lib/src/highlight/index.vue.js +1 -0
- package/lib/src/highlight/index.vue2.js +1 -0
- package/lib/src/highlight/interface.d.ts +14 -0
- package/lib/src/highlight/interface.js +1 -0
- package/lib/src/highlight/style/index.d.ts +8 -0
- package/lib/src/highlight/style/index.js +1 -0
- package/lib/src/hooks/useMessage.js +1 -1
- package/lib/src/index.d.ts +1 -0
- package/lib/src/index.js +1 -1
- package/lib/src/loading-bar/index.vue2.js +1 -1
- package/lib/src/loading-bar/style/index.js +3 -3
- package/lib/src/scroll-view/hooks/use-scroll-smooth.js +1 -1
- package/lib/src/scroll-view/index.vue.js +1 -1
- package/lib/src/splitter/style/index.js +1 -1
- package/lib/src/text/index.vue.js +1 -1
- package/lib/src/time-ago/index.vue.js +1 -1
- package/lib/src/time-ago/useTimeAgo.js +1 -1
- package/lib/src/utils/cssinjs/TokenUtil.d.ts +1 -0
- package/lib/src/utils/cssinjs/TokenUtil.js +1 -1
- package/lib/src/utils/decimal.d.ts +36 -0
- package/lib/src/utils/decimal.js +1 -0
- package/lib/src/utils/format.d.ts +21 -0
- package/lib/src/utils/format.js +1 -0
- package/lib/src/utils/index.d.ts +2 -1
- package/lib/src/utils/index.js +1 -1
- package/lib/src/utils/is.d.ts +54 -0
- package/lib/src/utils/is.js +1 -0
- package/lib/src/utils/slot.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +6 -6
- package/es/src/business/ap-appendix/icons/file-icon.vue.d.ts +0 -3
- package/es/src/business/ap-appendix/icons/file-icon.vue.mjs +0 -18
- package/es/src/utils/copy-text-to-clipboard.d.ts +0 -1
- package/es/src/utils/tree.d.ts +0 -38
- package/es/src/utils/uuid.d.ts +0 -2
- package/lib/src/business/ap-appendix/icons/file-icon.vue.d.ts +0 -3
- package/lib/src/business/ap-appendix/icons/file-icon.vue.js +0 -1
- package/lib/src/utils/copy-text-to-clipboard.d.ts +0 -1
- package/lib/src/utils/tree.d.ts +0 -38
- package/lib/src/utils/uuid.d.ts +0 -2
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { defineComponent as $, computed as u, ref as o, watch as n, onMounted as L, onBeforeUnmount as M, createBlock as N, openBlock as X, Transition as E, unref as h, withCtx as G, withDirectives as U, createElementVNode as _, normalizeStyle as z, normalizeClass as P, vShow as V } from "vue";
|
|
2
2
|
import "../config-provider/index.mjs";
|
|
3
3
|
import j from "./style/index.mjs";
|
|
4
|
-
import
|
|
4
|
+
import "../utils/index.mjs";
|
|
5
5
|
import { useToken as H } from "../config-provider/hooks/use-token.mjs";
|
|
6
6
|
import { useNamespace as J } from "../config-provider/hooks/use-namespace.mjs";
|
|
7
|
-
|
|
7
|
+
import { isDef as k } from "../utils/is.mjs";
|
|
8
|
+
const K = ["aria-valuenow"], O = 0.05, te = /* @__PURE__ */ $({
|
|
8
9
|
__name: "index",
|
|
9
10
|
props: {
|
|
10
11
|
defaultProgress: {
|
|
@@ -108,5 +109,5 @@ const K = ["aria-valuenow"], O = 0.05, ae = /* @__PURE__ */ $({
|
|
|
108
109
|
}
|
|
109
110
|
});
|
|
110
111
|
export {
|
|
111
|
-
|
|
112
|
+
te as default
|
|
112
113
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { keyframes as
|
|
1
|
+
import { keyframes as t } from "@emotion/css";
|
|
2
2
|
import { genComponentStyleHook as i } from "../../utils/cssinjs/index.mjs";
|
|
3
|
-
const
|
|
3
|
+
const c = {
|
|
4
4
|
loadingBarAnimateDuration: 250
|
|
5
5
|
};
|
|
6
|
-
function
|
|
7
|
-
const a =
|
|
6
|
+
function s() {
|
|
7
|
+
const a = t`
|
|
8
8
|
0% {
|
|
9
9
|
opacity: 0;
|
|
10
10
|
}
|
|
@@ -12,7 +12,7 @@ function c() {
|
|
|
12
12
|
100% {
|
|
13
13
|
opacity: 1;
|
|
14
14
|
}
|
|
15
|
-
`, n =
|
|
15
|
+
`, n = t`
|
|
16
16
|
0% {
|
|
17
17
|
opacity: 1;
|
|
18
18
|
}
|
|
@@ -24,7 +24,7 @@ function c() {
|
|
|
24
24
|
return [a, n];
|
|
25
25
|
}
|
|
26
26
|
const m = (a) => {
|
|
27
|
-
const [n,
|
|
27
|
+
const [n, e] = s(), { componentCls: o, loadingBarAnimateDuration: r } = a;
|
|
28
28
|
return {
|
|
29
29
|
[o]: {
|
|
30
30
|
position: "absolute",
|
|
@@ -35,7 +35,7 @@ const m = (a) => {
|
|
|
35
35
|
width: "100%",
|
|
36
36
|
height: "100%",
|
|
37
37
|
pointerEvents: "none",
|
|
38
|
-
transition:
|
|
38
|
+
transition: `background-color ${a.motionDurationMid} ease, transform ${a.motionDurationMid} ease`,
|
|
39
39
|
willChange: "transform"
|
|
40
40
|
},
|
|
41
41
|
"&--default": {
|
|
@@ -64,7 +64,7 @@ const m = (a) => {
|
|
|
64
64
|
animationDuration: `${r}ms`
|
|
65
65
|
},
|
|
66
66
|
"&-leave-active": {
|
|
67
|
-
animationName:
|
|
67
|
+
animationName: e,
|
|
68
68
|
animationDuration: `${r}ms`
|
|
69
69
|
}
|
|
70
70
|
}
|
|
@@ -73,13 +73,13 @@ const m = (a) => {
|
|
|
73
73
|
}, u = i(
|
|
74
74
|
"LoadingBar",
|
|
75
75
|
(a) => [m(a)],
|
|
76
|
-
|
|
76
|
+
c,
|
|
77
77
|
{
|
|
78
78
|
skipUnit: ["loadingBarAnimateDuration"]
|
|
79
79
|
}
|
|
80
80
|
);
|
|
81
81
|
export {
|
|
82
82
|
u as default,
|
|
83
|
-
|
|
83
|
+
s as genFadeKeyFrames,
|
|
84
84
|
m as genLoadingBarStyle
|
|
85
85
|
};
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import "../../scroll-bar/index.mjs";
|
|
2
2
|
import { useRafFn as R } from "@vueuse/core";
|
|
3
|
-
import
|
|
3
|
+
import "../../utils/index.mjs";
|
|
4
4
|
import { ensureRangeValue as s } from "../../scroll-bar/utils/index.mjs";
|
|
5
|
+
import { isDef as f } from "../../utils/is.mjs";
|
|
5
6
|
const g = () => {
|
|
6
|
-
}, b = (i) => 1 - Math.pow(1 - i, 3),
|
|
7
|
+
}, b = (i) => 1 - Math.pow(1 - i, 3), X = ({
|
|
7
8
|
scrollOffset: i,
|
|
8
9
|
maxScrollDistance: r,
|
|
9
10
|
timer: l = 500,
|
|
10
|
-
onScroll:
|
|
11
|
+
onScroll: m = g,
|
|
11
12
|
onScrollEnd: T = g
|
|
12
13
|
}) => {
|
|
13
|
-
let
|
|
14
|
+
let u, e, t, o, n;
|
|
14
15
|
const { pause: a, resume: w, isActive: p } = R(
|
|
15
16
|
() => {
|
|
16
|
-
const v = Date.now() -
|
|
17
|
-
c === 1 ? (o && (i.x = t.x), n && (i.y = t.y), a(),
|
|
17
|
+
const v = Date.now() - u, c = s(v / l, 0, 1), y = b(c);
|
|
18
|
+
c === 1 ? (o && (i.x = t.x), n && (i.y = t.y), a(), m(o, n), T(o, n)) : (o && (t.x > e.x ? i.x = s(
|
|
18
19
|
e.x + (t.x - e.x) * y,
|
|
19
20
|
e.x,
|
|
20
21
|
r.x
|
|
@@ -30,12 +31,12 @@ const g = () => {
|
|
|
30
31
|
t.y + (e.y - t.y) * (1 - y),
|
|
31
32
|
0,
|
|
32
33
|
e.y
|
|
33
|
-
)),
|
|
34
|
+
)), m(o, n));
|
|
34
35
|
},
|
|
35
36
|
{ immediate: !1 }
|
|
36
37
|
);
|
|
37
38
|
function d(x) {
|
|
38
|
-
p.value && a(),
|
|
39
|
+
p.value && a(), u = Date.now(), e = {
|
|
39
40
|
x: i.x,
|
|
40
41
|
y: i.y
|
|
41
42
|
}, t = x, o = f(x.x), n = f(x.y), w();
|
|
@@ -46,5 +47,5 @@ const g = () => {
|
|
|
46
47
|
return { start: d, stop: h, isActive: p };
|
|
47
48
|
};
|
|
48
49
|
export {
|
|
49
|
-
|
|
50
|
+
X as useScrollSmooth
|
|
50
51
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as ue, ref as he, reactive as pe, computed as v, unref as a, watchEffect as _, watch as ye, createElementBlock as me, openBlock as P, withModifiers as M, normalizeStyle as A, normalizeClass as w, createElementVNode as z, renderSlot as de, createBlock as L, createCommentVNode as O, mergeProps as I } from "vue";
|
|
2
2
|
import "../config-provider/index.mjs";
|
|
3
3
|
import "../scroll-bar/index.mjs";
|
|
4
|
-
import
|
|
4
|
+
import "../utils/index.mjs";
|
|
5
5
|
import { ensureRangeValue as n, getScrollable as k } from "../scroll-bar/utils/index.mjs";
|
|
6
6
|
import ve from "./hooks/use-scroll-wrapper.mjs";
|
|
7
7
|
import { isString as T } from "lodash-unified";
|
|
@@ -12,8 +12,9 @@ import { useScrollSmooth as Be } from "./hooks/use-scroll-smooth.mjs";
|
|
|
12
12
|
import { getElementScrollOffset as Se } from "./utils/index.mjs";
|
|
13
13
|
import ge from "./style/index.mjs";
|
|
14
14
|
import { useNamespace as be } from "../config-provider/hooks/use-namespace.mjs";
|
|
15
|
+
import { isDef as f } from "../utils/is.mjs";
|
|
15
16
|
import F from "../scroll-bar/internal.vue.mjs";
|
|
16
|
-
const
|
|
17
|
+
const Le = /* @__PURE__ */ ue({
|
|
17
18
|
name: "ScrollView",
|
|
18
19
|
__name: "index",
|
|
19
20
|
props: {
|
|
@@ -248,5 +249,5 @@ const Ae = /* @__PURE__ */ ue({
|
|
|
248
249
|
}
|
|
249
250
|
});
|
|
250
251
|
export {
|
|
251
|
-
|
|
252
|
+
Le as default
|
|
252
253
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { genComponentStyleHook as
|
|
2
|
-
const
|
|
1
|
+
import { genComponentStyleHook as o } from "../../utils/cssinjs/index.mjs";
|
|
2
|
+
const i = () => ({
|
|
3
3
|
position: "absolute",
|
|
4
4
|
top: "50%",
|
|
5
5
|
left: "50%",
|
|
@@ -13,7 +13,7 @@ const t = () => ({
|
|
|
13
13
|
transition: "none",
|
|
14
14
|
pointerEvents: "none"
|
|
15
15
|
}), s = (r) => {
|
|
16
|
-
const { componentCls: e, namespace:
|
|
16
|
+
const { componentCls: e, namespace: l } = r, t = `--${l}-splitter-bar-preview-offset`;
|
|
17
17
|
return {
|
|
18
18
|
[e]: {
|
|
19
19
|
boxSizing: "border-box",
|
|
@@ -34,18 +34,18 @@ const t = () => ({
|
|
|
34
34
|
userSelect: "none",
|
|
35
35
|
[`${e}-bar-dragger`]: {
|
|
36
36
|
zIndex: 1,
|
|
37
|
-
...
|
|
37
|
+
...i(r),
|
|
38
38
|
// Hover background
|
|
39
39
|
"&::before": {
|
|
40
40
|
content: '""',
|
|
41
41
|
background: "rgba(0, 0, 0, 0.04)",
|
|
42
|
-
...
|
|
42
|
+
...i(r)
|
|
43
43
|
},
|
|
44
44
|
// Spinner
|
|
45
45
|
"&::after": {
|
|
46
46
|
content: '""',
|
|
47
47
|
background: "rgba(0, 0, 0, 0.15)",
|
|
48
|
-
...
|
|
48
|
+
...i(r)
|
|
49
49
|
},
|
|
50
50
|
// Hover
|
|
51
51
|
[`&:hover:not(${e}-bar-dragger-active)`]: {
|
|
@@ -74,11 +74,11 @@ const t = () => ({
|
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
76
|
[`${e}-bar-collapse-bar`]: {
|
|
77
|
-
...
|
|
77
|
+
...i(r),
|
|
78
78
|
zIndex: 1e3,
|
|
79
79
|
background: "rgba(0,0,0,0.04)",
|
|
80
80
|
fontSize: r.fontSizeSM,
|
|
81
|
-
borderRadius:
|
|
81
|
+
borderRadius: r.calc(r.borderRadius).div(2).equal(),
|
|
82
82
|
color: r.textColor1,
|
|
83
83
|
cursor: "pointer",
|
|
84
84
|
opacity: 0,
|
|
@@ -119,7 +119,7 @@ const t = () => ({
|
|
|
119
119
|
...a(r),
|
|
120
120
|
"&-active": {
|
|
121
121
|
display: "block",
|
|
122
|
-
transform: `translateX(var(${
|
|
122
|
+
transform: `translateX(var(${t}))`
|
|
123
123
|
}
|
|
124
124
|
},
|
|
125
125
|
[`${e}-bar-dragger`]: {
|
|
@@ -161,7 +161,7 @@ const t = () => ({
|
|
|
161
161
|
...a(r),
|
|
162
162
|
[`&${e}-bar-preview-active`]: {
|
|
163
163
|
display: "block",
|
|
164
|
-
transform: `translateY(var(${
|
|
164
|
+
transform: `translateY(var(${t}))`
|
|
165
165
|
}
|
|
166
166
|
},
|
|
167
167
|
[`${e}-bar-dragger`]: {
|
|
@@ -208,7 +208,7 @@ const t = () => ({
|
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
};
|
|
211
|
-
}, g =
|
|
211
|
+
}, g = o(
|
|
212
212
|
"Splitter",
|
|
213
213
|
(r) => [s(r)],
|
|
214
214
|
{
|
|
@@ -3,10 +3,11 @@ import { TypographyLink as H, TypographyText as J } from "@aplus-frontend/antdv"
|
|
|
3
3
|
import { isUndefined as s, omit as u, isString as K } from "lodash-unified";
|
|
4
4
|
import "../config-provider/index.mjs";
|
|
5
5
|
import { useInjectApTextGroup as M } from "./context.mjs";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { useNamespace as
|
|
9
|
-
|
|
6
|
+
import "../utils/index.mjs";
|
|
7
|
+
import Q from "./style/index.mjs";
|
|
8
|
+
import { useNamespace as W } from "../config-provider/hooks/use-namespace.mjs";
|
|
9
|
+
import { isDef as X } from "../utils/is.mjs";
|
|
10
|
+
const pe = /* @__PURE__ */ O({
|
|
10
11
|
name: "ApText",
|
|
11
12
|
__name: "index",
|
|
12
13
|
props: {
|
|
@@ -72,7 +73,7 @@ const ie = /* @__PURE__ */ O({
|
|
|
72
73
|
e: i,
|
|
73
74
|
em: S,
|
|
74
75
|
m: P
|
|
75
|
-
} =
|
|
76
|
+
} = W("ap-text"), h = Q("ap-text"), {
|
|
76
77
|
colon: f,
|
|
77
78
|
vertical: y,
|
|
78
79
|
labelStyle: N
|
|
@@ -83,7 +84,7 @@ const ie = /* @__PURE__ */ O({
|
|
|
83
84
|
if (e.label)
|
|
84
85
|
return z(e.label) ? e.label : x(D, null, [e.label]);
|
|
85
86
|
}), A = n(() => {
|
|
86
|
-
const l =
|
|
87
|
+
const l = X(e.linkProps.ellipsis) ? e.linkProps.ellipsis : !!e.ellipsis;
|
|
87
88
|
return {
|
|
88
89
|
href: K(e.link) ? e.link : void 0,
|
|
89
90
|
...u(e, ["linkProps"]),
|
|
@@ -127,5 +128,5 @@ const ie = /* @__PURE__ */ O({
|
|
|
127
128
|
}
|
|
128
129
|
});
|
|
129
130
|
export {
|
|
130
|
-
|
|
131
|
+
pe as default
|
|
131
132
|
};
|
|
@@ -5,8 +5,9 @@ import { getTimeAgoStr as D } from "./utils.mjs";
|
|
|
5
5
|
import h from "./useTimeAgo.mjs";
|
|
6
6
|
import B from "./style/index.mjs";
|
|
7
7
|
import { useLocale as S } from "../config-provider/hooks/use-locale.mjs";
|
|
8
|
-
import { useNamespace as
|
|
9
|
-
const
|
|
8
|
+
import { useNamespace as T } from "../config-provider/hooks/use-namespace.mjs";
|
|
9
|
+
const Y = ["title"], M = /* @__PURE__ */ f({
|
|
10
|
+
name: "TimeAgo",
|
|
10
11
|
__name: "index",
|
|
11
12
|
props: {
|
|
12
13
|
value: {
|
|
@@ -21,24 +22,24 @@ const b = ["title"], M = /* @__PURE__ */ f({
|
|
|
21
22
|
default: 1e4
|
|
22
23
|
}
|
|
23
24
|
},
|
|
24
|
-
setup(
|
|
25
|
-
const
|
|
26
|
-
locale:
|
|
25
|
+
setup(m) {
|
|
26
|
+
const t = m, {
|
|
27
|
+
locale: s
|
|
27
28
|
} = S(), {
|
|
28
|
-
b:
|
|
29
|
-
} =
|
|
30
|
-
const
|
|
31
|
-
if (
|
|
29
|
+
b: l
|
|
30
|
+
} = T("time-ago"), i = B("time-ago"), u = h(r(t, "value"), Date.now(), r(t, "interval")), c = a(() => D(u.value, s.value)), p = a(() => {
|
|
31
|
+
const e = t.title;
|
|
32
|
+
if (e === !1)
|
|
32
33
|
return;
|
|
33
|
-
if (typeof
|
|
34
|
-
return
|
|
35
|
-
const o =
|
|
36
|
-
return y(
|
|
34
|
+
if (typeof e == "string")
|
|
35
|
+
return e;
|
|
36
|
+
const o = e === !0 ? "YYYY-MM-DD HH:mm:ss" : e.format;
|
|
37
|
+
return y(t.value).format(o);
|
|
37
38
|
});
|
|
38
|
-
return (
|
|
39
|
+
return (e, o) => (g(), d("span", {
|
|
39
40
|
title: p.value,
|
|
40
|
-
class: v([n(
|
|
41
|
-
}, _(c.value), 11,
|
|
41
|
+
class: v([n(l)(), n(i)])
|
|
42
|
+
}, _(c.value), 11, Y));
|
|
42
43
|
}
|
|
43
44
|
});
|
|
44
45
|
export {
|
|
@@ -1,56 +1,57 @@
|
|
|
1
1
|
import v from "dayjs";
|
|
2
|
-
import { ref as
|
|
3
|
-
function s(n,
|
|
4
|
-
const t = Math.abs(n -
|
|
2
|
+
import { ref as M, watch as h, onBeforeUnmount as p } from "vue";
|
|
3
|
+
function s(n, u) {
|
|
4
|
+
const t = Math.abs(n - u), e = {
|
|
5
5
|
diffMs: t,
|
|
6
|
-
type: n <
|
|
6
|
+
type: n < u ? "ago" : "late"
|
|
7
7
|
};
|
|
8
|
-
return t < 60 * 1e3 ? (e.unit = "s", e.count = Math.
|
|
8
|
+
return t < 60 * 1e3 ? (e.unit = "s", e.count = Math.round(t / 1e3)) : t < 60 * 60 * 1e3 ? (e.unit = "m", e.count = Math.round(t / (60 * 1e3))) : t < 24 * 60 * 60 * 1e3 ? (e.unit = "h", e.count = Math.round(t / (60 * 60 * 1e3))) : t < 30 * 24 * 60 * 60 * 1e3 ? (e.unit = "d", e.count = Math.round(t / (24 * 60 * 60 * 1e3))) : t < 365 * 24 * 60 * 60 * 1e3 ? (e.unit = "M", e.count = Math.round(t / (30 * 24 * 60 * 60 * 1e3))) : (e.unit = "y", e.count = Math.round(t / 365 / (24 * 60 * 60 * 1e3))), e;
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function o(n) {
|
|
11
11
|
return v(n).valueOf();
|
|
12
12
|
}
|
|
13
|
-
let
|
|
14
|
-
function
|
|
15
|
-
return
|
|
13
|
+
let g = 1;
|
|
14
|
+
function b() {
|
|
15
|
+
return g++;
|
|
16
16
|
}
|
|
17
17
|
const i = /* @__PURE__ */ new Map();
|
|
18
|
-
let
|
|
19
|
-
function w(n,
|
|
20
|
-
i.set(n,
|
|
21
|
-
|
|
18
|
+
let r, l;
|
|
19
|
+
function w(n, u) {
|
|
20
|
+
i.set(n, u), i.size && !l && (clearInterval(r), r = setInterval(() => {
|
|
21
|
+
l = !0;
|
|
22
22
|
const t = Date.now();
|
|
23
23
|
i.forEach((e) => {
|
|
24
|
-
e.interval && Math.abs(t - e.updated - e.interval)
|
|
24
|
+
e.interval && Math.abs(t - e.updated - e.interval) < 50 && (e.timeAgo.value = s(e.ts, t), e.updated = t);
|
|
25
25
|
});
|
|
26
26
|
}, 5e3));
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
i.delete(n), i.size || (clearInterval(
|
|
28
|
+
function I(n) {
|
|
29
|
+
i.delete(n), i.size || (clearInterval(r), l = !1);
|
|
30
30
|
}
|
|
31
|
-
const
|
|
32
|
-
const e =
|
|
33
|
-
s(
|
|
34
|
-
),
|
|
35
|
-
ts:
|
|
31
|
+
const T = (n, u, t) => {
|
|
32
|
+
const e = b(), a = M(
|
|
33
|
+
s(o(n.value), o(u))
|
|
34
|
+
), f = {
|
|
35
|
+
ts: o(n.value),
|
|
36
36
|
timeAgo: a,
|
|
37
37
|
interval: t.value,
|
|
38
38
|
updated: Date.now()
|
|
39
39
|
};
|
|
40
|
-
return
|
|
40
|
+
return h(
|
|
41
41
|
() => n.value,
|
|
42
|
-
(m) => {
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
(c, m) => {
|
|
43
|
+
console.log("run target", c, m);
|
|
44
|
+
const d = o(c);
|
|
45
|
+
f.ts = d, a.value = s(d, o(u));
|
|
45
46
|
}
|
|
46
|
-
), w(e,
|
|
47
|
-
|
|
47
|
+
), w(e, f), p(() => {
|
|
48
|
+
I(e);
|
|
48
49
|
}), a;
|
|
49
50
|
};
|
|
50
51
|
export {
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
T as default,
|
|
53
|
+
b as getId,
|
|
53
54
|
s as getTimeAgo,
|
|
54
55
|
w as subscribe,
|
|
55
|
-
|
|
56
|
+
I as unsubscribe
|
|
56
57
|
};
|
|
@@ -6,6 +6,7 @@ export declare class TokenUtil {
|
|
|
6
6
|
sub(cssVar: string | number | TokenUtil): this;
|
|
7
7
|
mul(cssVar: string | number | TokenUtil): this;
|
|
8
8
|
div(cssVar: string | number | TokenUtil): this;
|
|
9
|
+
colorOpacity(opacity: number): string;
|
|
9
10
|
getResult(): string;
|
|
10
11
|
equal(): string;
|
|
11
12
|
}
|
|
@@ -14,6 +14,9 @@ class s {
|
|
|
14
14
|
div(t) {
|
|
15
15
|
return this.lowPriority && (this.result = `(${this.result})`), t instanceof s ? this.result = `${this.result} / ${t.getResult()}` : this.result = `${this.result} / ${t}`, this.lowPriority = !1, this;
|
|
16
16
|
}
|
|
17
|
+
colorOpacity(t) {
|
|
18
|
+
return `color-mix(in srgb, ${this.result} ${t}%, transparent)`;
|
|
19
|
+
}
|
|
17
20
|
getResult() {
|
|
18
21
|
return this.lowPriority ? `(${this.result})` : this.result;
|
|
19
22
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 数值计算加
|
|
3
|
+
* @param params
|
|
4
|
+
* @returns
|
|
5
|
+
*/
|
|
6
|
+
export declare function plus(...params: number[]): number | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* 数值计算加(同plus)
|
|
9
|
+
*/
|
|
10
|
+
export declare const add: typeof plus;
|
|
11
|
+
/**
|
|
12
|
+
* 数值计算减
|
|
13
|
+
* @param params
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
export declare function sub(...params: number[]): number | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* 数值计算减(同sub)
|
|
19
|
+
*/
|
|
20
|
+
export declare const minus: typeof sub;
|
|
21
|
+
/**
|
|
22
|
+
* 数值计算乘
|
|
23
|
+
* @param params
|
|
24
|
+
* @returns
|
|
25
|
+
*/
|
|
26
|
+
export declare function mul(...params: number[]): number | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* 数值计算乘(同mul)
|
|
29
|
+
*/
|
|
30
|
+
export declare const times: typeof mul;
|
|
31
|
+
/**
|
|
32
|
+
* 数值计算除
|
|
33
|
+
* @param params
|
|
34
|
+
* @returns
|
|
35
|
+
*/
|
|
36
|
+
export declare function div(...params: number[]): number | undefined;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import u from "decimal.js";
|
|
2
|
+
function l(...e) {
|
|
3
|
+
if (!e || !e.length)
|
|
4
|
+
return;
|
|
5
|
+
let t = new u(0);
|
|
6
|
+
return e.forEach((n) => {
|
|
7
|
+
t = t.plus(new u(n));
|
|
8
|
+
}), t.toNumber();
|
|
9
|
+
}
|
|
10
|
+
const f = l;
|
|
11
|
+
function r(...e) {
|
|
12
|
+
if (!e || !e.length)
|
|
13
|
+
return;
|
|
14
|
+
let t = new u(e[0]);
|
|
15
|
+
for (let n = 1; n <= e.length - 1; n += 1)
|
|
16
|
+
t = t.sub(new u(e[n]));
|
|
17
|
+
return t.toNumber();
|
|
18
|
+
}
|
|
19
|
+
const c = r;
|
|
20
|
+
function o(...e) {
|
|
21
|
+
if (!e || !e.length)
|
|
22
|
+
return;
|
|
23
|
+
let t = new u(1);
|
|
24
|
+
return e.forEach((n) => {
|
|
25
|
+
t = t.mul(new u(n));
|
|
26
|
+
}), t.toNumber();
|
|
27
|
+
}
|
|
28
|
+
const h = o;
|
|
29
|
+
function w(...e) {
|
|
30
|
+
if (!e || !e.length)
|
|
31
|
+
return;
|
|
32
|
+
let t = new u(e[0]);
|
|
33
|
+
for (let n = 1; n <= e.length - 1; n += 1)
|
|
34
|
+
t = t.div(new u(e[n]));
|
|
35
|
+
return t.toNumber();
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
f as add,
|
|
39
|
+
w as div,
|
|
40
|
+
c as minus,
|
|
41
|
+
o as mul,
|
|
42
|
+
l as plus,
|
|
43
|
+
r as sub,
|
|
44
|
+
h as times
|
|
45
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 四舍五入取(最多)小数位
|
|
3
|
+
* @param num 待舍入的数字
|
|
4
|
+
* @param fractionDigits 小数位(默认为0)
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
export declare function roundWith(num: number, fractionDigits?: number): number | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* 向下取(最多)小数位
|
|
10
|
+
* @param num
|
|
11
|
+
* @param fractionDigits 小数位(默认为0)
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
export declare function floorWith(num: number, fractionDigits?: number): number | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* 数字千分位格式化
|
|
17
|
+
* @param val 待格式化的数字
|
|
18
|
+
* @param limitDecimals 小数位,传入后将使用四舍五入
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
export declare function toDecimalMark(val: number, limitDecimals?: number): string | undefined;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import "./index.mjs";
|
|
2
|
+
import { div as p, mul as a } from "./decimal.mjs";
|
|
3
|
+
import { isDef as e } from "./is.mjs";
|
|
4
|
+
function m(r, o = 0) {
|
|
5
|
+
if (!e(r))
|
|
6
|
+
return;
|
|
7
|
+
const t = Math.pow(10, o);
|
|
8
|
+
return p(Math.round(a(r, t)), t);
|
|
9
|
+
}
|
|
10
|
+
function g(r, o = 0) {
|
|
11
|
+
if (!e(r))
|
|
12
|
+
return;
|
|
13
|
+
const t = Math.pow(10, o);
|
|
14
|
+
return p(Math.floor(a(r, t)), t);
|
|
15
|
+
}
|
|
16
|
+
function w(r, o) {
|
|
17
|
+
if (!e(r))
|
|
18
|
+
return;
|
|
19
|
+
let t = typeof o < "u" ? m(r, o) : r;
|
|
20
|
+
const i = t < 0;
|
|
21
|
+
i && (t = Math.abs(t));
|
|
22
|
+
const f = String(t).split("."), h = f[0].split(""), c = f[1] || "";
|
|
23
|
+
let n = "";
|
|
24
|
+
return h.reverse().forEach(function(s, u) {
|
|
25
|
+
u !== 0 && u % 3 === 0 ? n = s + "," + n : n = s + n;
|
|
26
|
+
}), (i ? "-" : "") + n + (c ? "." + c : "");
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
g as floorWith,
|
|
30
|
+
m as roundWith,
|
|
31
|
+
w as toDecimalMark
|
|
32
|
+
};
|
package/es/src/utils/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Recordable } from '../type';
|
|
2
|
+
import { isDef } from './is';
|
|
2
3
|
/**
|
|
3
4
|
* @description: Set ui mount node
|
|
4
5
|
*/
|
|
5
6
|
export declare function getPopupContainer(node?: HTMLElement): HTMLElement;
|
|
6
|
-
export
|
|
7
|
+
export { isDef };
|
|
7
8
|
export declare function getDynamicProps<T extends Record<string, unknown>, U>(props: T): Partial<U>;
|
|
8
9
|
/**
|
|
9
10
|
* 按条件移除
|