feat: 通知公告(表单)
This commit is contained in:
60
apps/web-antd/src/views/system/notice/data.ts
Normal file
60
apps/web-antd/src/views/system/notice/data.ts
Normal file
@@ -0,0 +1,60 @@
|
||||
import type { FormSchemaGetter } from '#/adapter';
|
||||
|
||||
import { DictEnum } from '@vben/constants';
|
||||
|
||||
import { getDictOptions } from '#/utils/dict';
|
||||
|
||||
export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
component: 'Input',
|
||||
dependencies: {
|
||||
show: () => false,
|
||||
triggerFields: [''],
|
||||
},
|
||||
fieldName: 'noticeId',
|
||||
label: '主键',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
placeholder: '请输入',
|
||||
},
|
||||
fieldName: 'noticeTitle',
|
||||
formItemClass: 'col-span-2',
|
||||
label: '公告标题',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
component: 'RadioGroup',
|
||||
componentProps: {
|
||||
buttonStyle: 'solid',
|
||||
class: 'grid-cols-2',
|
||||
options: getDictOptions(DictEnum.SYS_NOTICE_STATUS),
|
||||
optionType: 'button',
|
||||
},
|
||||
defaultValue: '0',
|
||||
fieldName: 'status',
|
||||
label: '公告状态',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
component: 'RadioGroup',
|
||||
componentProps: {
|
||||
buttonStyle: 'solid',
|
||||
class: 'grid-cols-2',
|
||||
options: getDictOptions(DictEnum.SYS_NOTICE_TYPE),
|
||||
optionType: 'button',
|
||||
},
|
||||
defaultValue: '1',
|
||||
fieldName: 'noticeType',
|
||||
label: '公告类型',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'noticeContent',
|
||||
formItemClass: 'col-span-2',
|
||||
label: '公告内容',
|
||||
rules: 'required',
|
||||
},
|
||||
];
|
Reference in New Issue
Block a user