index.ts
699 Bytes
import { FormSchema } from '/@/components/Form';
export enum ViewTypeEnum {
PRIVATE_VIEW = 'PRIVATE_VIEW',
PUBLIC_VIEW = 'PUBLIC_VIEW',
}
export enum ViewTypeNameEnum {
PRIVATE_VIEW = '私有',
PUBLIC_VIEW = '公共',
}
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: 'InputPassword',
ifShow: ({ model }) => model[FieldsEnum.IS_SHARE],
componentProps: {
maxLength: 64,
},
},
];