index.ts
812 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { FormSchema } from '/@/components/Form';
import { useI18n } from '/@/hooks/web/useI18n';
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',
}
const { t } = useI18n();
export const schemas: FormSchema[] = [
{
field: FieldsEnum.IS_SHARE,
label: t('visual.dataview.isShareText'),
component: 'Switch',
defaultValue: false,
},
{
field: FieldsEnum.ACCESS_CREDENTIALS,
label: t('visual.dataview.shareAccess'),
component: 'InputPassword',
ifShow: ({ model }) => model[FieldsEnum.IS_SHARE],
componentProps: {
maxLength: 64,
},
},
];