ElemeFE / element

A Vue.js 2.0 UI Toolkit for Web
https://element.eleme.io/
MIT License
54.1k stars 14.64k forks source link

[Bug Report] Wrong El-Select > El-Input value #14393

Open Cople opened 5 years ago

Cople commented 5 years ago

Element UI version

2.5.4

OS/Browsers version

/

Vue version

2.6.6

Reproduction Link

https://jsfiddle.net/gkL60m4p/

Steps to reproduce

<form id="app">
  <el-select v-model="post.status" name="status">
      <el-option v-for="item in list" :key="item.value" :value="item.value" :label="item.label"></el-option>
  </el-select>
</form>
var Main = {
  data() {
    return {
      post: { status: 1 },
      list: [
        { value: 1, label: 'one' },
        { value: 2, label: 'two' },
        { value: 3, label: 'three' },
      ],
    }
  }
}

What is Expected?

document.getElementById('app').status.value === 1

What is actually happening?

document.getElementById('app').status.value === 'one'

ehsanbagherzadegan commented 5 years ago

hi, I have same problem when i post form selected label sent instead of selected value

best regards

utyongu commented 4 years ago

hi.

I am very troubled with the same problem. Are there any plans to fix it?

Thank you.

lordent commented 4 years ago

Problem is still reproducing

Lorti commented 3 years ago

Unfortunately, the problem also persists in Element Plus. https://github.com/element-plus/element-plus/issues/2488