fix: todo 处理

This commit is contained in:
dylanmay
2025-12-05 11:00:48 +08:00
parent 5a6122ab75
commit 5bae28516c
16 changed files with 792 additions and 908 deletions

View File

@@ -16,6 +16,7 @@ const props = defineProps<{
const emit = defineEmits<{
delete: [v: number];
refresh: [];
}>();
const columns = useImageGridColumns();
@@ -37,6 +38,21 @@ const [Grid, gridApi] = useVbenVxeGrid<MpMaterialApi.Material>({
refresh: true,
},
showOverflow: 'tooltip',
proxyConfig: {
ajax: {
query: async () => {
// 数据由父组件管理,触发刷新事件后返回当前数据
emit('refresh');
// 返回当前数据,避免覆盖
return {
list: Array.isArray(props.list) ? props.list : [],
total: props.list?.length || 0,
};
},
},
enabled: true,
autoLoad: false,
},
},
});
@@ -55,7 +71,7 @@ watch(
await nextTick();
updateGridData(data);
},
{ flush: 'post' },
{ immediate: true, flush: 'post' },
);
watch(