提交 d3e18127 编写于 作者: RedPig97's avatar RedPig97

Revert "Revert "update: 更新""

This reverts commit 0b956f51.
上级 6114a45e
......@@ -29,6 +29,8 @@
{{#if item.psNavigateContexts}}
navContext: {{item.psNavigateContexts}},
{{/if}}
{{#if item.getPSLayoutPos}}
{{/if}}
{{#if item.psAppMenuItems}}
items: [
{{#each item.psAppMenuItems as | item |}}
......
<script setup lang="ts">
import { IActionParam, IParam } from '@core';
interface MenuCenterProps {
menus: IParam[];
}
const props = withDefaults(defineProps<MenuCenterProps>(), {
});
interface menuCenterEmit {
(name: "onMenuSelect", value: IParam): void;
}
const emit = defineEmits<menuCenterEmit>();
const onClick = (item: IParam) => {
emit("onMenuSelect", {
key: item.name,
item: item,
});
}
</script>
<template>
<a-card
v-for="(menu, index) in menus"
v-show="!menu.hidden"
:key="index"
:class="['app-menu__card', menu.itemSysCss]"
:bordered="false"
:title="menu.caption"
>
<a-space :size="24">
<template v-for="item in menu.items">
<a-button
v-if="!item.hidden"
size="large"
:class="['app-menu-item', item.itemSysCss]"
@click="onClick(item)"
>
\{{ item.caption }}
</a-button>
</template>
</a-space>
</a-card>
</template>
\ No newline at end of file
......@@ -28,11 +28,7 @@ defineExpose({ state, name: '{{ctrl.name}}' });
<template>
<div v-if="Object.is('CENTER', state.menuAlign)" class="app-menu app-menu--center{{#if ctrl.psSysCss}} {{ctrl.psSysCss.cssName}}{{/if}}">
<a-card v-for="(menu,index) in state.menus" v-show="!menu.hidden" :key="index" class="app-menu__card" :bordered="false" :title="menu.caption">
<a-space :size="24">
<a-button v-for="item in menu.items" size="large" @click="onMenuSelect({key: item.name})">\{{item.caption}}</a-button>
</a-space>
</a-card>
<AppMenuCenter :menus="state.menus" @onMenuSelect="onMenuSelect" />
</div>
<a-menu v-else class="app-menu{{#if ctrl.psSysCss}} {{ctrl.psSysCss.cssName}}{{/if}}" v-model:openKeys="state.defaultOpens" v-model:selectedKeys="state.defaultSelect"
:mode="Object.is('LEFT', state.menuAlign) ? 'inline' : 'horizontal'" @select="onMenuSelect">
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册