ElemeFE / ElemeFE/element

[Bug Report] when el-select is binded with a object, the attributes of allow-create and multiple do not work for can not binding data and object, even though configing value-key

Open
#21,107 0 comments 0 reactions 0 assignees View on GitHub
component: select type: bug
Dominant language
Vue
Stars
54k
Forks
14.4k
PR merge metrics
No merged PRs in 30d

Description

### Element UI version
2.13.2

### OS/Browsers version
4.4.0-18362-Microsoft #1049-Microsoft Thu Aug 14 12:01:00 PST 2020 x86_64 GNU/Linux, Chrome 91.0.4472.114

### Vue version
2.6.10

### Reproduction Link
https://codepen.io/0xtuhao/pen/poPoKPp

### Steps to reproduce
when el-select is binded with a object, can not bind object success eventually with empty array.

Vue file:
```






export default {
name: 'Myselect',
props: {
selectData: {
type: Array,
// default: () => [],
required: true
},
selectName: {
type: Number,
required: true
}
},
data() {
return {
newselect: [],
value: '',
input: ''
}
},
methods: {
change(data) {
this.$emit('selectChange', data, this.selectName)
},
selecting(obj) {
// console.log(obj, this.$refs.selectId, this.newselect, this.input, this.selectName)
this.$emit('selectChange', this.newselect, this.input, this.selectName)
},
changeTextarea(value, name) {
const data = this.selectData.concat([])[name]
// data.value = value
// this.radioData.textValue = value
this.$emit('selectChange', data, value, this.selectName)
}
}
}

```

### What is Expected?
bind object success, get `selectValue: [19,20]`

### What is actually happening?
bind object fail, get `selectValue: []`
![image](https://user-images.githubusercontent.com/10894348/123744193-fcc56180-d8e0-11eb-942a-fbcbf19e88f7.png)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.