Skip to content

Commit

Permalink
fix(projects): menu layout show
Browse files Browse the repository at this point in the history
  • Loading branch information
paynezhuang committed Jun 13, 2024
1 parent e1ca469 commit 2f53d15
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/typings/api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ declare namespace Api {
type Menu = Common.CommonRecord<
{
/** parent menu id */
parentId: string;
parentId: UnionKey.StrNum;
/** menu type */
type: MenuType;
/** menu name */
Expand Down
3 changes: 3 additions & 0 deletions src/typings/union-key.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ declare namespace UnionKey {
/** Theme scheme */
type ThemeScheme = 'light' | 'dark' | 'auto';

/** string or number */
type StrNum = string | number;

/**
* The layout mode
*
Expand Down
4 changes: 2 additions & 2 deletions src/views/manage/menu/modules/menu-operate-drawer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function createDefaultModel(): Model {
sort: 0,
href: '',
keepAlive: 'Y',
parentId: '0',
parentId: 0,
multiTab: 'N',
activeMenu: '' as LastLevelRouteKey,
fixedIndexInTab: -1,
Expand Down Expand Up @@ -113,7 +113,7 @@ const localIconOptions = localIcons.map<SelectOption>(item => ({
value: item
}));
const showLayout = computed(() => model.parentId === '0');
const showLayout = computed(() => model.parentId === 0);
const showPage = computed(() => model.type === '2');
Expand Down

0 comments on commit 2f53d15

Please sign in to comment.