From 55ad6f5f430f2797663728babb80c3dcb296a068 Mon Sep 17 00:00:00 2001 From: xuliangzhan Date: Sun, 25 Aug 2024 17:31:00 +0800 Subject: [PATCH] releases 4.7.70 --- package.json | 4 ++-- packages/table/render/index.ts | 8 ++++---- packages/table/src/table.ts | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 16b9716772..014ed70754 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vxe-table", - "version": "4.7.68", + "version": "4.7.70", "description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟树、列拖拽,懒加载、快捷菜单、数据校验、树形结构、打印、导入导出、自定义模板、渲染器、JSON 配置式...", "scripts": { "update": "npm install --legacy-peer-deps", @@ -28,7 +28,7 @@ "style": "lib/style.css", "typings": "types/index.d.ts", "dependencies": { - "vxe-pc-ui": "^4.1.4" + "vxe-pc-ui": "^4.1.6" }, "devDependencies": { "@types/resize-observer-browser": "^0.1.11", diff --git a/packages/table/render/index.ts b/packages/table/render/index.ts index b241d8cad0..4d0cd04ba4 100644 --- a/packages/table/render/index.ts +++ b/packages/table/render/index.ts @@ -29,6 +29,7 @@ function getChangeEvent (renderOpts: any) { case 'input': case 'textarea': case 'VxeInput': + case 'VxeNumberInput': case 'VxeTextarea': case '$input': case '$textarea': @@ -215,15 +216,14 @@ function getEditOns (renderOpts: any, params: any) { const isImmediate = isImmediateCell(renderOpts, params) return getComponentOns(renderOpts, params, (cellValue: any) => { // 处理 model 值双向绑定 + model.update = true + model.value = cellValue if (isImmediate) { setCellValue(row, column, cellValue) - } else { - model.update = true - model.value = cellValue } }, (eventParams: any) => { // 处理 change 事件相关逻辑 - if (!isImmediate && (['VxeInput', 'VxeTextarea', '$input', '$textarea'].includes(name))) { + if (!isImmediate && (['VxeInput', 'VxeNumberInput', 'VxeTextarea', '$input', '$textarea'].includes(name))) { const cellValue = eventParams.value model.update = true model.value = cellValue diff --git a/packages/table/src/table.ts b/packages/table/src/table.ts index d7171a4b6d..6008188cdf 100644 --- a/packages/table/src/table.ts +++ b/packages/table/src/table.ts @@ -1438,7 +1438,7 @@ export default defineComponent({ const { filterMethod, filterRender } = column const compConf = isEnableConf(filterRender) ? renderer.get(filterRender.name) : null const compFilterMethod = compConf ? (compConf.tableFilterMethod || compConf.filterMethod) : null - const tdFilterMethod = compConf ? (compConf.defaultTableFilterMethod || compConf.defaultFilterMethod) : null + const tdFilterMethod = compConf ? (compConf.tableFilterDefaultMethod || compConf.defaultTableFilterMethod || compConf.defaultFilterMethod) : null const cellValue = getCellValue(row, column) if (filterMethod) { return itemList.some((item) => filterMethod({ value: item.value, option: item, cellValue, row, column, $table: $xeTable }))