From 35852d41f1582010cf4c97ebdf23d17b412873cd Mon Sep 17 00:00:00 2001 From: JEECG <445654970@qq.com> Date: Tue, 19 Aug 2025 14:03:04 +0800 Subject: [PATCH] =?UTF-8?q?jvxeTable=E8=A1=A8=E6=A0=BC=E5=88=87=E6=8D=A2di?= =?UTF-8?q?sabled=E5=B1=9E=E6=80=A7=E6=97=B6=EF=BC=8C=E7=9B=B8=E9=82=BB?= =?UTF-8?q?=E7=9A=84=E4=B8=A4=E4=B8=AA=E6=9E=9A=E4=B8=BE=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=EF=BC=8C=E5=A6=82=E6=9E=9C=E5=80=BC=E6=98=AF=E4=B8=80=E6=A0=B7?= =?UTF-8?q?=E7=9A=84=EF=BC=8C=E4=BD=86=E6=98=AFlabel=E4=B8=8D=E4=B8=80?= =?UTF-8?q?=E6=A0=B7=EF=BC=8C=E4=BC=9A=E6=8A=8A=E7=AC=AC=E4=BA=8C=E4=B8=AA?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E7=9A=84=E6=98=BE=E7=A4=BA=E5=80=BC=E6=B8=B2?= =?UTF-8?q?=E6=9F=93=E5=88=B0=E7=AC=AC=E4=B8=80=E4=B8=AA=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E4=B8=AD=20#8593?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jeecg/JVxeTable/src/hooks/useFinallyProps.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useFinallyProps.ts b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useFinallyProps.ts index 38969291a..42ac4c7e5 100644 --- a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useFinallyProps.ts +++ b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useFinallyProps.ts @@ -1,4 +1,4 @@ -import { unref, computed } from 'vue'; +import { unref, computed, ref, watch, nextTick } from 'vue'; import { merge } from 'lodash-es'; import { isArray } from '/@/utils/is'; import { useAttrs } from '/@/hooks/core/useAttrs'; @@ -40,6 +40,16 @@ export function useFinallyProps(props: JVxeTableProps, data: JVxeDataProps, meth }); return events; }); + + // update-begin--author:sunjianlei---date:20250804---for:【issues/8593】修复列改变后内容不刷新 + const vxeColumnsRef = ref([]) + watch(data.vxeColumns, async () => { + vxeColumnsRef.value = [] + await nextTick() + vxeColumnsRef.value = data.vxeColumns.value + }, {immediate: true}) + // update-end----author:sunjianlei---date:20250804---for:【issues/8593】修复列改变后内容不刷新 + // vxe 最终 props const vxeProps = computed(() => { // update-begin--author:liaozhiyang---date:20240417---for:【QQYUN-8785】online表单列位置的id未做限制,拖动其他列到id列上面,同步数据库时报错 @@ -77,7 +87,8 @@ export function useFinallyProps(props: JVxeTableProps, data: JVxeDataProps, meth size: props.size, loading: false, disabled: props.disabled, - columns: unref(data.vxeColumns), + // columns: unref(data.vxeColumns), + columns: vxeColumnsRef.value, editRules: unref(vxeEditRules), height: props.height === 'auto' ? null : props.height, maxHeight: props.maxHeight,