鸿蒙智能电子锁前端项目
whychdw
2024-10-09 065266e390bfda178d2f477539924d8e6c3f487e
src/layout/components/TagsView/index.vue
@@ -4,10 +4,11 @@
      <router-link v-for="tag in visitedViews" :key="tag.path"
        :to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }" custom
        v-slot="{ navigate, isActive, isExactActive }" ref="tag">
        <span :class="['tags-view-item', isActive && 'router-link-active', isExactActive && 'router-link-exact-active']"
        <span :class="['tags-view-item', isActive && 'router-link-active', isExactActive && 'router-link-exact-active', tag.meta.icon && 'hide-dot']"
          @click="navigate"
          @click.middle="!isAffix(tag) ? closeSelectedTag(tag) : ''"
          @contextmenu.prevent="openMenu(tag, $event)">
          <svg-icon v-if="tag.meta.icon" :icon-class="tag.meta.icon" />
          {{ tag.title }}
          <icon-close v-if="!isAffix(tag)" class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)" />
        </span>
@@ -28,10 +29,11 @@
import path from 'path-browserify';
import store from '@/store';
import { Close as IconClose } from '@element-plus/icons-vue';
import SvgIcon from '@/components/SvgIcon/index.vue';
export default defineComponent({
  name: 'TagsView',
  components: { ScrollPane, IconClose },
  components: { SvgIcon, ScrollPane, IconClose },
  data() {
    return {
      visible: false,
@@ -243,6 +245,12 @@
          position: relative;
          margin-right: 2px;
        }
        &.hide-dot {
          &::before {
            width: 0;
            height: 0;
          }
        }
      }
    }
  }