feat: (store)增加了对未定义组件的处理,添加更新页签名称方法

- 在多级菜单详情示例中使用了新的标签名称
This commit is contained in:
zimo493
2025-09-01 14:33:24 +08:00
parent 5d3e92bcf5
commit 7c1d5f6552
3 changed files with 31 additions and 9 deletions

View File

@@ -1,15 +1,21 @@
import router from "@/router";
import { ElButton } from "element-plus";
import { useTagsViewStore } from "@/store";
export default defineComponent({
name: "ToDetail",
setup() {
const route = useRoute();
const tagsViewStore = useTagsViewStore();
// 跳转详情
const navigateToDetail = async (id: number) => {
await router.push({
path: "/detail/" + id,
query: { message: `msg${id}` },
});
// 更改标题
tagsViewStore.updateTagName(route.fullPath, `详情页缓存(id=${id})`);
};
return () =>
h("div", null, [