wip: use kingdee style header
This commit is contained in:
parent
11908d5812
commit
36db6015dc
@ -17,7 +17,7 @@ import { getCurrentParentPath } from '@/router/menus'
|
|||||||
import { listenerRouteChange } from '@/logics/mitt/routeChange'
|
import { listenerRouteChange } from '@/logics/mitt/routeChange'
|
||||||
import { getAllParentPath } from '@/router/helper/menuHelper'
|
import { getAllParentPath } from '@/router/helper/menuHelper'
|
||||||
|
|
||||||
defineOptions({ name: 'BasicMenu' })
|
defineOptions({ name: 'KingdeeBasicMenu' })
|
||||||
|
|
||||||
const props = defineProps(basicProps)
|
const props = defineProps(basicProps)
|
||||||
const emit = defineEmits(['menuClick'])
|
const emit = defineEmits(['menuClick'])
|
||||||
@ -35,7 +35,7 @@ const menuState = reactive<MenuState>({
|
|||||||
const { prefixCls } = useDesign('basic-menu')
|
const { prefixCls } = useDesign('basic-menu')
|
||||||
const { items, mode, accordion } = toRefs(props)
|
const { items, mode, accordion } = toRefs(props)
|
||||||
|
|
||||||
const { getCollapsed, getTopMenuAlign, getSplit } = useMenuSetting()
|
const { getCollapsed, getSplit } = useMenuSetting()
|
||||||
|
|
||||||
const { currentRoute } = useRouter()
|
const { currentRoute } = useRouter()
|
||||||
|
|
||||||
@ -48,10 +48,10 @@ const getIsTopMenu = computed(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const getMenuClass = computed(() => {
|
const getMenuClass = computed(() => {
|
||||||
const align = props.isHorizontal && unref(getSplit) ? 'start' : unref(getTopMenuAlign)
|
// const align = props.isHorizontal && unref(getSplit) ? 'start' : unref(getTopMenuAlign)
|
||||||
return [
|
return [
|
||||||
prefixCls,
|
prefixCls,
|
||||||
`justify-${align}`,
|
`justify-start`,
|
||||||
{
|
{
|
||||||
[`${prefixCls}__second`]: !props.isHorizontal && unref(getSplit),
|
[`${prefixCls}__second`]: !props.isHorizontal && unref(getSplit),
|
||||||
[`${prefixCls}__sidebar-hor`]: unref(getIsTopMenu),
|
[`${prefixCls}__sidebar-hor`]: unref(getIsTopMenu),
|
||||||
|
@ -65,7 +65,8 @@ const getTabsState = computed(() => {
|
|||||||
else { return tabStore.getTabList.filter(item => !item.meta?.hideTab) }
|
else { return tabStore.getTabList.filter(item => !item.meta?.hideTab) }
|
||||||
})
|
})
|
||||||
|
|
||||||
const unClose = computed(() => unref(getTabsState).length === 1)
|
// const unClose = computed(() => unref(getTabsState).length === 1)
|
||||||
|
const unClose = computed(() => false)
|
||||||
|
|
||||||
const { y: mouseY } = useMouse()
|
const { y: mouseY } = useMouse()
|
||||||
|
|
||||||
@ -128,11 +129,11 @@ function handleEdit(targetKey: string) {
|
|||||||
@edit="handleEdit"
|
@edit="handleEdit"
|
||||||
>
|
>
|
||||||
<template v-for="item in getTabsState" :key="item.query ? item.fullPath : item.path">
|
<template v-for="item in getTabsState" :key="item.query ? item.fullPath : item.path">
|
||||||
<Tabs.TabPane :closable="!(item && item.meta && item.meta.affix)">
|
<a-tab-pane :closable="!(item && item.meta && item.meta.affix)">
|
||||||
<template #tab>
|
<template #tab>
|
||||||
<TabContent :tab-item="item" />
|
<TabContent :tab-item="item" />
|
||||||
</template>
|
</template>
|
||||||
</Tabs.TabPane>
|
</a-tab-pane>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="getShowRedo || getShowQuick" #rightExtra>
|
<template v-if="getShowRedo || getShowQuick" #rightExtra>
|
||||||
|
Loading…
Reference in New Issue
Block a user