share.ts
510 Bytes
import { FormSchema } from '/@/components/Form';
export enum FieldsEnum {
IS_SHARE = 'isShare',
ACCESS_CREDENTIALS = 'accessCredentials',
}
export const schemas: FormSchema[] = [
{
field: FieldsEnum.IS_SHARE,
label: '公开性',
component: 'Switch',
defaultValue: false,
},
{
field: FieldsEnum.ACCESS_CREDENTIALS,
label: '访问凭证',
component: 'Input',
ifShow: ({ model }) => model[FieldsEnum.IS_SHARE],
componentProps: {
maxLength: 64,
},
},
];