Showing
3 changed files
with
7 additions
and
4 deletions
@@ -79,7 +79,7 @@ | @@ -79,7 +79,7 @@ | ||
79 | @click="goDeviceProfile(record.deviceProfile.name)" | 79 | @click="goDeviceProfile(record.deviceProfile.name)" |
80 | style="white-space: normal; height: auto" | 80 | style="white-space: normal; height: auto" |
81 | > | 81 | > |
82 | - {{ record.deviceProfile.name }} | 82 | + <span style="color: #377dff">{{ record.deviceProfile.name }}</span> |
83 | </CheckableTag> | 83 | </CheckableTag> |
84 | </template> | 84 | </template> |
85 | 85 |
@@ -7,6 +7,7 @@ export const tcpSchemas: FormSchema[] = [ | @@ -7,6 +7,7 @@ export const tcpSchemas: FormSchema[] = [ | ||
7 | component: 'Input', | 7 | component: 'Input', |
8 | slot: 'upScriptId', | 8 | slot: 'upScriptId', |
9 | colProps: { span: 24 }, | 9 | colProps: { span: 24 }, |
10 | + required: true, | ||
10 | }, | 11 | }, |
11 | { | 12 | { |
12 | field: 'authScriptId', | 13 | field: 'authScriptId', |
@@ -14,6 +15,7 @@ export const tcpSchemas: FormSchema[] = [ | @@ -14,6 +15,7 @@ export const tcpSchemas: FormSchema[] = [ | ||
14 | component: 'Input', | 15 | component: 'Input', |
15 | slot: 'authScriptId', | 16 | slot: 'authScriptId', |
16 | colProps: { span: 24 }, | 17 | colProps: { span: 24 }, |
18 | + required: true, | ||
17 | }, | 19 | }, |
18 | ]; | 20 | ]; |
19 | 21 |
@@ -111,7 +111,7 @@ | @@ -111,7 +111,7 @@ | ||
111 | } | 111 | } |
112 | }; | 112 | }; |
113 | 113 | ||
114 | - const [register, { getFieldsValue, resetFields, setFieldsValue }] = useForm({ | 114 | + const [register, { validate, resetFields, setFieldsValue }] = useForm({ |
115 | labelWidth: 180, | 115 | labelWidth: 180, |
116 | schemas: tcpSchemas, | 116 | schemas: tcpSchemas, |
117 | actionColOptions: { | 117 | actionColOptions: { |
@@ -171,8 +171,9 @@ | @@ -171,8 +171,9 @@ | ||
171 | } | 171 | } |
172 | }; | 172 | }; |
173 | 173 | ||
174 | - const getFormData = () => { | ||
175 | - const values = getFieldsValue(); | 174 | + const getFormData = async () => { |
175 | + const values = await validate(); | ||
176 | + if (!values) return; | ||
176 | return { | 177 | return { |
177 | ...values, | 178 | ...values, |
178 | type: 'TCP', | 179 | type: 'TCP', |