Commit 718f72118a5bd562e89496bdcf6339d74c9d1985
Merge branch 'local_devbranch_byft' into 'main_dev'
fix: DEFECT-1768 新增租户后的产品界面置底和查询出来的界面也置底显示,图二为正常显示 See merge request yunteng/thingskit-front!1018
Showing
4 changed files
with
35 additions
and
17 deletions
... | ... | @@ -168,17 +168,27 @@ |
168 | 168 | const devicePic = ref(''); |
169 | 169 | const loading = ref(false); |
170 | 170 | |
171 | - const [register, { validate, resetFields, setFieldsValue, getFieldsValue, updateSchema }] = | |
172 | - useForm({ | |
173 | - labelWidth: 140, | |
174 | - schemas: step1Schemas, | |
175 | - actionColOptions: { | |
176 | - span: 14, | |
177 | - }, | |
178 | - labelAlign: 'right', | |
179 | - showResetButton: false, | |
180 | - showSubmitButton: false, | |
181 | - }); | |
171 | + const [ | |
172 | + register, | |
173 | + { | |
174 | + validate, | |
175 | + resetFields, | |
176 | + setFieldsValue, | |
177 | + getFieldsValue, | |
178 | + updateSchema, | |
179 | + clearValidate, | |
180 | + validateFields, | |
181 | + }, | |
182 | + ] = useForm({ | |
183 | + labelWidth: 140, | |
184 | + schemas: step1Schemas, | |
185 | + actionColOptions: { | |
186 | + span: 14, | |
187 | + }, | |
188 | + labelAlign: 'right', | |
189 | + showResetButton: false, | |
190 | + showSubmitButton: false, | |
191 | + }); | |
182 | 192 | async function nextStep() { |
183 | 193 | try { |
184 | 194 | let values = await validate(); |
... | ... | @@ -447,11 +457,11 @@ |
447 | 457 | }); |
448 | 458 | } |
449 | 459 | |
450 | - const handleTreeOrg = () => { | |
451 | - // const clearGatewayId = { | |
452 | - // gatewayId: '', | |
453 | - // }; | |
454 | - // setFieldsValue(clearGatewayId); | |
460 | + const handleTreeOrg = (option: string) => { | |
461 | + if (option) clearValidate('organizationId'); | |
462 | + else { | |
463 | + validateFields(['organizationId']); | |
464 | + } | |
455 | 465 | }; |
456 | 466 | |
457 | 467 | return { | ... | ... |