fix(relationCard): 修改关系卡片的bug

原来数据是从 options 中过滤获取的, 当搜索结束后就无法在获取到,所以改成从select中获取选中的
This commit is contained in:
ibuler
2020-07-07 19:08:30 +08:00
parent 37cce2effd
commit 0ef5852fd8

View File

@@ -220,7 +220,7 @@ export default {
)
},
addObjects() {
const objects = this.$refs.select2.getOptionsByValues(this.select2.value)
const objects = this.$refs.select2.$refs.select.selected.map(item => ({ label: item.label, value: item.value }))
if (objects.length === 0) {
return
}