fix: 【设备管理-运行状态】修复界面卡死无法点击
This commit is contained in:
parent
5b76b078d2
commit
10f77f296b
|
@ -90,7 +90,7 @@ watchEffect(() => {
|
|||
if (events.data?.valueType?.type === 'object') {
|
||||
const eventProperties = cloneDeep(events.data.valueType?.properties || [])
|
||||
eventProperties.reverse().map((i: any) => {
|
||||
if (i.valueType?.type === 'object') {
|
||||
if (['object', 'array'].includes(i.valueType?.type)) {
|
||||
objectKey.value.push({
|
||||
key: i.id,
|
||||
dataIndex: `${i.id}_format`
|
||||
|
@ -100,19 +100,35 @@ watchEffect(() => {
|
|||
title: i.name,
|
||||
dataIndex: `${i.id}_format`,
|
||||
search: {
|
||||
type: i?.valueType?.type || 'string',
|
||||
type: 'string',
|
||||
rename: i.id,
|
||||
},
|
||||
scopedSlots: true,
|
||||
});
|
||||
} else {
|
||||
const arr = i?.valueType?.type === 'boolean' ? [
|
||||
{
|
||||
label: i?.valueType.falseText,
|
||||
value: i?.valueType.falseValue
|
||||
},
|
||||
{
|
||||
label: i?.valueType.trueText,
|
||||
value: i?.valueType.trueValue
|
||||
},
|
||||
] : (i?.valueType?.elements || []).map(item => {
|
||||
return {
|
||||
label: item.text,
|
||||
value: item.value
|
||||
}
|
||||
})
|
||||
columns.value.splice(0, 0, {
|
||||
key: i.id,
|
||||
title: i.name,
|
||||
dataIndex: `${i.id}_format`,
|
||||
search: {
|
||||
type: i?.valueType?.type || 'string',
|
||||
type: componentsType?.[i?.valueType?.type] || 'string',
|
||||
rename: i.id,
|
||||
options: arr
|
||||
},
|
||||
ellipsis: true,
|
||||
scopedSlots: true,
|
||||
|
|
Loading…
Reference in New Issue