From 5ad8e3aa8ddaf5dee82c1f2addf0267d4bd8268b Mon Sep 17 00:00:00 2001 From: xuliangzhan Date: Thu, 26 Dec 2024 16:04:50 +0800 Subject: [PATCH] releases 3.3.48 --- package.json | 2 +- packages/number-input/src/number-input.ts | 24 ++++++++++++----------- types/components/table.d.ts | 1 + 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 0668cee5..ac1c2bde 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vxe-pc-ui", - "version": "3.3.47", + "version": "3.3.48", "description": "A vue based PC component library", "scripts": { "update": "npm install --legacy-peer-deps", diff --git a/packages/number-input/src/number-input.ts b/packages/number-input/src/number-input.ts index b722c468..53cc6e2c 100644 --- a/packages/number-input/src/number-input.ts +++ b/packages/number-input/src/number-input.ts @@ -489,19 +489,19 @@ export default defineVxeComponent({ const { inputValue } = reactData const digitsValue = $xeNumberInput.computeDigitsValue const decimalsType = $xeNumberInput.computeDecimalsType - if (decimalsType) { - if (val) { - let textValue = '' - if (val) { - textValue = toFloatValueFixed(val, digitsValue) - if (!autoFill) { - textValue = `${XEUtils.toNumber(textValue)}` - } - } - if (textValue !== inputValue) { - reactData.inputValue = textValue + if (eqEmptyValue(val)) { + reactData.inputValue = '' + } else { + let textValue = `${val}` + if (decimalsType) { + textValue = toFloatValueFixed(val, digitsValue) + if (!autoFill) { + textValue = `${XEUtils.toNumber(textValue)}` } } + if (textValue !== inputValue) { + reactData.inputValue = textValue + } } }, /** @@ -529,6 +529,8 @@ export default defineVxeComponent({ } if (inputValue !== validValue) { $xeNumberInput.handleChange(validValue, textValue, { type: 'init' }) + } else { + reactData.inputValue = textValue } } } diff --git a/types/components/table.d.ts b/types/components/table.d.ts index 68e30efe..955dfb09 100644 --- a/types/components/table.d.ts +++ b/types/components/table.d.ts @@ -3676,6 +3676,7 @@ export interface TablePrivateMethods { triggerTreeExpandEvent(evnt: Event, params: VxeTableDefines.CellRenderBodyParams): void triggerSortEvent(evnt: Event, column: VxeTableDefines.ColumnInfo, order: VxeTablePropTypes.SortOrder): void triggerHeaderCellMousedownEvent(evnt: any, params: any): void + triggerCellMousedownEvent(evnt: MouseEvent, params: any): void triggerCellMousedownEvent(evnt: any, params: any): void handleRowDragDragstartEvent (evnt: DragEvent): void handleRowDragDragendEvent(evnt: DragEvent): void