fix: 移除新增的tabKey,调整对应的路由设计,方便关闭路由和修改标题

feat: 新样式的退回操作对话框
This commit is contained in:
gaoyunqi
2024-02-28 16:16:17 +08:00
parent cb075df41c
commit 8a8d18a33a
10 changed files with 362 additions and 250 deletions

View File

@ -94,17 +94,16 @@
];
const selectedKeys = ref(['ToDoTasks']);
const query = unref(currentRoute).query;
let id = query.name;
const tabKey = query.tabKey as string;
let id = 'ToDoTasks';
const lHash = location.hash;
if (lHash.indexOf('/draft') > 0) {
id = 'Drafts';
}
let data = reactive({
componentName: shallowRef(ToDoTasks)
});
if (id) {
selectedKeys.value = [id.toString()];
const tabName = treeData.find((item) => item.id === id)?.name;
if (tabName && tabKey) {
tabStore.changeTitle(tabKey, tabName);
}
handleSelect([id]);
}