Skip to content

Commit

Permalink
fix: #326
Browse files Browse the repository at this point in the history
  • Loading branch information
kailong321200875 committed Sep 2, 2023
1 parent bdd31f0 commit c95a4e0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Setting/src/components/InterfaceDisplay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const greyModeChange = (show: boolean) => {
}
// 动态路由
const dynamicRouter = ref(appStore.getDynamicRouter)
const dynamicRouter = ref(!!appStore.getDynamicRouter)
const dynamicRouterChange = (show: boolean) => {
ElMessage.info(t('setting.reExperienced'))
Expand Down
12 changes: 11 additions & 1 deletion src/components/TabMenu/src/TabMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { usePermissionStore } from '@/store/modules/permission'
import { useAppStore } from '@/store/modules/app'
import { computed, unref, defineComponent, watch, ref, onMounted } from 'vue'
import { useI18n } from '@/hooks/web/useI18n'
import { ElScrollbar } from 'element-plus'
import { ElScrollbar, ClickOutside } from 'element-plus'
import { Icon } from '@/components/Icon'
import { Menu } from '@/components/Menu'
import { useRouter } from 'vue-router'
Expand All @@ -19,6 +19,9 @@ const prefixCls = getPrefixCls('tab-menu')
export default defineComponent({
name: 'TabMenu',
directives: {
ClickOutside
},
setup() {
const { push, currentRoute } = useRouter()
Expand Down Expand Up @@ -132,9 +135,16 @@ export default defineComponent({
return false
}
const clickOut = () => {
if (!unref(fixedMenu)) {
showMenu.value = false
}
}
return () => (
<div
id={`${variables.namespace}-menu`}
v-click-outside={clickOut}
class={[
prefixCls,
'relative bg-[var(--left-menu-bg-color)] top-1px layout-border__right',
Expand Down

0 comments on commit c95a4e0

Please sign in to comment.