Merge remote-tracking branch 'origin/dev' into dev

pull/104/head
李强 2023-08-21 14:28:36 +08:00
commit b45387e6a2
1 changed files with 22 additions and 22 deletions

View File

@ -203,25 +203,25 @@ export default {
deep: true,
immediate: true
},
currentValue (newValue, oldVal) {
const { tableConfig } = this._elProps
const { value } = this.dict
if (newValue) {
if (!tableConfig.multiple) {
if (newValue[0]) {
this.$emit('input', newValue[0][value])
this.$emit('change', newValue[0][value])
}
} else {
console.log(newValue)
const result = newValue.map((item) => {
return item[value]
})
this.$emit('input', result)
this.$emit('change', result)
}
}
}
// currentValue (newValue, oldVal) {
// const { tableConfig } = this._elProps
// const { value } = this.dict
// if (newValue) {
// if (!tableConfig.multiple) {
// if (newValue[0]) {
// this.$emit('input', newValue[0][value])
// this.$emit('change', newValue[0][value])
// }
// } else {
// console.log(newValue)
// const result = newValue.map((item) => {
// return item[value]
// })
// this.$emit('input', result)
// this.$emit('change', result)
// }
// }
// }
},
mounted () {
// currentValue
@ -256,11 +256,11 @@ export default {
if (data.data && data.data.length > 0) {
this.currentValue = data.data
} else {
this.currentValue = null
this.currentValue = []
}
})
} else {
this.currentValue = null
this.currentValue = []
}
},
//