This commit is contained in:
xingyu4j
2025-11-07 19:06:34 +08:00
parent 31a8d38174
commit 15215b4f4c
19 changed files with 57 additions and 57 deletions

View File

@@ -134,7 +134,8 @@ function onChildDragEnd({ newIndex }: { newIndex: number }) {
class="menu-item"
:class="{ active: props.activeIndex === `${x}` }"
>
<IconifyIcon icon="ep:fold" color="black" />{{ parent.name }}
<IconifyIcon icon="lucide:panel-right-open" color="black" />
{{ parent.name }}
</div>
<!-- 以下为二级菜单-->
<div class="submenu" v-if="props.parentIndex === x && parent.children">
@@ -164,7 +165,7 @@ function onChildDragEnd({ newIndex }: { newIndex: number }) {
v-if="!parent.children || parent.children.length < 5"
@click="addSubMenu(x, parent)"
>
<IconifyIcon icon="ep:plus" class="plus" />
<IconifyIcon icon="lucide:plus" class="plus" />
</div>
</div>
</div>
@@ -177,7 +178,7 @@ function onChildDragEnd({ newIndex }: { newIndex: number }) {
v-if="menuList.length < 3"
@click="addMenu"
>
<IconifyIcon icon="ep:plus" class="plus" />
<IconifyIcon icon="lucide:plus" class="plus" />
</div>
</template>

View File

@@ -8,7 +8,7 @@ import { handleTree } from '@vben/utils';
import { Button, Form, message } from 'ant-design-vue';
import * as MpMenuApi from '#/api/mp/menu';
import { deleteMenu, getMenuList, saveMenu } from '#/api/mp/menu';
import { MenuEditor, MenuPreviewer } from '#/views/mp/menu/components';
import { Level, MENU_NOT_SELECTED } from '#/views/mp/menu/data';
import { WxAccountSelect } from '#/views/mp/modules/wx-account-select';
@@ -60,7 +60,7 @@ function onAccountChanged(id: number, name: string) {
async function getList() {
loading.value = true;
try {
const data = await MpMenuApi.getMenuList(accountId.value);
const data = await getMenuList(accountId.value);
const menuData = menuListToFrontend(data);
menuList.value = handleTree(menuData, 'id') as Menu[];
} finally {
@@ -178,7 +178,7 @@ async function onSave() {
duration: 0,
});
try {
await MpMenuApi.saveMenu(accountId.value, menuListToBackend());
await saveMenu(accountId.value, menuListToBackend());
getList();
message.success('发布成功');
} finally {
@@ -198,7 +198,7 @@ async function onClear() {
duration: 0,
});
try {
await MpMenuApi.deleteMenu(accountId.value);
await deleteMenu(accountId.value);
handleQuery();
message.success('清空成功');
} finally {