b130a8d4 by lihua

fix: 解决嵌入页面选中问题

1 parent 6b0ea2c0
......@@ -4,6 +4,7 @@ import { useRouter } from "vue-router";
import useUserStore from "@/store/modules/user";
import useKeepAliveStore from '@/store/modules/keepAlive'
import { ElMessageBox, ElMessage } from "element-plus";
import { isEqual } from "lodash-es";
const router = useRouter();
const route = useRoute();
......@@ -26,7 +27,7 @@ watch(
if (tab.fullPath.includes(jionPath)) {
pathIndex.value = index
}
return tab.fullPath === newRouter.fullPath;
return tab.fullPath === newRouter.fullPath || (tab.path == newRouter.path && isEqual(tab.query, newRouter.query));
});
if (isExist.length == 0) {
if (pathIndex.value != -1 && routerLength > 3) {
......@@ -45,11 +46,8 @@ watch(
}
}
list.map(item => {
item.fullPath = item.fullPath;
})
tabbarList.value = list;
tabbarActive.value = newRouter.fullPath;
tabbarActive.value = isExist[0]?.fullPath || newRouter.fullPath;
userStore.setTabbar(tabbarList.value);
userStore.setActiveTabbar(combPath, newRouter.fullPath);
},
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!