How does elementUi choose select to choose the value? of the value

as follows, how to get the value value selected by select when sending a request?

    <el-form-item>
        <el-select v-model="team[0].value" size="small">
          <el-option v-for="item in team" :label="item.label" :value="item.value">
          </el-option>
        </el-select>
      </el-form-item>
      <el-button size="small" @click="onSubmit"></el-button>
      
      data() {
          return {
            team: [
            {
              value: "allType",
              label: ""
            },
            {
              value: "personage",
              label: ""
            }, {
              value: "group",
              label: ""
            }]
          }
        }    

v-model="selected"
this.selected = team[0].value;
The binding value of

v-model is your value value. Add a selectedValue to the data, and then v code model = "selectedValue" .


it is wrong for v-model to bind team [0] .value. You should add a new field in data (), such as selected, and then vMube model = "selected". If you need to set the default value to team [0] .value, you can write:

directly.
data(){
    return {
        selected: 'allType',
        team: ...
    }
}

if the team is obtained dynamically, you can get the team and then assign it to selected

Menu