From 41281c4d541a2744e5df5dff2764cc85465b6a4c Mon Sep 17 00:00:00 2001 From: kailong321200875 <321200875@qq.com> Date: Sun, 16 Jan 2022 18:05:51 +0800 Subject: [PATCH] style(TagView): Vertical center tag --- src/components/TagsView/src/TagsView.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/TagsView/src/TagsView.vue b/src/components/TagsView/src/TagsView.vue index f0fea2b..4478fee 100644 --- a/src/components/TagsView/src/TagsView.vue +++ b/src/components/TagsView/src/TagsView.vue @@ -86,6 +86,7 @@ const closeRightTags = () => { tagsViewStore.delRightViews(unref(selectedTag) as RouteLocationNormalizedLoaded) } +// 跳转到最后一个 const toLastView = () => { const visitedViews = tagsViewStore.getVisitedViews const latestView = visitedViews.slice(-1)[0] @@ -104,6 +105,7 @@ const toLastView = () => { } } +// 是否是当前tag const isActive = (route: RouteLocationNormalizedLoaded): boolean => { return route.path === unref(currentRoute).path } @@ -198,7 +200,7 @@ watch( ]" > -
+
{{ t(item?.meta?.title as string) }}