I intend to make a drop-down menu that can have three values: The first can be ‘Father’ or ‘Mother’ depending on the condition returned by the autoGender(index) method. The second is always ‘Father’. The third is always ‘Mother’
<el-select :value="list['gender'] @change="setGender($event)">
<el-option :value="autoGender(index)">{{autoGender(index)}}</el-option>
<el-option :value="'Father'">Father</el-option>
<el-option :value="'Mother'">Mother</el-option>
</el-select>
I can’t modify the list[‘gender’]. In the setGender method, how can I differentiate the selected option from the drop-down menu? I tried using event.target.key but it doesn’t work. This is using the Element Plus (https://element-plus.org/en-US/component/select.html).