Commit b2cdfde964c3c7fe0fa00c50f133680c31e8745f
Merge branch 'perf/platform' into 'main_dev'
perf: 优化企业信息,当第一次未上传图片时,提示红框消息,选择图片后,更新基本信息成功但是还是显示此提示 See merge request yunteng/thingskit-front!1285
Showing
2 changed files
with
13 additions
and
3 deletions
... | ... | @@ -144,7 +144,7 @@ export const list = [ |
144 | 144 | }, |
145 | 145 | { |
146 | 146 | deviceType: '网关/直连设备', |
147 | - function: '服务端响应共享属性集客户端属性给设备端', | |
147 | + function: '服务端响应共享属性及客户端属性给设备端', | |
148 | 148 | release: 'v1/devices/me/attributes/response/$request_id', |
149 | 149 | subscribe: 'v1/devices/me/attributes/response/+', |
150 | 150 | platform: '发布', | ... | ... |
... | ... | @@ -31,7 +31,7 @@ |
31 | 31 | </template> |
32 | 32 | |
33 | 33 | <script lang="ts"> |
34 | - import { defineComponent, onMounted, ref, computed } from 'vue'; | |
34 | + import { defineComponent, onMounted, ref, computed, watch } from 'vue'; | |
35 | 35 | import { Card } from 'ant-design-vue'; |
36 | 36 | import { BasicForm, useForm } from '/@/components/Form/index'; |
37 | 37 | import { schemas, provSchemas } from '../config/enterPriseInfo.config'; |
... | ... | @@ -73,7 +73,10 @@ |
73 | 73 | loading: false, |
74 | 74 | tip: '拼命加载中...', |
75 | 75 | }); |
76 | - const [registerForm, { getFieldsValue, setFieldsValue, validate, clearValidate }] = useForm({ | |
76 | + const [ | |
77 | + registerForm, | |
78 | + { getFieldsValue, setFieldsValue, validate, clearValidate, validateFields }, | |
79 | + ] = useForm({ | |
77 | 80 | labelWidth: 80, |
78 | 81 | schemas, |
79 | 82 | showResetButton: false, |
... | ... | @@ -101,6 +104,13 @@ |
101 | 104 | const handleSetCodeImgUrl = (d) => { |
102 | 105 | qrcodePic.value = d; |
103 | 106 | }; |
107 | + watch( | |
108 | + () => qrcodePic.value, | |
109 | + (newValue) => { | |
110 | + if (!newValue) validateFields(['qrcode']); | |
111 | + else clearValidate('qrcode'); | |
112 | + } | |
113 | + ); | |
104 | 114 | // 更新 |
105 | 115 | const handleUpdateInfo = async () => { |
106 | 116 | try { | ... | ... |