File tree 2 files changed +15
-4
lines changed
src/components/main/components/tags-nav
2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 42
42
left : 0px ;
43
43
}
44
44
& .right-btn {
45
- right : 0 px ;
45
+ right : 32 px ;
46
46
border-right : 1px solid #F0F0F0 ;
47
47
}
48
48
}
49
49
.scroll-outer {
50
50
position : absolute ;
51
51
left : 28px ;
52
- right : 28 px ;
52
+ right : 61 px ;
53
53
top : 0 ;
54
54
bottom : 0 ;
55
55
box-shadow : 0px 0 3px 2px rgba (100 ,100 ,100 ,.1 ) inset ;
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" tags-nav" >
3
+ <div class =" close-con" >
4
+ <Dropdown transfer @on-click =" handleTagsOption" style =" margin-top :7px ;" >
5
+ <Button size =" small" type =" text" >
6
+ <Icon :size =" 18" type =" ios-close-circle-outline" />
7
+ </Button >
8
+ <DropdownMenu slot =" list" >
9
+ <DropdownItem name =" close-all" >关闭所有</DropdownItem >
10
+ <DropdownItem name =" close-others" >关闭其他</DropdownItem >
11
+ </DropdownMenu >
12
+ </Dropdown >
13
+ </div >
3
14
<ul v-show =" visible" :style =" {left: contextMenuLeft + 'px', top: contextMenuTop + 'px'}" class =" contextmenu" >
4
15
<li v-for =" (item, key) of menuList" @click =" handleTagsOption(key)" :key =" key" >{{item}}</li >
5
16
</ul >
@@ -95,11 +106,11 @@ export default {
95
106
}
96
107
},
97
108
handleTagsOption (type ) {
98
- if (type === ' all' ) {
109
+ if (type . includes ( ' all' ) ) {
99
110
// 关闭所有,除了home
100
111
let res = this .list .filter (item => item .name === ' home' )
101
112
this .$emit (' on-close' , res, ' all' )
102
- } else if (type === ' others' ) {
113
+ } else if (type . includes ( ' others' ) ) {
103
114
// 关闭除当前页和home页的其他页
104
115
let res = this .list .filter (item => routeEqual (this .currentRouteObj , item) || item .name === ' home' )
105
116
this .$emit (' on-close' , res, ' others' , this .currentRouteObj )
You can’t perform that action at this time.
0 commit comments