feat: search form
This commit is contained in:
@@ -7,12 +7,13 @@ import { onMounted, ref } from 'vue';
|
||||
|
||||
import { Page, useVbenModal } from '@vben/common-ui';
|
||||
|
||||
import { Space, Table } from 'ant-design-vue';
|
||||
import { Card, Space, Table } from 'ant-design-vue';
|
||||
|
||||
import { useVbenForm } from '#/adapter';
|
||||
import { loginInfoClean, loginInfoList } from '#/api/monitor/logininfo';
|
||||
import { confirmDeleteModal } from '#/utils/modal';
|
||||
|
||||
import { columns } from './data';
|
||||
import { columns, querySchema } from './data';
|
||||
import loginInfoModal from './login-info-modal.vue';
|
||||
|
||||
const [LoginInfoModal, modalApi] = useVbenModal({
|
||||
@@ -39,10 +40,32 @@ function handleClear() {
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
const [QueryForm] = useVbenForm({
|
||||
// 默认展开
|
||||
collapsed: false,
|
||||
// 所有表单项共用,可单独在表单内覆盖
|
||||
commonConfig: {
|
||||
// 所有表单项
|
||||
componentProps: {
|
||||
class: 'w-full',
|
||||
},
|
||||
},
|
||||
schema: querySchema(),
|
||||
// 是否可展开
|
||||
showCollapseButton: true,
|
||||
submitButtonOptions: {
|
||||
text: '查询',
|
||||
},
|
||||
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Page content-class="flex flex-col gap-[6px]">
|
||||
<Card>
|
||||
<QueryForm />
|
||||
</Card>
|
||||
<div class="flex justify-end">
|
||||
<a-button @click="handleClear">{{ $t('pages.common.clear') }}</a-button>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user