jvxeTable表格切换disabled属性时,相邻的两个枚举下拉,如果值是一样的,但是label不一样,会把第二个下拉的显示值渲染到第一个下拉中 #8593

master
JEECG 2025-08-19 14:03:04 +08:00
parent a2cb1d9f25
commit 35852d41f1
1 changed files with 13 additions and 2 deletions

View File

@ -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-8785onlineidid
@ -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,