完善默认值显示

This commit is contained in:
lyswhut
2020-03-07 11:55:31 +08:00
parent f30cb9da59
commit 2a66edd1c5
4 changed files with 7 additions and 7 deletions
@@ -40,8 +40,8 @@ export default {
label() {
if (!this.value) return ''
if (!this.itemName) return this.value
const item = this.list.find(l => l.id == this.value)
if (!item) return this.value
const item = this.list.find(l => l[this.itemKey] == this.value)
if (!item) return ''
return item[this.itemName]
},
},