|
@ -1,7 +1,6 @@ |
|
|
<template> |
|
|
<template> |
|
|
<!-- id="tags-view-container" class="tags-view-container" --> |
|
|
<div id="tags-view-container" class="tags-view-container"> |
|
|
<div> |
|
|
<scroll-pane ref="scrollPane" class="tags-view-wrapper" @scroll="handleScroll"> |
|
|
<!-- <scroll-pane ref="scrollPane" class="tags-view-wrapper" @scroll="handleScroll"> |
|
|
|
|
|
<router-link |
|
|
<router-link |
|
|
v-for="tag in visitedViews" |
|
|
v-for="tag in visitedViews" |
|
|
ref="tag" |
|
|
ref="tag" |
|
@ -25,7 +24,7 @@ |
|
|
<li v-if="!isFirstView()" @click="closeLeftTags"><i class="el-icon-back"></i> 关闭左侧</li> |
|
|
<li v-if="!isFirstView()" @click="closeLeftTags"><i class="el-icon-back"></i> 关闭左侧</li> |
|
|
<li v-if="!isLastView()" @click="closeRightTags"><i class="el-icon-right"></i> 关闭右侧</li> |
|
|
<li v-if="!isLastView()" @click="closeRightTags"><i class="el-icon-right"></i> 关闭右侧</li> |
|
|
<li @click="closeAllTags(selectedTag)"><i class="el-icon-circle-close"></i> 全部关闭</li> |
|
|
<li @click="closeAllTags(selectedTag)"><i class="el-icon-circle-close"></i> 全部关闭</li> |
|
|
</ul> --> |
|
|
</ul> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
@ -142,7 +141,6 @@ export default { |
|
|
}, |
|
|
}, |
|
|
moveToCurrentTag() { |
|
|
moveToCurrentTag() { |
|
|
const tags = this.$refs.tag |
|
|
const tags = this.$refs.tag |
|
|
if (tags) { |
|
|
|
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
for (const tag of tags) { |
|
|
for (const tag of tags) { |
|
|
if (tag.to.path === this.$route.path) { |
|
|
if (tag.to.path === this.$route.path) { |
|
@ -155,7 +153,6 @@ export default { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
|
|
|
}, |
|
|
}, |
|
|
refreshSelectedTag(view) { |
|
|
refreshSelectedTag(view) { |
|
|
this.$tab.refreshPage(view); |
|
|
this.$tab.refreshPage(view); |
|
@ -185,7 +182,7 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
closeOthersTags() { |
|
|
closeOthersTags() { |
|
|
this.$router.push(this.selectedTag).catch(()=>{}); |
|
|
this.$router.push(this.selectedTag.fullPath).catch(()=>{}); |
|
|
this.$tab.closeOtherPage(this.selectedTag).then(() => { |
|
|
this.$tab.closeOtherPage(this.selectedTag).then(() => { |
|
|
this.moveToCurrentTag() |
|
|
this.moveToCurrentTag() |
|
|
}) |
|
|
}) |
|
|