feat: 避免移动端点击 tagsView 触发关闭
This commit is contained in:
parent
325120b653
commit
007498ebd2
|
@ -13,6 +13,7 @@ const getters = {
|
||||||
setting: state => state.user.setting,
|
setting: state => state.user.setting,
|
||||||
permission_routers: state => state.permission.routers,
|
permission_routers: state => state.permission.routers,
|
||||||
addRouters: state => state.permission.addRouters,
|
addRouters: state => state.permission.addRouters,
|
||||||
errorLogs: state => state.errorLog.logs
|
errorLogs: state => state.errorLog.logs,
|
||||||
|
isMobile: state => state.app.device === 'mobile'
|
||||||
}
|
}
|
||||||
export default getters
|
export default getters
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
class="tags-view-item"
|
class="tags-view-item"
|
||||||
@contextmenu.prevent.native="openMenu(tag,$event)">
|
@contextmenu.prevent.native="openMenu(tag,$event)">
|
||||||
{{ generateTitle(tag.title) }}
|
{{ generateTitle(tag.title) }}
|
||||||
<span class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)"/>
|
<span v-show="!isMobile" class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)"/>
|
||||||
</router-link>
|
</router-link>
|
||||||
</scroll-pane>
|
</scroll-pane>
|
||||||
<ul v-show="visible" :style="{left:left+'px',top:top+'px'}" class="contextmenu">
|
<ul v-show="visible" :style="{left:left+'px',top:top+'px'}" class="contextmenu">
|
||||||
|
@ -22,6 +22,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
import ScrollPane from '@/components/ScrollPane'
|
import ScrollPane from '@/components/ScrollPane'
|
||||||
import { generateTitle } from '@/utils/i18n'
|
import { generateTitle } from '@/utils/i18n'
|
||||||
|
|
||||||
|
@ -36,6 +37,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
...mapGetters(['isMobile']),
|
||||||
visitedViews() {
|
visitedViews() {
|
||||||
return this.$store.state.tagsView.visitedViews
|
return this.$store.state.tagsView.visitedViews
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue