Skip to content

Commit

Permalink
refactor(projects): menu-operate-drawer => menu-operate-modal
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed May 6, 2024
1 parent c4b5c65 commit 003e145
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions src/views/manage/menu/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import { $t } from '@/locales';
import { yesOrNoRecord } from '@/constants/common';
import { enableStatusRecord, menuTypeRecord } from '@/constants/business';
import SvgIcon from '@/components/custom/svg-icon.vue';
import MenuOperateDrawer, { type OperateType } from './modules/menu-operate-drawer.vue';
import MenuOperateModal, { type OperateType } from './modules/menu-operate-modal.vue';
const appStore = useAppStore();
const { bool: drawerVisible, setTrue: openDrawer, setFalse: _closeDrawer } = useBoolean();
const { bool: visible, setTrue: openModal } = useBoolean();
const wrapperRef = ref<HTMLElement | null>(null);
Expand Down Expand Up @@ -176,7 +176,7 @@ const operateType = ref<OperateType>('add');
function handleAdd() {
operateType.value = 'add';
openDrawer();
openModal();
}
async function handleBatchDelete() {
Expand All @@ -200,15 +200,15 @@ function handleEdit(item: Api.SystemManage.Menu) {
operateType.value = 'edit';
editingData.value = { ...item };
openDrawer();
openModal();
}
function handleAddChildMenu(item: Api.SystemManage.Menu) {
operateType.value = 'addChild';
editingData.value = { ...item };
openDrawer();
openModal();
}
const allPages = ref<string[]>([]);
Expand Down Expand Up @@ -252,8 +252,8 @@ init();
:pagination="pagination"
class="sm:h-full"
/>
<MenuOperateDrawer
v-model:visible="drawerVisible"
<MenuOperateModal
v-model:visible="visible"
:operate-type="operateType"
:row-data="editingData"
:all-pages="allPages"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
} from './shared';
defineOptions({
name: 'MenuOperateDrawer'
name: 'MenuOperateModal'
});
export type OperateType = NaiveUI.TableOperateType | 'addChild';
Expand Down

0 comments on commit 003e145

Please sign in to comment.