mirror of
https://github.com/jumpserver/lina.git
synced 2025-07-31 22:55:01 +00:00
perf: 优化资产、网关列表页面显示 labels 信息不全的问题
This commit is contained in:
parent
c4ad25bfe3
commit
1fdcf9ff75
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-tag
|
||||
v-for="tag of cellValue"
|
||||
v-for="tag of iTags"
|
||||
:key="tag"
|
||||
:type="getTagType(tag)"
|
||||
class="tag-formatter"
|
||||
@ -24,6 +24,9 @@ export default {
|
||||
return {
|
||||
getTagType(tag) {
|
||||
return 'primary'
|
||||
},
|
||||
getTags(cellValue) {
|
||||
return cellValue
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -34,6 +37,11 @@ export default {
|
||||
formatterArgs: Object.assign(this.formatterArgsDefault, this.col.formatterArgs)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
iTags() {
|
||||
return this.formatterArgs.getTags(this.cellValue)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getTagType(tag) {
|
||||
return this.formatterArgs.getTagType(tag)
|
||||
|
@ -164,8 +164,13 @@ export default {
|
||||
}
|
||||
},
|
||||
connectivity: connectivityMeta,
|
||||
labels_display: {
|
||||
formatter: TagsFormatter
|
||||
labels: {
|
||||
formatter: TagsFormatter,
|
||||
formatterArgs: {
|
||||
getTags(cellValue) {
|
||||
return cellValue.map(item => `${item.name}:${item.value}`)
|
||||
}
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
formatter: ActionsFormatter,
|
||||
|
@ -78,8 +78,13 @@ export default {
|
||||
nodes_display: {
|
||||
formatter: ArrayFormatter
|
||||
},
|
||||
labels_display: {
|
||||
formatter: TagsFormatter
|
||||
labels: {
|
||||
formatter: TagsFormatter,
|
||||
formatterArgs: {
|
||||
getTags(cellValue) {
|
||||
return cellValue.map(item => `${item.name}:${item.value}`)
|
||||
}
|
||||
}
|
||||
},
|
||||
connectivity: connectivityMeta,
|
||||
actions: {
|
||||
|
Loading…
Reference in New Issue
Block a user