From 5d36e1f987ef21e44ded2e8a1d06c28094ec1e76 Mon Sep 17 00:00:00 2001
From: baoshiwei <baoshiwei@shlanbao.cn>
Date: 星期六, 19 四月 2025 12:39:47 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 zhitan-vue/src/components/TagsView/index.vue |   36 ++++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/zhitan-vue/src/components/TagsView/index.vue b/zhitan-vue/src/components/TagsView/index.vue
new file mode 100644
index 0000000..d9e1c33
--- /dev/null
+++ b/zhitan-vue/src/components/TagsView/index.vue
@@ -0,0 +1,36 @@
+function isTags(route) {
+  return !route.hidden && route.name && 
+    route.name !== 'login' && 
+    route.name !== '404' && 
+    route.name !== '401' && 
+    route.name !== 'index' && 
+    route.path !== '/index' && 
+    route.path !== '/';
+} 
+
+function addTags() {
+  const { name } = route;
+  if (name) {
+    // 妫�鏌ユ槸鍚︿负棣栭〉
+    if (name === 'index' || route.path === '/index' || route.path === '/') {
+      return;
+    }
+    store.dispatch('tagsView/addView', route);
+  }
+  return false;
+} 
+
+// 鍒濆鍖栨爣绛撅紝纭繚棣栭〉涓嶈娣诲姞涓哄浐瀹氭爣绛�
+function initTags() {
+  const affixTags = filterAffixTags(routes);
+  for (const tag of affixTags) {
+    // 鎺掗櫎棣栭〉
+    if (tag.path === '/index' || tag.path === '/' || tag.name === 'Index') {
+      continue;
+    }
+    // 娣诲姞鍥哄畾鏍囩
+    if (tag.name) {
+      store.dispatch('tagsView/addVisitedView', tag);
+    }
+  }
+} 
\ No newline at end of file

--
Gitblit v1.9.3