Commit 13768ad9a64183c32ca5a838a0526adf91dbe599
1 parent
0864e104
fix: device detail model of matter unit render error
Showing
1 changed file
with
3 additions
and
3 deletions
... | ... | @@ -89,6 +89,7 @@ |
89 | 89 | ); |
90 | 90 | await nextTick(); |
91 | 91 | socketInfo.dataSource = data; |
92 | + | |
92 | 93 | setTableData(data); |
93 | 94 | } catch (error) {} |
94 | 95 | }, |
... | ... | @@ -127,10 +128,9 @@ |
127 | 128 | const getUnit = (record: StructJSON) => { |
128 | 129 | const { dataType } = record; |
129 | 130 | const { specs } = dataType! || {}; |
130 | - | |
131 | 131 | return isObject(specs) |
132 | 132 | ? (specs as Specs).unitName && (specs as Specs).unit |
133 | - ? `${(specs as Specs).unitName}/${(specs as Specs).unit}` | |
133 | + ? `${(specs as Specs).unitName}` | |
134 | 134 | : '' |
135 | 135 | : ''; |
136 | 136 | }; |
... | ... | @@ -231,7 +231,7 @@ |
231 | 231 | <section class="min-h-16 flex flex-col justify-between"> |
232 | 232 | <div class="flex font-bold text-lg mb-4 gap-2"> |
233 | 233 | <div>{{ item.value || '--' }}</div> |
234 | - <div>{{ item.unit }}</div> | |
234 | + <div class="text-xs flex items-center">{{ item.unit }}</div> | |
235 | 235 | </div> |
236 | 236 | <div class="text-dark-800 text-xs"> |
237 | 237 | {{ item.value ? formatToDateTime(item.time, 'YYYY-MM-DD HH:mm:ss') : '--' }} | ... | ... |