fix(device-tree): color style of station node suffix
This commit is contained in:
@@ -130,7 +130,17 @@ const lineDeviceTreeData = computed<Record<string, TreeOption[]>>(() => {
|
|||||||
label: stationName,
|
label: stationName,
|
||||||
key: stationCode,
|
key: stationCode,
|
||||||
prefix: () => renderStationNodePrefix(station),
|
prefix: () => renderStationNodePrefix(station),
|
||||||
suffix: () => `(${onlineDevices?.length ?? 0}/${offlineDevices?.length ?? 0}/${devices?.length ?? 0})`,
|
suffix: () => {
|
||||||
|
return h('span', null, [
|
||||||
|
'(',
|
||||||
|
h('span', { style: { color: themeVars.value.successColor } }, `${onlineDevices?.length ?? 0}`),
|
||||||
|
'/',
|
||||||
|
h('span', { style: { color: themeVars.value.errorColor } }, `${offlineDevices?.length ?? 0}`),
|
||||||
|
'/',
|
||||||
|
`${devices?.length ?? 0}`,
|
||||||
|
')',
|
||||||
|
]);
|
||||||
|
},
|
||||||
children:
|
children:
|
||||||
lineDevices.value[stationCode]?.[paneName]?.map<TreeOption>((dev) => {
|
lineDevices.value[stationCode]?.[paneName]?.map<TreeOption>((dev) => {
|
||||||
const device = dev as NdmDeviceResultVO;
|
const device = dev as NdmDeviceResultVO;
|
||||||
|
|||||||
Reference in New Issue
Block a user