mirror of
https://github.com/veops/cmdb.git
synced 2025-08-26 01:08:18 +08:00
fix(ui): CI - ci detail title display
This commit is contained in:
@@ -23,15 +23,25 @@ export default {
|
|||||||
default: () => []
|
default: () => []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
icon: '',
|
||||||
|
title: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
findCIType() {
|
findCIType() {
|
||||||
return this.ci_types?.find?.((item) => item?.id === this.ci?._type)
|
return this.ci_types?.find?.((item) => item?.id === this.ci?._type) || {}
|
||||||
},
|
}
|
||||||
icon() {
|
},
|
||||||
return this?.findCiType?.icon || ''
|
watch: {
|
||||||
},
|
findCIType: {
|
||||||
title() {
|
deep: true,
|
||||||
return this?.ci?.[this.findCIType?.show_name] || this?.ci?.[this.findCIType?.unique_key] || ''
|
immediate: true,
|
||||||
|
handler(val) {
|
||||||
|
this.icon = val?.icon || ''
|
||||||
|
this.title = this?.ci?.[val?.show_name] || this?.ci?.[val?.unique_key] || ''
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user