mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-21 14:13:36 +08:00
feat: use unplugin-vue-define-options add setup name
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import { useDetail } from "./hooks";
|
||||
|
||||
defineOptions({
|
||||
name: "TabDetail"
|
||||
});
|
||||
|
||||
const { initToDetail, id } = useDetail();
|
||||
initToDetail();
|
||||
</script>
|
||||
|
||||
@@ -11,7 +11,7 @@ export function useDetail() {
|
||||
useMultiTagsStoreHook().handleTags("push", {
|
||||
path: `/tabs/detail`,
|
||||
parentPath: route.matched[0].path,
|
||||
name: "tabDetail",
|
||||
name: "TabDetail",
|
||||
query: { id: String(index) },
|
||||
meta: {
|
||||
title: { zh: `No.${index} - 详情信息`, en: `No.${index} - DetailInfo` },
|
||||
@@ -19,7 +19,7 @@ export function useDetail() {
|
||||
dynamicLevel: 3
|
||||
}
|
||||
});
|
||||
router.push({ name: "tabDetail", query: { id: String(index) } });
|
||||
router.push({ name: "TabDetail", query: { id: String(index) } });
|
||||
}
|
||||
|
||||
function initToDetail() {
|
||||
|
||||
@@ -10,6 +10,11 @@ import {
|
||||
getNodeByUniqueId
|
||||
} from "/@/utils/tree";
|
||||
import { useDetail } from "./hooks";
|
||||
|
||||
defineOptions({
|
||||
name: "Tabs"
|
||||
});
|
||||
|
||||
const { toDetail, router } = useDetail();
|
||||
|
||||
let treeData = computed(() => {
|
||||
|
||||
Reference in New Issue
Block a user