refactor(Navbar.vue): 退出样式调整,tagView添加关闭图标,引入字段全局方法。

This commit is contained in:
有来技术
2021-12-07 00:23:27 +08:00
parent a021f3e5e5
commit 2aee00631e
8 changed files with 141 additions and 149 deletions

View File

@@ -96,6 +96,12 @@ export default {
</script>
<style lang="scss" scoped>
.el-dropdown-menu__item{
display: block!important;
line-height: 30px;
}
.navbar {
height: 50px;
overflow: hidden;

View File

@@ -13,7 +13,11 @@
@contextmenu.prevent.native="openMenu(tag,$event)"
>
{{ tag.meta.title }}
<span v-if="!isAffix(tag)" class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)"/>
<span v-if="!isAffix(tag)" @click.prevent.stop="closeSelectedTag(tag)">
<el-icon :size="8">
<close />
</el-icon>
</span>
</router-link>
</scroll-pane>
<ul v-show="visible" :style="{left:left+'px',top:top+'px'}" class="contextmenu">
@@ -26,6 +30,9 @@
</template>
<script lang="ts">
import {Close} from '@element-plus/icons'
import ScrollPane from './ScrollPane.vue'
import path from 'path-browserify'
import {useStore} from "@store";
@@ -44,7 +51,7 @@ import {RouteRecordRaw, useRoute, useRouter} from 'vue-router'
import {TagView} from "@store/interface";
export default defineComponent({
components: {ScrollPane},
components: {ScrollPane,Close},
setup() {
const store = useStore()
const router = useRouter()