chore: menu
This commit is contained in:
parent
a7aeb5ae63
commit
69b1a133b1
@ -82,7 +82,15 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
slots: {
|
slots: {
|
||||||
default: ({ row }) => {
|
default: ({ row }) => {
|
||||||
const current = menuTypes[row.menuType as 'C' | 'F' | 'M'];
|
const current = menuTypes[row.menuType as 'C' | 'F' | 'M'];
|
||||||
return current as any;
|
if (!current) {
|
||||||
|
return '未知';
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<span class={['flex', 'items-center', 'justify-center']}>
|
||||||
|
{renderIcon(current.icon)}
|
||||||
|
<span style={{ marginLeft: '2px' }}>{current.value}</span>
|
||||||
|
</span>
|
||||||
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -13,6 +13,9 @@ import { columns, querySchema } from './data';
|
|||||||
import menuDrawer from './menu-drawer.vue';
|
import menuDrawer from './menu-drawer.vue';
|
||||||
|
|
||||||
const formOptions: VbenFormProps = {
|
const formOptions: VbenFormProps = {
|
||||||
|
commonConfig: {
|
||||||
|
labelWidth: 80,
|
||||||
|
},
|
||||||
schema: querySchema(),
|
schema: querySchema(),
|
||||||
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
|
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
|
||||||
};
|
};
|
||||||
@ -70,7 +73,7 @@ async function handleEdit(record: Recordable<any>) {
|
|||||||
|
|
||||||
async function handleDelete(row: Recordable<any>) {
|
async function handleDelete(row: Recordable<any>) {
|
||||||
await menuRemove(row.menuId);
|
await menuRemove(row.menuId);
|
||||||
await tableApi.reload();
|
await tableApi.query();
|
||||||
}
|
}
|
||||||
|
|
||||||
function expandAll() {
|
function expandAll() {
|
||||||
@ -133,6 +136,6 @@ function collapseAll() {
|
|||||||
</Space>
|
</Space>
|
||||||
</template>
|
</template>
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
<MenuDrawer @reload="tableApi.reload()" />
|
<MenuDrawer @reload="tableApi.query()" />
|
||||||
</Page>
|
</Page>
|
||||||
</template>
|
</template>
|
||||||
|
@ -38,6 +38,9 @@ import roleAuthModal from './role-auth-modal.vue';
|
|||||||
import roleDrawer from './role-drawer.vue';
|
import roleDrawer from './role-drawer.vue';
|
||||||
|
|
||||||
const formOptions: VbenFormProps = {
|
const formOptions: VbenFormProps = {
|
||||||
|
commonConfig: {
|
||||||
|
labelWidth: 80,
|
||||||
|
},
|
||||||
schema: querySchema(),
|
schema: querySchema(),
|
||||||
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
|
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user