Commit 3a6e541340c1ddfc36b2355b063ba80721f77923
Merge branch 'ft' into 'main_dev'
pref: 优化设备列表别名/设备名称过长显示,和鼠标移入显示 See merge request yunteng/thingskit-front!933
Showing
2 changed files
with
22 additions
and
4 deletions
... | ... | @@ -65,7 +65,7 @@ export const step1Schemas: FormSchema[] = [ |
65 | 65 | label: '别名 ', |
66 | 66 | component: 'Input', |
67 | 67 | componentProps: { |
68 | - maxLength: 255, | |
68 | + maxLength: 32, | |
69 | 69 | placeholder: '请输入别名', |
70 | 70 | }, |
71 | 71 | }, |
... | ... | @@ -73,6 +73,10 @@ export const step1Schemas: FormSchema[] = [ |
73 | 73 | field: 'name', |
74 | 74 | label: '设备名称', |
75 | 75 | component: 'Input', |
76 | + componentProps: { | |
77 | + maxLength: 32, | |
78 | + placeholder: '请输入别名', | |
79 | + }, | |
76 | 80 | rules: [{ required: true, message: '设备名称为必填项' }], |
77 | 81 | slot: 'snCode', |
78 | 82 | }, | ... | ... |
... | ... | @@ -4,7 +4,7 @@ import { FormSchema } from '/@/components/Table'; |
4 | 4 | import { DeviceTypeEnum, DeviceState, DeviceRecord } from '/@/api/device/model/deviceModel'; |
5 | 5 | import { deviceProfile } from '/@/api/device/deviceManager'; |
6 | 6 | import { h } from 'vue'; |
7 | -import { Tag } from 'ant-design-vue'; | |
7 | +import { Tag, Tooltip } from 'ant-design-vue'; | |
8 | 8 | import { handeleCopy } from '../../profiles/step/topic'; |
9 | 9 | |
10 | 10 | // 表格列数据 |
... | ... | @@ -34,7 +34,14 @@ export const columns: BasicColumn[] = [ |
34 | 34 | { |
35 | 35 | class: 'cursor-pointer truncate', |
36 | 36 | }, |
37 | - `${record.alias}` | |
37 | + h( | |
38 | + Tooltip, | |
39 | + { | |
40 | + placement: 'topLeft', | |
41 | + title: `${record.alias}`, | |
42 | + }, | |
43 | + `${record.alias}` | |
44 | + ) | |
38 | 45 | ), |
39 | 46 | h( |
40 | 47 | 'div', |
... | ... | @@ -44,7 +51,14 @@ export const columns: BasicColumn[] = [ |
44 | 51 | handeleCopy(`${record.name}`); |
45 | 52 | }, |
46 | 53 | }, |
47 | - `${record.name}` | |
54 | + h( | |
55 | + Tooltip, | |
56 | + { | |
57 | + placement: 'topLeft', | |
58 | + title: `${record.name}`, | |
59 | + }, | |
60 | + `${record.name}` | |
61 | + ) | |
48 | 62 | ), |
49 | 63 | ]); |
50 | 64 | }, | ... | ... |