mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-13 19:35:24 +00:00
perf: 优化资产列表控制台报错问题
This commit is contained in:
committed by
Jiangjie.Bai
parent
acfdb04b09
commit
477fd5164e
@@ -43,7 +43,8 @@ export default {
|
||||
},
|
||||
items() {
|
||||
const cellValue = { ...this.cellValue }
|
||||
cellValue['memory'] = (this.cellValue['memory'] / 1 || 0).toFixed(2)
|
||||
const memory = this.cellValue?.memory
|
||||
cellValue['memory'] = memory ? (memory / 1 || 0).toFixed(2) : '-'
|
||||
return cellValue
|
||||
},
|
||||
viewText() {
|
||||
@@ -65,8 +66,8 @@ export default {
|
||||
async optionAndGenFields() {
|
||||
const data = await this.$store.dispatch('common/getUrlMeta', { url: this.url })
|
||||
const remoteMeta = data.actions['GET'] || {}
|
||||
const fieldName = this.formatterArgs.fieldName
|
||||
const remoteMetaFields = remoteMeta[fieldName].children
|
||||
const fieldName = this.formatterArgs?.fieldName || ''
|
||||
const remoteMetaFields = remoteMeta[fieldName]?.children || {}
|
||||
const fields = Object.keys(remoteMetaFields)
|
||||
const info = {}
|
||||
for (const name of fields) {
|
||||
|
||||
Reference in New Issue
Block a user