|
|
@ -5,13 +5,14 @@ |
|
|
v-for="tag in visitedViews" |
|
|
v-for="tag in visitedViews" |
|
|
:key="tag.path" |
|
|
:key="tag.path" |
|
|
:data-path="tag.path" |
|
|
:data-path="tag.path" |
|
|
:class="isActive(tag) ? 'active' : ''" |
|
|
:class="{ 'active': isActive(tag), 'has-icon': tagsIcon }" |
|
|
:to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }" |
|
|
:to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }" |
|
|
class="tags-view-item" |
|
|
class="tags-view-item" |
|
|
:style="activeStyle(tag)" |
|
|
:style="activeStyle(tag)" |
|
|
@click.middle="!isAffix(tag) ? closeSelectedTag(tag) : ''" |
|
|
@click.middle="!isAffix(tag) ? closeSelectedTag(tag) : ''" |
|
|
@contextmenu.prevent="openMenu(tag, $event)" |
|
|
@contextmenu.prevent="openMenu(tag, $event)" |
|
|
> |
|
|
> |
|
|
|
|
|
<svg-icon v-if="tagsIcon && tag.meta && tag.meta.icon && tag.meta.icon !== '#'" :icon-class="tag.meta.icon"/> |
|
|
{{ tag.title }} |
|
|
{{ tag.title }} |
|
|
<span v-if="!isAffix(tag)" @click.prevent.stop="closeSelectedTag(tag)"> |
|
|
<span v-if="!isAffix(tag)" @click.prevent.stop="closeSelectedTag(tag)"> |
|
|
<close class="el-icon-close" style="width: 1em; height: 1em;vertical-align: middle;" /> |
|
|
<close class="el-icon-close" style="width: 1em; height: 1em;vertical-align: middle;" /> |
|
|
@ -62,6 +63,7 @@ const router = useRouter() |
|
|
const visitedViews = computed(() => useTagsViewStore().visitedViews) |
|
|
const visitedViews = computed(() => useTagsViewStore().visitedViews) |
|
|
const routes = computed(() => usePermissionStore().routes) |
|
|
const routes = computed(() => usePermissionStore().routes) |
|
|
const theme = computed(() => useSettingsStore().theme) |
|
|
const theme = computed(() => useSettingsStore().theme) |
|
|
|
|
|
const tagsIcon = computed(() => useSettingsStore().tagsIcon) |
|
|
|
|
|
|
|
|
watch(route, () => { |
|
|
watch(route, () => { |
|
|
addTags() |
|
|
addTags() |
|
|
@ -307,6 +309,10 @@ function handleScroll() { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.tags-view-item.active.has-icon::before { |
|
|
|
|
|
content: none !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.contextmenu { |
|
|
.contextmenu { |
|
|
margin: 0; |
|
|
margin: 0; |
|
|
background: var(--el-bg-color-overlay, #fff); |
|
|
background: var(--el-bg-color-overlay, #fff); |
|
|
|