Commit c0184cc994521b7a7cbf33692369072157b7a29b
Merge branch 'main_dev' into 'main'
Main dev See merge request yunteng/thingskit-front!1371
Showing
1 changed file
with
12 additions
and
6 deletions
@@ -51,12 +51,18 @@ export const modeForm = (disabled: boolean): FormSchema[] => { | @@ -51,12 +51,18 @@ export const modeForm = (disabled: boolean): FormSchema[] => { | ||
51 | label: '数据源', | 51 | label: '数据源', |
52 | component: 'RadioGroup', | 52 | component: 'RadioGroup', |
53 | defaultValue: DataSourceType.ALL, | 53 | defaultValue: DataSourceType.ALL, |
54 | - componentProps: { | ||
55 | - options: [ | ||
56 | - { label: '全部', value: DataSourceType.ALL }, | ||
57 | - { label: '产品', value: DataSourceType.PRODUCT }, | ||
58 | - { label: '设备', value: DataSourceType.DEVICE }, | ||
59 | - ], | 54 | + componentProps: ({ formModel }) => { |
55 | + return { | ||
56 | + options: [ | ||
57 | + { label: '全部', value: DataSourceType.ALL }, | ||
58 | + { label: '产品', value: DataSourceType.PRODUCT }, | ||
59 | + { label: '设备', value: DataSourceType.DEVICE }, | ||
60 | + ], | ||
61 | + onChange() { | ||
62 | + formModel[BasicInfoFormField.DATA_SOURCE_PRODUCT] = null; | ||
63 | + formModel[BasicInfoFormField.DATA_SOURCE_DEVICE] = null; | ||
64 | + }, | ||
65 | + }; | ||
60 | }, | 66 | }, |
61 | }, | 67 | }, |
62 | { | 68 | { |