|
|
@@ -6,13 +6,13 @@
|
|
|
:key="tag.path"
|
|
|
:data-path="tag.path"
|
|
|
:class="{ 'active': isActive(tag), 'has-icon': tagsIcon }"
|
|
|
- :to="{ path: tag.path ? tag.path : '', query: tag.query, fullPath: tag.fullPath ? tag.fullPath : '' }"
|
|
|
+ :to="{ path: tag.path ? tag.path : '', query: tag.query }"
|
|
|
class="tags-view-item"
|
|
|
:style="activeStyle(tag)"
|
|
|
@click.middle="!isAffix(tag) ? closeSelectedTag(tag) : ''"
|
|
|
@contextmenu.prevent="openMenu(tag, $event)"
|
|
|
>
|
|
|
- <svg-icon v-if="tagsIcon && tag.meta && tag.meta.icon && tag.meta.icon !== '#'" :icon-class="tag.meta.icon"/>
|
|
|
+ <svg-icon v-if="tagsIcon && tag.meta && tag.meta.icon && tag.meta.icon !== '#'" :icon-class="tag.meta.icon" />
|
|
|
{{ tag.title }}
|
|
|
<span v-if="!isAffix(tag)" @click.prevent.stop="closeSelectedTag(tag)">
|
|
|
<close class="el-icon-close" style="width: 1em; height: 1em; vertical-align: middle" />
|
|
|
@@ -52,7 +52,7 @@ const router = useRouter();
|
|
|
const visitedViews = computed(() => useTagsViewStore().getVisitedViews());
|
|
|
const routes = computed(() => usePermissionStore().getRoutes());
|
|
|
const theme = computed(() => useSettingsStore().theme);
|
|
|
-const tagsIcon = computed(() => useSettingsStore().tagsIcon)
|
|
|
+const tagsIcon = computed(() => useSettingsStore().tagsIcon);
|
|
|
|
|
|
watch(route, () => {
|
|
|
addTags();
|
|
|
@@ -180,7 +180,7 @@ const closeLeftTags = () => {
|
|
|
});
|
|
|
};
|
|
|
const closeOthersTags = () => {
|
|
|
- router.push(selectedTag.value).catch(() => {});
|
|
|
+ router.push(selectedTag.value?.fullPath || '/').catch(() => {});
|
|
|
proxy?.$tab.closeOtherPage(selectedTag.value).then(() => {
|
|
|
moveToCurrentTag();
|
|
|
});
|
|
|
@@ -240,27 +240,28 @@ onMounted(() => {
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
.tags-view-container {
|
|
|
- height: 34px;
|
|
|
+ height: 48px;
|
|
|
width: 100%;
|
|
|
- background-color: var(--el-bg-color);
|
|
|
- border: 1px solid var(--el-border-color-light);
|
|
|
- box-shadow:
|
|
|
- 0 1px 3px 0 rgba(0, 0, 0, 0.12),
|
|
|
- 0 0 3px 0 rgba(0, 0, 0, 0.04);
|
|
|
+ // background-color: var(--el-bg-color);
|
|
|
+ // border-bottom: 1px solid var(--el-border-color-light);
|
|
|
+ // box-shadow:
|
|
|
+ // 0 1px 3px 0 rgba(0, 0, 0, 0.12),
|
|
|
+ // 0 0 3px 0 rgba(0, 0, 0, 0.04);
|
|
|
.tags-view-wrapper {
|
|
|
.tags-view-item {
|
|
|
display: inline-block;
|
|
|
position: relative;
|
|
|
cursor: pointer;
|
|
|
- height: 26px;
|
|
|
- line-height: 23px;
|
|
|
+ height: 30px;
|
|
|
+ line-height: 30px;
|
|
|
background-color: var(--el-bg-color);
|
|
|
border: 1px solid var(--el-border-color-light);
|
|
|
- color: #495060;
|
|
|
+ color: #000000;
|
|
|
padding: 0 8px;
|
|
|
- font-size: 12px;
|
|
|
+ font-size: 14px;
|
|
|
margin-left: 5px;
|
|
|
- margin-top: 4px;
|
|
|
+ margin-top: 10px;
|
|
|
+ border-radius: 3px;
|
|
|
&:hover {
|
|
|
color: var(--el-color-primary);
|
|
|
}
|