@aplus-frontend/ui 7.6.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/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 +22 -21
- 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/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/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 +4 -3
- package/es/src/ap-grid/editable/index.vue.mjs +4 -3
- package/es/src/ap-grid/index.vue.mjs +13 -12
- 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/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 +6 -5
- 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/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/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-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/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.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 +137 -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/hooks/useMessage.mjs +4 -4
- 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/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/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/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/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/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/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/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-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/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.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 +137 -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/hooks/useMessage.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/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 +4 -4
- 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,35 +1,36 @@
|
|
|
1
1
|
import { getTableRenderProps as c, objectToString as S } from "../../ap-table/utils.mjs";
|
|
2
2
|
import { rendererMap as x } from "../renderer/index.mjs";
|
|
3
|
-
import { isNumber as u, isFunction as
|
|
3
|
+
import { isNumber as u, isFunction as m } from "lodash-unified";
|
|
4
4
|
import { ref as D, unref as v, computed as y } from "vue";
|
|
5
5
|
import "../components/body-cell/index.vue.mjs";
|
|
6
6
|
import "../components/header-cell/index.vue.mjs";
|
|
7
7
|
import "../components/tooltip/index.vue.mjs";
|
|
8
8
|
import "../../config-provider/index.mjs";
|
|
9
9
|
import { dataIndexToField as P } from "../../ap-grid/utils/col.mjs";
|
|
10
|
-
import
|
|
11
|
-
import { useGlobalConfig as
|
|
12
|
-
import { useNamespace as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
10
|
+
import "../../utils/index.mjs";
|
|
11
|
+
import { useGlobalConfig as I } from "../../config-provider/hooks/use-global-config.mjs";
|
|
12
|
+
import { useNamespace as _ } from "../../config-provider/hooks/use-namespace.mjs";
|
|
13
|
+
import G from "../components/body-cell/index.vue2.mjs";
|
|
14
|
+
import W from "../components/tooltip/index.vue2.mjs";
|
|
15
|
+
import { isDef as z } from "../../utils/is.mjs";
|
|
15
16
|
import h from "../components/header-cell/index.vue2.mjs";
|
|
16
17
|
function F(t) {
|
|
17
18
|
return u(t) && t > 1;
|
|
18
19
|
}
|
|
19
|
-
function M(t,
|
|
20
|
-
if (
|
|
21
|
-
return
|
|
22
|
-
if (
|
|
23
|
-
return
|
|
20
|
+
function M(t, i) {
|
|
21
|
+
if (i.bodyCellTooltip)
|
|
22
|
+
return m(i.bodyCellTooltip) ? i.bodyCellTooltip(t.value, t.data) : i.bodyCellTooltip;
|
|
23
|
+
if (i.renderText)
|
|
24
|
+
return i.renderText({
|
|
24
25
|
value: t.value,
|
|
25
26
|
record: t.data,
|
|
26
|
-
column:
|
|
27
|
+
column: i,
|
|
27
28
|
text: t.value
|
|
28
29
|
});
|
|
29
|
-
const d =
|
|
30
|
+
const d = i.valueType || "text", p = x[d];
|
|
30
31
|
if (p) {
|
|
31
32
|
const f = c(
|
|
32
|
-
{ ...
|
|
33
|
+
{ ...i, valueType: d },
|
|
33
34
|
{
|
|
34
35
|
value: t.value,
|
|
35
36
|
text: t.value,
|
|
@@ -43,18 +44,18 @@ function M(t, a) {
|
|
|
43
44
|
}
|
|
44
45
|
return S(t.value);
|
|
45
46
|
}
|
|
46
|
-
const
|
|
47
|
-
const p =
|
|
48
|
-
const
|
|
49
|
-
cellRenderer:
|
|
47
|
+
const Y = (t, i, d) => {
|
|
48
|
+
const p = I("valueTypeMap"), C = D(), { em: f } = _("ag-grid"), b = (r) => {
|
|
49
|
+
const a = {
|
|
50
|
+
cellRenderer: G,
|
|
50
51
|
cellRendererParams: {
|
|
51
52
|
column: r,
|
|
52
53
|
extraValueType: v(p),
|
|
53
|
-
rowKey:
|
|
54
|
+
rowKey: i.rowKey
|
|
54
55
|
}
|
|
55
56
|
};
|
|
56
57
|
if (r.customRender)
|
|
57
|
-
return
|
|
58
|
+
return a;
|
|
58
59
|
if (r.renderText)
|
|
59
60
|
return {
|
|
60
61
|
valueFormatter: (o) => r.renderText({
|
|
@@ -80,22 +81,22 @@ const X = (t, a, d) => {
|
|
|
80
81
|
);
|
|
81
82
|
return e(s);
|
|
82
83
|
}
|
|
83
|
-
} :
|
|
84
|
+
} : a;
|
|
84
85
|
}, w = (r) => {
|
|
85
|
-
const
|
|
86
|
+
const a = r.valueType || "text", l = x[a], e = {}, o = r.bodyCellTooltip || !r.customRender && l && (r.ellipsis === !0 || r.ellipsis === "tooltip" || u(r.ellipsis)), s = u(r.ellipsis) && r.ellipsis > 1, n = u(r.ellipsis) ? r.ellipsis : 1;
|
|
86
87
|
return e.tooltipValueGetter = o ? (T) => M(T, r) : void 0, e.wrapText = !r.ellipsis || s, e.cellStyle = {
|
|
87
88
|
"--ag-grid-line-clamp": n
|
|
88
|
-
}, e.tooltipComponent =
|
|
89
|
+
}, e.tooltipComponent = W, e.tooltipComponentParams = {
|
|
89
90
|
lineClamp: n,
|
|
90
91
|
gridWrapperRef: C
|
|
91
92
|
}, e;
|
|
92
93
|
}, g = y(() => {
|
|
93
94
|
const r = v(t);
|
|
94
|
-
function
|
|
95
|
+
function a(l) {
|
|
95
96
|
return l.map((e) => {
|
|
96
97
|
const o = {
|
|
97
98
|
field: P(e.dataIndex),
|
|
98
|
-
colId:
|
|
99
|
+
colId: z(e.key) ? String(e.key) : void 0,
|
|
99
100
|
sortable: !!e.sorter,
|
|
100
101
|
comparator: e.sorter === !0 ? () => 0 : e.sorter,
|
|
101
102
|
headerComponentParams: {
|
|
@@ -112,7 +113,7 @@ const X = (t, a, d) => {
|
|
|
112
113
|
colSpan: e.colSpan,
|
|
113
114
|
spanRows: e.spanRows,
|
|
114
115
|
cellClass: d((s) => {
|
|
115
|
-
const n = e.cellClass || "", T =
|
|
116
|
+
const n = e.cellClass || "", T = m(n) ? n(s.data, s.node) : n;
|
|
116
117
|
return [
|
|
117
118
|
`${f("cell", e.align || "left")}`,
|
|
118
119
|
F(e.ellipsis) ? f("cell", "multiline") : null,
|
|
@@ -125,7 +126,7 @@ const X = (t, a, d) => {
|
|
|
125
126
|
autoHeight: !0,
|
|
126
127
|
// 设置自动计算高度以自适应多行换行的场景
|
|
127
128
|
...w(e),
|
|
128
|
-
...
|
|
129
|
+
...b(e)
|
|
129
130
|
};
|
|
130
131
|
return e.children?.length ? {
|
|
131
132
|
...o,
|
|
@@ -133,15 +134,15 @@ const X = (t, a, d) => {
|
|
|
133
134
|
headerGroupComponentParams: {
|
|
134
135
|
column: e
|
|
135
136
|
},
|
|
136
|
-
children:
|
|
137
|
+
children: a(e.children)
|
|
137
138
|
} : o;
|
|
138
139
|
});
|
|
139
140
|
}
|
|
140
|
-
return
|
|
141
|
+
return a(r);
|
|
141
142
|
}), R = y(
|
|
142
143
|
() => ({
|
|
143
144
|
headerComponent: h,
|
|
144
|
-
resizable:
|
|
145
|
+
resizable: i.columnResizable,
|
|
145
146
|
suppressMovable: !0,
|
|
146
147
|
cellDataType: !1
|
|
147
148
|
})
|
|
@@ -153,5 +154,5 @@ const X = (t, a, d) => {
|
|
|
153
154
|
};
|
|
154
155
|
};
|
|
155
156
|
export {
|
|
156
|
-
|
|
157
|
+
Y as useColumnsDef
|
|
157
158
|
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { shallowRef as _, computed as S, unref as d, isRef as z } from "vue";
|
|
2
|
-
import
|
|
3
|
-
import { isFunction as
|
|
2
|
+
import "../../utils/index.mjs";
|
|
3
|
+
import { isFunction as h, isUndefined as A, isNumber as K, cloneDeep as E, isArray as x, isString as N } from "lodash-unified";
|
|
4
4
|
import { arrayToObject as U } from "../editable/utils.mjs";
|
|
5
|
+
import { isDef as I } from "../../utils/is.mjs";
|
|
5
6
|
let $ = 0;
|
|
6
7
|
function R() {
|
|
7
8
|
return `_ag_grid${$++}`;
|
|
8
9
|
}
|
|
9
|
-
const
|
|
10
|
+
const P = (n, m, i, g) => {
|
|
10
11
|
const w = _([]), y = S(() => z(m) ? d(m) : m);
|
|
11
12
|
function F(u, r) {
|
|
12
13
|
const l = d(i)?.length || 0;
|
|
13
|
-
if (
|
|
14
|
+
if (I(n.maxLength) && l >= n.maxLength || !u && h(n.rowKey))
|
|
14
15
|
return;
|
|
15
16
|
const f = {
|
|
16
17
|
...u || { [n.rowKey]: R() }
|
|
@@ -33,7 +34,7 @@ const J = (n, m, i, g) => {
|
|
|
33
34
|
}
|
|
34
35
|
function j(u, r = "suffix") {
|
|
35
36
|
const l = d(i)?.length || 0, f = K(u) ? u : u.length;
|
|
36
|
-
if (
|
|
37
|
+
if (I(n.maxLength) && l + f > n.maxLength || K(u) && h(n.rowKey))
|
|
37
38
|
return;
|
|
38
39
|
const o = K(u) ? new Array(u).fill(0).map(() => ({ [n.rowKey]: R() })) : E(u), s = U(o, n.rowKey);
|
|
39
40
|
y.value?.setFieldValue?.(
|
|
@@ -52,7 +53,7 @@ const J = (n, m, i, g) => {
|
|
|
52
53
|
);
|
|
53
54
|
}
|
|
54
55
|
function k(u) {
|
|
55
|
-
const r =
|
|
56
|
+
const r = x(u) ? u : [u];
|
|
56
57
|
y.value?.setFieldValue?.(
|
|
57
58
|
n.name,
|
|
58
59
|
void 0,
|
|
@@ -78,7 +79,7 @@ const J = (n, m, i, g) => {
|
|
|
78
79
|
return N(l) ? u[l] : l(u, r);
|
|
79
80
|
}
|
|
80
81
|
function L(u) {
|
|
81
|
-
const r = new Set(
|
|
82
|
+
const r = new Set(x(u) ? u : [u]);
|
|
82
83
|
r.size !== 0 && y.value?.setFieldValue?.(
|
|
83
84
|
n.name,
|
|
84
85
|
void 0,
|
|
@@ -146,5 +147,5 @@ const J = (n, m, i, g) => {
|
|
|
146
147
|
};
|
|
147
148
|
};
|
|
148
149
|
export {
|
|
149
|
-
|
|
150
|
+
P as useEditableApi
|
|
150
151
|
};
|
|
@@ -3,30 +3,31 @@ import { isArray as m, isFunction as E } from "lodash-unified";
|
|
|
3
3
|
import { mergeClass as F, getColumnIsRequired as v } from "../../editable-table/utils.mjs";
|
|
4
4
|
import { updateFormProps as y, getFieldProps as q } from "../../ap-table/utils.mjs";
|
|
5
5
|
import { getFinalEditableNode as A } from "../../ap-grid/utils/editable.mjs";
|
|
6
|
-
import
|
|
7
|
-
import { getRowKey as
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
import "../../utils/index.mjs";
|
|
7
|
+
import { getRowKey as K } from "../editable/utils.mjs";
|
|
8
|
+
import { isDef as M } from "../../utils/is.mjs";
|
|
9
|
+
function b(t, n, i) {
|
|
10
|
+
t.__skipNextRefresh ? t.__skipNextRefresh[n] = i : t.__skipNextRefresh = { [n]: i };
|
|
10
11
|
}
|
|
11
|
-
function S(t,
|
|
12
|
-
t.__prevEditable ? t.__prevEditable[
|
|
12
|
+
function S(t, n, i) {
|
|
13
|
+
t.__prevEditable ? t.__prevEditable[n] = i : t.__prevEditable = { [n]: i };
|
|
13
14
|
}
|
|
14
|
-
const
|
|
15
|
+
const L = (t, n, i) => {
|
|
15
16
|
function I(e) {
|
|
16
|
-
const s = e.editable, o =
|
|
17
|
+
const s = e.editable, o = i ? [i] : m(t.name) ? t.name : [t.name];
|
|
17
18
|
return !s || e.children?.length ? {
|
|
18
19
|
_path: [...o]
|
|
19
20
|
} : {
|
|
20
|
-
customRender({ value: d, originalNode: C, params: a, ...
|
|
21
|
+
customRender({ value: d, originalNode: C, params: a, ...r }) {
|
|
21
22
|
const c = E(e.editable) ? e.editable(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
r.text,
|
|
24
|
+
r.record,
|
|
25
|
+
r.rowIndex
|
|
25
26
|
) : !!e.editable;
|
|
26
27
|
let u = C;
|
|
27
|
-
const R = m(e.dataIndex) ? e.dataIndex : [e.dataIndex], x =
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
const R = m(e.dataIndex) ? e.dataIndex : [e.dataIndex], x = K(
|
|
29
|
+
r.record,
|
|
30
|
+
r.rowIndex,
|
|
30
31
|
t.rowKey
|
|
31
32
|
);
|
|
32
33
|
if (c) {
|
|
@@ -34,11 +35,11 @@ const J = (t, i, r) => {
|
|
|
34
35
|
e,
|
|
35
36
|
q(e.fieldProps, {
|
|
36
37
|
value: d,
|
|
37
|
-
...
|
|
38
|
+
...r
|
|
38
39
|
})
|
|
39
40
|
), h = {};
|
|
40
41
|
t.onFieldChange && (h[`onUpdate:${_.valuePropName || "value"}`] = (N) => t.onFieldChange?.(
|
|
41
|
-
|
|
42
|
+
r.rowIndex,
|
|
42
43
|
e.dataIndex,
|
|
43
44
|
N
|
|
44
45
|
));
|
|
@@ -55,21 +56,21 @@ const J = (t, i, r) => {
|
|
|
55
56
|
u = A(
|
|
56
57
|
e,
|
|
57
58
|
p,
|
|
58
|
-
|
|
59
|
-
k(
|
|
59
|
+
r.record,
|
|
60
|
+
k(n)
|
|
60
61
|
);
|
|
61
62
|
}
|
|
62
63
|
e.customRender && (u = e.customRender({
|
|
63
64
|
value: d,
|
|
64
|
-
...
|
|
65
|
+
...r,
|
|
65
66
|
editable: c,
|
|
66
67
|
originalNode: u,
|
|
67
|
-
index:
|
|
68
|
-
renderIndex:
|
|
68
|
+
index: r.rowIndex,
|
|
69
|
+
renderIndex: r.rowIndex,
|
|
69
70
|
path: [...o, String(x)]
|
|
70
71
|
}));
|
|
71
72
|
const l = a.node, f = a.column.getColId(), g = l.__prevEditable?.[f];
|
|
72
|
-
return !l.__skipNextRefresh?.[f] &&
|
|
73
|
+
return !l.__skipNextRefresh?.[f] && M(g) && g !== c && (b(l, f, !0), setTimeout(() => {
|
|
73
74
|
a?.api.refreshCells({
|
|
74
75
|
rowNodes: [a.node],
|
|
75
76
|
columns: [a.column.getColId()],
|
|
@@ -97,6 +98,6 @@ const J = (t, i, r) => {
|
|
|
97
98
|
});
|
|
98
99
|
};
|
|
99
100
|
export {
|
|
100
|
-
|
|
101
|
-
|
|
101
|
+
L as default,
|
|
102
|
+
L as useGetEditableColumns
|
|
102
103
|
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { shallowRef as E, unref as d } from "vue";
|
|
2
|
-
import
|
|
3
|
-
import { isFunction as
|
|
2
|
+
import "../../utils/index.mjs";
|
|
3
|
+
import { isFunction as F, isUndefined as x, isNumber as h, cloneDeep as S, isArray as V } from "lodash-unified";
|
|
4
4
|
import { getRowKey as y, arrayToObject as U } from "../editable/utils.mjs";
|
|
5
|
+
import { isDef as R } from "../../utils/is.mjs";
|
|
5
6
|
let $ = 0;
|
|
6
7
|
function I() {
|
|
7
8
|
return `_ag_grid${$++}`;
|
|
8
9
|
}
|
|
9
|
-
const
|
|
10
|
+
const P = (l, c, n, w) => {
|
|
10
11
|
const K = E([]);
|
|
11
12
|
function j(f, s) {
|
|
12
13
|
const v = d(n)?.length || 0;
|
|
13
|
-
if (
|
|
14
|
+
if (R(l.maxLength) && v >= l.maxLength || !f && F(l.rowKey))
|
|
14
15
|
return;
|
|
15
16
|
const t = {
|
|
16
17
|
...f || { [l.rowKey]: I() }
|
|
@@ -21,7 +22,7 @@ const J = (l, c, n, w) => {
|
|
|
21
22
|
!1,
|
|
22
23
|
(i, r) => {
|
|
23
24
|
const e = y(t, void 0, l.rowKey);
|
|
24
|
-
i[r] ? i[r][e] = t : i[r] = { [e]: t }, n.value ?
|
|
25
|
+
i[r] ? i[r][e] = t : i[r] = { [e]: t }, n.value ? x(s) ? n.value.push(t) : (K.value = n.value.map(
|
|
25
26
|
(u, o) => o < s ? null : y(u, o, l.rowKey)
|
|
26
27
|
).filter(Boolean), n.value.splice(s, 0, t)) : n.value = [t], c?.setFieldValue(
|
|
27
28
|
l.name,
|
|
@@ -32,7 +33,7 @@ const J = (l, c, n, w) => {
|
|
|
32
33
|
u[o] = [t];
|
|
33
34
|
return;
|
|
34
35
|
}
|
|
35
|
-
|
|
36
|
+
x(s) ? u[o].push(t) : u[o].splice(s, 0, t);
|
|
36
37
|
}
|
|
37
38
|
);
|
|
38
39
|
}
|
|
@@ -42,7 +43,7 @@ const J = (l, c, n, w) => {
|
|
|
42
43
|
if (!f)
|
|
43
44
|
return;
|
|
44
45
|
const v = d(n)?.length || 0, t = h(f) ? f : f.length;
|
|
45
|
-
if (
|
|
46
|
+
if (R(l.maxLength) && v + t > l.maxLength || h(f) && F(l.rowKey))
|
|
46
47
|
return;
|
|
47
48
|
const i = h(f) ? new Array(f).fill(0).map(() => ({ [l.rowKey]: I() })) : S(f), r = U(i, l.rowKey);
|
|
48
49
|
c?.setFieldValue(
|
|
@@ -68,7 +69,7 @@ const J = (l, c, n, w) => {
|
|
|
68
69
|
);
|
|
69
70
|
}
|
|
70
71
|
function L(f) {
|
|
71
|
-
const s =
|
|
72
|
+
const s = V(f) ? f : [f];
|
|
72
73
|
c?.setFieldValue(
|
|
73
74
|
w,
|
|
74
75
|
void 0,
|
|
@@ -97,7 +98,7 @@ const J = (l, c, n, w) => {
|
|
|
97
98
|
);
|
|
98
99
|
}
|
|
99
100
|
function O(f) {
|
|
100
|
-
const s = new Set(
|
|
101
|
+
const s = new Set(V(f) ? f : [f]);
|
|
101
102
|
s.size !== 0 && c?.setFieldValue(
|
|
102
103
|
w,
|
|
103
104
|
void 0,
|
|
@@ -172,5 +173,5 @@ const J = (l, c, n, w) => {
|
|
|
172
173
|
};
|
|
173
174
|
};
|
|
174
175
|
export {
|
|
175
|
-
|
|
176
|
+
P as useEditableFormItemApi
|
|
176
177
|
};
|
|
@@ -16,22 +16,23 @@ import { useToken as Zo } from "@aplus-frontend/antdv/es/theme/internal";
|
|
|
16
16
|
import { useTheme as et } from "./theme.mjs";
|
|
17
17
|
import { useColumns as ot } from "./hooks/use-columns.mjs";
|
|
18
18
|
import { useColumnsDef as tt } from "./hooks/use-columns-def.mjs";
|
|
19
|
-
import
|
|
20
|
-
import { getValidVNodeList as
|
|
21
|
-
import { useSearchForm as
|
|
19
|
+
import "../utils/index.mjs";
|
|
20
|
+
import { getValidVNodeList as rt } from "../utils/slot.mjs";
|
|
21
|
+
import { useSearchForm as lt } from "./hooks/use-search-form.mjs";
|
|
22
22
|
import "./components/empty/index.vue.mjs";
|
|
23
|
-
import
|
|
24
|
-
import { usePinnedRow as
|
|
25
|
-
import
|
|
23
|
+
import at from "./hooks/use-virtual-config.mjs";
|
|
24
|
+
import { usePinnedRow as nt } from "./hooks/use-pinned-row.mjs";
|
|
25
|
+
import st from "./hooks/use-selection-col-def.mjs";
|
|
26
26
|
import "./components/row/index.vue.mjs";
|
|
27
|
-
import
|
|
28
|
-
import { AG_GRID_LOCALE_EN as
|
|
29
|
-
import { useNamespace as
|
|
30
|
-
import { useLocale as
|
|
31
|
-
import { useGlobalConfig as
|
|
27
|
+
import it from "./style/index.mjs";
|
|
28
|
+
import { AG_GRID_LOCALE_EN as ut, AG_GRID_LOCALE_CN as dt } from "@ag-grid-community/locale";
|
|
29
|
+
import { useNamespace as ct } from "../config-provider/hooks/use-namespace.mjs";
|
|
30
|
+
import { useLocale as mt } from "../config-provider/hooks/use-locale.mjs";
|
|
31
|
+
import { useGlobalConfig as pt } from "../config-provider/hooks/use-global-config.mjs";
|
|
32
|
+
import { isDef as ft } from "../utils/is.mjs";
|
|
32
33
|
import gt from "./components/row/index.vue2.mjs";
|
|
33
34
|
import wt from "./components/empty/index.vue2.mjs";
|
|
34
|
-
const
|
|
35
|
+
const Xt = /* @__PURE__ */ po({
|
|
35
36
|
name: "AgGrid",
|
|
36
37
|
__name: "index",
|
|
37
38
|
props: {
|
|
@@ -108,8 +109,8 @@ const Qt = /* @__PURE__ */ po({
|
|
|
108
109
|
},
|
|
109
110
|
setup(me, { expose: pe }) {
|
|
110
111
|
const fe = {
|
|
111
|
-
"zh-cn":
|
|
112
|
-
en:
|
|
112
|
+
"zh-cn": dt,
|
|
113
|
+
en: ut
|
|
113
114
|
};
|
|
114
115
|
vo.registerModules([
|
|
115
116
|
bo,
|
|
@@ -132,15 +133,15 @@ const Qt = /* @__PURE__ */ po({
|
|
|
132
133
|
Oo,
|
|
133
134
|
Lo
|
|
134
135
|
]);
|
|
135
|
-
const o = me, U = fo(), { e: x, b: d, be: ge } =
|
|
136
|
+
const o = me, U = fo(), { e: x, b: d, be: ge } = ct("ag-grid"), { lang: _ } = mt(), we = it("ag-grid"), y = M(o.size), Se = et(
|
|
136
137
|
y,
|
|
137
138
|
F(o, "rowHeight"),
|
|
138
139
|
F(o, "theme")
|
|
139
|
-
), Ce =
|
|
140
|
+
), Ce = at(F(o, "virtual")), { rowPinnedGridConfig: j, getRowPinnedCellClass: he } = nt(
|
|
140
141
|
F(o, "summary")
|
|
141
|
-
), ye =
|
|
142
|
+
), ye = pt("apGrid"), s = M(), [, Re] = Zo();
|
|
142
143
|
let R = !!o.dataSource;
|
|
143
|
-
const $ =
|
|
144
|
+
const $ = lt(o), { shownColumns: g, columns: q, columnKeys: ve, getTargetColumnByKey: be } = ot(o), { defaultColDef: Me, columnDefs: Fe, gridWrapperRef: Be } = tt(q, o, he), I = M({});
|
|
144
145
|
Jo({
|
|
145
146
|
sorter: I,
|
|
146
147
|
setSorter(e) {
|
|
@@ -178,7 +179,7 @@ const Qt = /* @__PURE__ */ po({
|
|
|
178
179
|
return;
|
|
179
180
|
const r = e.getColumnState()?.map((l) => ({ ...l, sort: null }));
|
|
180
181
|
e.applyColumnState({ state: r });
|
|
181
|
-
}, T = M(!0), Ne = n(() =>
|
|
182
|
+
}, T = M(!0), Ne = n(() => ft(o.manual) ? o.manual : rt(U.searchFormExtra?.() || []).some((r) => r.type?.name === "ApView")), {
|
|
182
183
|
formRef: w,
|
|
183
184
|
submit: D,
|
|
184
185
|
reset: E,
|
|
@@ -221,7 +222,7 @@ const Qt = /* @__PURE__ */ po({
|
|
|
221
222
|
...ce,
|
|
222
223
|
...e
|
|
223
224
|
};
|
|
224
|
-
}), Pe =
|
|
225
|
+
}), Pe = st(o, g), Ke = n(
|
|
225
226
|
() => k(o.dataSource) ? S.records : o.dataSource
|
|
226
227
|
), {
|
|
227
228
|
select: Ve,
|
|
@@ -569,5 +570,5 @@ const Qt = /* @__PURE__ */ po({
|
|
|
569
570
|
}
|
|
570
571
|
});
|
|
571
572
|
export {
|
|
572
|
-
|
|
573
|
+
Xt as default
|
|
573
574
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { isNil as c, isString as n } from "lodash-unified";
|
|
2
|
+
import { addZeroToDecimalPlaces as f } from "../../ap-field/number/helper.mjs";
|
|
3
|
+
import { roundWith as l, toDecimalMark as m } from "../../utils/format.mjs";
|
|
4
4
|
function v(e) {
|
|
5
|
-
if (
|
|
5
|
+
if (c(e.value))
|
|
6
6
|
return e.emptyText || "--";
|
|
7
|
-
const r = n(e.prefix) ? `${e.prefix} ` : "", a = n(e.addonAfter) ? ` ${e.addonAfter}` : "", t = e.precision ?
|
|
8
|
-
let i = e.thousands ?
|
|
9
|
-
return e.precision && e.limitDecimalsRetain && (i =
|
|
7
|
+
const r = n(e.prefix) ? `${e.prefix} ` : "", a = n(e.addonAfter) ? ` ${e.addonAfter}` : "", t = e.precision ? l(e.value, e.precision) : e.value;
|
|
8
|
+
let i = e.thousands ? m(t) : String(t);
|
|
9
|
+
return e.precision && e.limitDecimalsRetain && (i = f(i, e.precision)), `${r}${i}${a}`;
|
|
10
10
|
}
|
|
11
11
|
export {
|
|
12
12
|
v as numberRenderer
|
|
@@ -21,10 +21,10 @@ const t = (e) => {
|
|
|
21
21
|
display: "inline-flex",
|
|
22
22
|
flexDirection: "column",
|
|
23
23
|
alignItems: "center",
|
|
24
|
-
color: "rgba(0, 0, 0, 0.
|
|
25
|
-
marginInlineStart:
|
|
24
|
+
color: "rgba(0, 0, 0, 0.3)",
|
|
25
|
+
marginInlineStart: e.spaceXS,
|
|
26
26
|
"&:hover": {
|
|
27
|
-
color: "rgba(0, 0, 0, 0.
|
|
27
|
+
color: "rgba(0, 0, 0, 0.6)"
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
[`${r}__sorter-up.active`]: {
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { genComponentStyleHook as
|
|
2
|
-
const
|
|
3
|
-
[`${
|
|
4
|
-
width:
|
|
5
|
-
height:
|
|
1
|
+
import { genComponentStyleHook as e } from "../../utils/cssinjs/index.mjs";
|
|
2
|
+
const o = (r) => ({
|
|
3
|
+
[`${r.componentCls}-close`]: {
|
|
4
|
+
width: r.controlHeight,
|
|
5
|
+
height: r.controlHeight,
|
|
6
6
|
display: "flex",
|
|
7
7
|
flexDirection: "column",
|
|
8
8
|
justifyContent: "center",
|
|
9
9
|
alignItems: "center",
|
|
10
|
-
border:
|
|
11
|
-
borderRadius:
|
|
10
|
+
border: `${r.lineWidth} ${r.lineType} ${r.borderColorBase}`,
|
|
11
|
+
borderRadius: r.borderRadius,
|
|
12
12
|
cursor: "pointer",
|
|
13
13
|
".user-frontend-icon": {
|
|
14
|
-
fontSize:
|
|
14
|
+
fontSize: r.fontSizeXL,
|
|
15
15
|
display: "flex",
|
|
16
16
|
alignItems: "center",
|
|
17
|
-
transition:
|
|
17
|
+
transition: `color ${r.motionDurationMid}`
|
|
18
18
|
},
|
|
19
19
|
"&:hover": {
|
|
20
20
|
".user-frontend-icon": {
|
|
21
|
-
color:
|
|
21
|
+
color: r.colorError
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
}), t =
|
|
26
|
-
r
|
|
25
|
+
}), t = e("ApDrawer", (r) => [
|
|
26
|
+
o(r)
|
|
27
27
|
]);
|
|
28
28
|
export {
|
|
29
29
|
t as default
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { computed as o } from "vue";
|
|
2
2
|
import "../../config-provider/index.mjs";
|
|
3
|
-
import
|
|
4
|
-
import { useLocale as
|
|
3
|
+
import "../../utils/index.mjs";
|
|
4
|
+
import { useLocale as n } from "../../config-provider/hooks/use-locale.mjs";
|
|
5
|
+
import { isDef as i } from "../../utils/is.mjs";
|
|
5
6
|
const c = ["Select", "Date"], a = [
|
|
6
7
|
"Text",
|
|
7
8
|
"TextArea",
|
|
8
9
|
"Number",
|
|
9
10
|
"TextPassword"
|
|
10
11
|
], d = (t, r) => {
|
|
11
|
-
const { t: e } =
|
|
12
|
+
const { t: e } = n();
|
|
12
13
|
return o(() => {
|
|
13
|
-
if (
|
|
14
|
+
if (i(r.placeholder))
|
|
14
15
|
return r.placeholder;
|
|
15
16
|
if (t === "DateRange")
|
|
16
17
|
return [e("ap.field.startDateText"), e("ap.field.endDateText")];
|
|
@@ -2,11 +2,11 @@ import { defineComponent as C, ref as N, computed as D, unref as t, createElemen
|
|
|
2
2
|
import { InputNumber as M } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../../hooks/index.mjs";
|
|
4
4
|
import { isNil as T, omit as F } from "lodash-unified";
|
|
5
|
-
import {
|
|
6
|
-
import { addZeroToDecimalPlaces as w } from "./helper.mjs";
|
|
5
|
+
import { addZeroToDecimalPlaces as W } from "./helper.mjs";
|
|
7
6
|
import "../../config-provider/index.mjs";
|
|
8
|
-
import { useDefaultPlaceholder as
|
|
9
|
-
import
|
|
7
|
+
import { useDefaultPlaceholder as _ } from "../hooks/use-default-placeholder.mjs";
|
|
8
|
+
import w from "../style/index.mjs";
|
|
9
|
+
import { roundWith as L, toDecimalMark as O } from "../../utils/format.mjs";
|
|
10
10
|
import { useNamespace as Z } from "../../config-provider/hooks/use-namespace.mjs";
|
|
11
11
|
import { useControllableValue as j } from "../../hooks/useControllableValue.mjs";
|
|
12
12
|
const re = /* @__PURE__ */ C({
|
|
@@ -60,16 +60,16 @@ const re = /* @__PURE__ */ C({
|
|
|
60
60
|
},
|
|
61
61
|
emits: ["update:value"],
|
|
62
62
|
setup(m, { expose: c, emit: y }) {
|
|
63
|
-
const v = y, { b: l } = Z("field-number"), h =
|
|
63
|
+
const v = y, { b: l } = Z("field-number"), h = w("field"), o = m, n = N(), { value: p, updateValue: B } = j(
|
|
64
64
|
o,
|
|
65
65
|
v
|
|
66
|
-
), b =
|
|
66
|
+
), b = _("Number", o), k = D(() => {
|
|
67
67
|
let e = t(p);
|
|
68
68
|
if (T(e))
|
|
69
69
|
return o.emptyText;
|
|
70
|
-
o.precision && (e =
|
|
71
|
-
let a = o.thousands ?
|
|
72
|
-
return o.precision && o.limitDecimalsRetain && (a =
|
|
70
|
+
o.precision && (e = L(e, o.precision));
|
|
71
|
+
let a = o.thousands ? O(e) : String(e);
|
|
72
|
+
return o.precision && o.limitDecimalsRetain && (a = W(a, o.precision)), a;
|
|
73
73
|
});
|
|
74
74
|
function g() {
|
|
75
75
|
n.value?.focus();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as p, computed as d, createElementBlock as a, openBlock as n, createCommentVNode as r, createElementVNode as m, renderSlot as l, toDisplayString as u } from "vue";
|
|
2
2
|
import { isNil as c } from "lodash-unified";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { addZeroToDecimalPlaces as f } from "./helper.mjs";
|
|
4
|
+
import { roundWith as y, toDecimalMark as B } from "../../utils/format.mjs";
|
|
5
5
|
const h = {
|
|
6
6
|
key: 0,
|
|
7
7
|
style: { "padding-right": "4px" }
|
|
@@ -62,9 +62,9 @@ const h = {
|
|
|
62
62
|
let e = o.value;
|
|
63
63
|
if (c(e))
|
|
64
64
|
return o.emptyText;
|
|
65
|
-
o.precision && (e =
|
|
66
|
-
let t = o.thousands ?
|
|
67
|
-
return o.precision && o.limitDecimalsRetain && (t =
|
|
65
|
+
o.precision && (e = y(e, o.precision));
|
|
66
|
+
let t = o.thousands ? B(e) : String(e);
|
|
67
|
+
return o.precision && o.limitDecimalsRetain && (t = f(t, o.precision)), t;
|
|
68
68
|
});
|
|
69
69
|
return (e, t) => (n(), a("span", null, [
|
|
70
70
|
e.$slots.prefix ? (n(), a("span", h, [
|