element [Bug Report] don't understand the logic of el-select

uqcuzwp8  于 2022-12-31  发布在  其他
关注(0)|答案(4)|浏览(182)

Element UI version

2.13.2

OS/Browsers version

Google Chrome Version 85.0.4183.102 (Official Build) (64-bit)

Vue version

2.6.12

https://codepen.io/matamune94/pen/VwaGWJO?editors=1010

Steps to reproduce

create vue and add el-select

What is Expected?

box select show Option 4 not Option 5

What is actually happening?

v-model="value1" have item is { _id: 'Option4', name: 'Option4' } but box select show Option 5

qxgroojn

qxgroojn3#

因为,你绑定的value是_id的值,但是你提供的数组,你应该提供id就可以了,像这样子:

vuktfyat

vuktfyat4#

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

相关问题