fix: 修复 素材列表 tag项目不触发数据更新
This commit is contained in:
parent
bc5d9d1054
commit
888675dbf1
|
|
@ -96,7 +96,15 @@ export const useMaterialSegmentViewStore = create<MaterialSegmentViewState>((set
|
|||
|
||||
// 设置视图模式
|
||||
setViewMode: (mode: MaterialSegmentViewMode) => {
|
||||
const currentQuery = get().currentQuery;
|
||||
set({ viewMode: mode });
|
||||
|
||||
// 如果有当前查询,重新加载数据以应用新的视图模式
|
||||
if (currentQuery) {
|
||||
console.log('视图模式切换到:', mode === MaterialSegmentViewMode.ByClassification ? '按分类' : '按模特');
|
||||
// 视图模式是前端状态,不需要传递给后端,只需要重新加载当前数据
|
||||
get().loadProjectSegmentViewWithQuery(currentQuery);
|
||||
}
|
||||
},
|
||||
|
||||
// 更新查询条件
|
||||
|
|
|
|||
Loading…
Reference in New Issue