Element-ui2 form select display problem

when editing user information, how the element-ui2 form displays the previous company name (item.Name) of the user in the select selection box is normal in option, but opening the edit page selection box does not display the previous data.

      <el-form-item label="" prop="owner_id">
          <el-select v-model="editForm.owner_id" value-key="label" style="width: 100%;">
          <el-option v-for="item in customers" :key="item.Id" v-bind:label="item.Name" v-bind:value="item.Id"></el-option>
          </el-select>
      </el-form-item>

Mar.03,2021

send your more complete code to see


element-ui2 has not been used, but if you want to set a default value, you can add selected attribute to option .


is my own problem. EditForm.owner_id did not get the correct value in the background, and the default value of select is to display the value in v-model.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b361ce-2b834.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b361ce-2b834.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?