Commit b4a0875b7ee40c66bba7bbc3f1f39969fd138ef8
1 parent
3d22d6a6
fix: DEFECT-1625 新增模版,邮件配置再禁用情况下,模板应该是无法选择该禁用的配置的
Showing
1 changed file
with
19 additions
and
16 deletions
... | ... | @@ -159,22 +159,25 @@ export const formSchema: FormSchema[] = [ |
159 | 159 | label: '配置名称', |
160 | 160 | required: true, |
161 | 161 | component: 'ApiSelect', |
162 | - componentProps: { | |
163 | - api: async (params: Recordable) => { | |
164 | - try { | |
165 | - const record = await findMessageConfig(params); | |
166 | - return record.filter((item) => item.status === 1); | |
167 | - } catch (error) { | |
168 | - console.log(error); | |
169 | - return []; | |
170 | - } | |
171 | - }, | |
172 | - params: { | |
173 | - messageType: ({ values }) => Reflect.get(values, 'messageType'), | |
174 | - }, | |
175 | - immediate: true, | |
176 | - labelField: 'configName', | |
177 | - valueField: 'id', | |
162 | + componentProps: () => { | |
163 | + return { | |
164 | + api: async (params: Recordable) => { | |
165 | + try { | |
166 | + const record = await findMessageConfig(params); | |
167 | + return record.filter((item) => item.status === 1); | |
168 | + } catch (error) { | |
169 | + console.log(error); | |
170 | + return []; | |
171 | + } | |
172 | + }, | |
173 | + params: { | |
174 | + messageType: ({ values }) => Reflect.get(values, 'messageType'), | |
175 | + }, | |
176 | + immediate: true, | |
177 | + labelField: 'configName', | |
178 | + valueField: 'id', | |
179 | + getPopupContainer: () => document.body, | |
180 | + }; | |
178 | 181 | }, |
179 | 182 | }, |
180 | 183 | { | ... | ... |