Commit 942a415a35e165495ffb7a90ea826f9dc849744b
Merge branch 'perf/deviceaccess-add-copy' into 'main_dev'
perf: 修复设备接入信息详情和添加信息详情复制功能 See merge request yunteng/thingskit-front!1242
Showing
3 changed files
with
113 additions
and
2 deletions
1 | <template> | 1 | <template> |
2 | - <BasicDrawer v-bind="$attrs" @register="registerDrawer" title="设备接入信息详情" width="25%"> | 2 | + <BasicDrawer |
3 | + v-bind="$attrs" | ||
4 | + @register="registerDrawer" | ||
5 | + title="设备接入信息详情" | ||
6 | + width="25%" | ||
7 | + destroy-on-close | ||
8 | + > | ||
3 | <Description :column="3" size="middle" @register="registeDesc" /> | 9 | <Description :column="3" size="middle" @register="registeDesc" /> |
4 | </BasicDrawer> | 10 | </BasicDrawer> |
5 | </template> | 11 | </template> |
1 | +import { h } from 'vue'; | ||
2 | +import { handeleCopy } from '../profiles/step/topic'; | ||
1 | import { DescItem } from '/@/components/Description/src/typing'; | 3 | import { DescItem } from '/@/components/Description/src/typing'; |
2 | import { BasicColumn, FormSchema } from '/@/components/Table'; | 4 | import { BasicColumn, FormSchema } from '/@/components/Table'; |
3 | 5 | ||
@@ -178,33 +180,137 @@ export const detailSchema: DescItem[] = [ | @@ -178,33 +180,137 @@ export const detailSchema: DescItem[] = [ | ||
178 | { | 180 | { |
179 | field: 'intranetIp', | 181 | field: 'intranetIp', |
180 | label: '内网ip', | 182 | label: '内网ip', |
183 | + render: (text) => { | ||
184 | + return h( | ||
185 | + 'span', | ||
186 | + | ||
187 | + { | ||
188 | + style: { cursor: 'pointer' }, | ||
189 | + onClick: () => { | ||
190 | + handeleCopy(text); | ||
191 | + }, | ||
192 | + }, | ||
193 | + text | ||
194 | + ); | ||
195 | + }, | ||
181 | }, | 196 | }, |
182 | { | 197 | { |
183 | field: 'intranetPort', | 198 | field: 'intranetPort', |
184 | label: '内网端口', | 199 | label: '内网端口', |
200 | + render: (text) => { | ||
201 | + return h( | ||
202 | + 'span', | ||
203 | + | ||
204 | + { | ||
205 | + style: { cursor: 'pointer' }, | ||
206 | + onClick: () => { | ||
207 | + handeleCopy(text); | ||
208 | + }, | ||
209 | + }, | ||
210 | + text | ||
211 | + ); | ||
212 | + }, | ||
185 | }, | 213 | }, |
186 | { | 214 | { |
187 | field: 'outerNetIp', | 215 | field: 'outerNetIp', |
188 | label: '外网ip', | 216 | label: '外网ip', |
217 | + render: (text) => { | ||
218 | + return h( | ||
219 | + 'span', | ||
220 | + | ||
221 | + { | ||
222 | + style: { cursor: 'pointer' }, | ||
223 | + onClick: () => { | ||
224 | + handeleCopy(text); | ||
225 | + }, | ||
226 | + }, | ||
227 | + text | ||
228 | + ); | ||
229 | + }, | ||
189 | }, | 230 | }, |
190 | { | 231 | { |
191 | field: 'outerNetPort', | 232 | field: 'outerNetPort', |
192 | label: '外网端口', | 233 | label: '外网端口', |
234 | + render: (text) => { | ||
235 | + return h( | ||
236 | + 'span', | ||
237 | + | ||
238 | + { | ||
239 | + style: { cursor: 'pointer' }, | ||
240 | + onClick: () => { | ||
241 | + handeleCopy(text); | ||
242 | + }, | ||
243 | + }, | ||
244 | + text | ||
245 | + ); | ||
246 | + }, | ||
193 | }, | 247 | }, |
194 | { | 248 | { |
195 | field: 'deviceAgreement', | 249 | field: 'deviceAgreement', |
196 | label: '接入协议', | 250 | label: '接入协议', |
251 | + render: (text) => { | ||
252 | + return h( | ||
253 | + 'span', | ||
254 | + | ||
255 | + { | ||
256 | + style: { cursor: 'pointer' }, | ||
257 | + onClick: () => { | ||
258 | + handeleCopy(text); | ||
259 | + }, | ||
260 | + }, | ||
261 | + text | ||
262 | + ); | ||
263 | + }, | ||
197 | }, | 264 | }, |
198 | { | 265 | { |
199 | field: 'serverId', | 266 | field: 'serverId', |
200 | label: '服务器ID', | 267 | label: '服务器ID', |
268 | + render: (text) => { | ||
269 | + return h( | ||
270 | + 'span', | ||
271 | + | ||
272 | + { | ||
273 | + style: { cursor: 'pointer' }, | ||
274 | + onClick: () => { | ||
275 | + handeleCopy(text); | ||
276 | + }, | ||
277 | + }, | ||
278 | + text | ||
279 | + ); | ||
280 | + }, | ||
201 | }, | 281 | }, |
202 | { | 282 | { |
203 | field: 'serverDomain', | 283 | field: 'serverDomain', |
204 | label: '服务器域', | 284 | label: '服务器域', |
285 | + render: (text) => { | ||
286 | + return h( | ||
287 | + 'span', | ||
288 | + | ||
289 | + { | ||
290 | + style: { cursor: 'pointer' }, | ||
291 | + onClick: () => { | ||
292 | + handeleCopy(text); | ||
293 | + }, | ||
294 | + }, | ||
295 | + text | ||
296 | + ); | ||
297 | + }, | ||
205 | }, | 298 | }, |
206 | { | 299 | { |
207 | field: 'serverPassword', | 300 | field: 'serverPassword', |
208 | label: '密码', | 301 | label: '密码', |
302 | + render: (text) => { | ||
303 | + return h( | ||
304 | + 'span', | ||
305 | + | ||
306 | + { | ||
307 | + style: { cursor: 'pointer' }, | ||
308 | + onClick: () => { | ||
309 | + handeleCopy(text); | ||
310 | + }, | ||
311 | + }, | ||
312 | + text | ||
313 | + ); | ||
314 | + }, | ||
209 | }, | 315 | }, |
210 | ]; | 316 | ]; |