refactor(projects): menu-operate-drawer => menu-operate-modal
This commit is contained in:
parent
c4b5c65625
commit
003e145e77
@ -10,11 +10,11 @@ import { $t } from '@/locales';
|
|||||||
import { yesOrNoRecord } from '@/constants/common';
|
import { yesOrNoRecord } from '@/constants/common';
|
||||||
import { enableStatusRecord, menuTypeRecord } from '@/constants/business';
|
import { enableStatusRecord, menuTypeRecord } from '@/constants/business';
|
||||||
import SvgIcon from '@/components/custom/svg-icon.vue';
|
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 appStore = useAppStore();
|
||||||
|
|
||||||
const { bool: drawerVisible, setTrue: openDrawer, setFalse: _closeDrawer } = useBoolean();
|
const { bool: visible, setTrue: openModal } = useBoolean();
|
||||||
|
|
||||||
const wrapperRef = ref<HTMLElement | null>(null);
|
const wrapperRef = ref<HTMLElement | null>(null);
|
||||||
|
|
||||||
@ -176,7 +176,7 @@ const operateType = ref<OperateType>('add');
|
|||||||
|
|
||||||
function handleAdd() {
|
function handleAdd() {
|
||||||
operateType.value = 'add';
|
operateType.value = 'add';
|
||||||
openDrawer();
|
openModal();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleBatchDelete() {
|
async function handleBatchDelete() {
|
||||||
@ -200,7 +200,7 @@ function handleEdit(item: Api.SystemManage.Menu) {
|
|||||||
operateType.value = 'edit';
|
operateType.value = 'edit';
|
||||||
editingData.value = { ...item };
|
editingData.value = { ...item };
|
||||||
|
|
||||||
openDrawer();
|
openModal();
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleAddChildMenu(item: Api.SystemManage.Menu) {
|
function handleAddChildMenu(item: Api.SystemManage.Menu) {
|
||||||
@ -208,7 +208,7 @@ function handleAddChildMenu(item: Api.SystemManage.Menu) {
|
|||||||
|
|
||||||
editingData.value = { ...item };
|
editingData.value = { ...item };
|
||||||
|
|
||||||
openDrawer();
|
openModal();
|
||||||
}
|
}
|
||||||
|
|
||||||
const allPages = ref<string[]>([]);
|
const allPages = ref<string[]>([]);
|
||||||
@ -252,8 +252,8 @@ init();
|
|||||||
:pagination="pagination"
|
:pagination="pagination"
|
||||||
class="sm:h-full"
|
class="sm:h-full"
|
||||||
/>
|
/>
|
||||||
<MenuOperateDrawer
|
<MenuOperateModal
|
||||||
v-model:visible="drawerVisible"
|
v-model:visible="visible"
|
||||||
:operate-type="operateType"
|
:operate-type="operateType"
|
||||||
:row-data="editingData"
|
:row-data="editingData"
|
||||||
:all-pages="allPages"
|
:all-pages="allPages"
|
||||||
|
@ -16,7 +16,7 @@ import {
|
|||||||
} from './shared';
|
} from './shared';
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'MenuOperateDrawer'
|
name: 'MenuOperateModal'
|
||||||
});
|
});
|
||||||
|
|
||||||
export type OperateType = NaiveUI.TableOperateType | 'addChild';
|
export type OperateType = NaiveUI.TableOperateType | 'addChild';
|
Loading…
Reference in New Issue
Block a user