|
@@ -27,9 +27,9 @@
|
|
|
</div>
|
|
|
<template #dropdown>
|
|
|
<el-dropdown-menu>
|
|
|
- <router-link to="/user/profile">
|
|
|
+ <!-- <router-link to="/user/profile">
|
|
|
<el-dropdown-item>个人中心</el-dropdown-item>
|
|
|
- </router-link>
|
|
|
+ </router-link> -->
|
|
|
<el-dropdown-item divided command="logout">
|
|
|
<span>退出登录</span>
|
|
|
</el-dropdown-item>
|
|
@@ -76,7 +76,7 @@
|
|
|
<template #label>
|
|
|
<div class="tab_pane" @click="paneClick(item)">
|
|
|
<div class="tab_text">{{ item.label }}</div>
|
|
|
- <img v-if="item.label != '首页'" src="@/assets/images/close.png" @click="closeTab(item, index, $event)"
|
|
|
+ <img v-if="item.label != '首页' && item.label != '个人中心'" src="@/assets/images/close.png" @click="closeTab(item, index, $event)"
|
|
|
alt="" />
|
|
|
</div>
|
|
|
<!-- <router-link
|
|
@@ -251,7 +251,8 @@ const iFrameData = ref(JSON.parse(sessionStorage.getItem('fileTabData')) || [
|
|
|
let tabIndex = 2;
|
|
|
const editableTabsValue = ref(JSON.parse(sessionStorage.getItem('editableTabsValue')) || "/index");
|
|
|
// const editableTabsValue = ref("/index");
|
|
|
-const editableTabs = ref(JSON.parse(sessionStorage.getItem('tabData')) || [{ label: '首页', path: '/reindex' }]);
|
|
|
+// const editableTabs = ref(JSON.parse(sessionStorage.getItem('tabData')) || [{ label: '首页', path: '/reindex' },{ label: '个人中心', path: '/user/profile' }]);
|
|
|
+const editableTabs = ref([{ label: '首页', path: '/reindex' },{ label: '个人中心', path: '/user/profile' }]);
|
|
|
|
|
|
// const removeTab = (targetName) => {
|
|
|
// const tabs = editableTabs.value;
|
|
@@ -495,10 +496,10 @@ const clickPath = (index, items) => {
|
|
|
items = toRaw(items);
|
|
|
localStorage.setItem("inChat", items.path == "/index" ? 1 : 0)
|
|
|
// toFileData.value = null
|
|
|
- console.log("clickPathitems", items);
|
|
|
// editableTabs.value = arr;
|
|
|
isSwitchFileIframe.value = false
|
|
|
const arr = toRaw(editableTabs.value);
|
|
|
+ console.log('editableTabs.value', editableTabs.value)
|
|
|
if (!arr.some((item) => item.label == items.label)) {
|
|
|
editableTabs.value.push({
|
|
|
label: items.label,
|
|
@@ -512,7 +513,6 @@ const clickPath = (index, items) => {
|
|
|
}
|
|
|
editableTabsValue.value = items.path;
|
|
|
isAlive.value = true;
|
|
|
- // console.log("editableTabs", editableTabs.value);
|
|
|
};
|
|
|
const clickTab = (item) => {
|
|
|
let url = toRaw(item)
|
|
@@ -844,6 +844,7 @@ const iframeSize = (id) => {
|
|
|
// 监听和保存标签信息
|
|
|
const setTabLocal = (data) => {
|
|
|
// console.log('setTabLocal',data);
|
|
|
+ console.log('data====', data)
|
|
|
sessionStorage.setItem('tabData', JSON.stringify(data))
|
|
|
}
|
|
|
const setFileTabLocal = (data) => {
|
|
@@ -867,6 +868,7 @@ watch(() => iFrameData.value, (newValue, oldValue) => {
|
|
|
watch(() => editableTabs.value, (newValue, oldValue) => {
|
|
|
// console.log('editableTabs 发生改变了', newValue, oldValue);
|
|
|
setTabLocal(toRaw(newValue))
|
|
|
+ console.log('editableTabs.valuewatch', editableTabs.value)
|
|
|
}, {
|
|
|
immediate: true,
|
|
|
deep: true
|
|
@@ -878,6 +880,7 @@ watch(() => editableTabsValue.value, (newValue, oldValue) => {
|
|
|
if (!regExp.test(editableTabsValue.value)) {
|
|
|
isAlive.value = false;
|
|
|
}
|
|
|
+ console.log('first editableTabsValue.value', editableTabsValue.value)
|
|
|
}, {
|
|
|
immediate: true,
|
|
|
deep: true
|