We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.4.2
https://jsfiddle.net/smpd16g0/
<select v-model="value"> <option v-for="item in options" :value="item.value">{{item.name}}</option> </select>
{ value: null, options: [ {name: '男', value: 1}, {name: '女', value: 2}, {name: '其他', value: 3} ] }
在IOS Safari中点击下拉框,此时默认会选中第一个,随后点击完成按钮,select框没有选择任何数据。
点击完成按钮后,第一项会选中。
点击完成按钮后,未选择任何数据。必须滑动到其他选项再回到第一项才能选中。
The text was updated successfully, but these errors were encountered:
Just met the same thing today!
My workaround was:
<select v-model="value"> <option v-for="item in options" :value="item.value" :disabled="item.disabled"> {{item.name}} </option> </select>
options.unshift({ name: '请选择', value: '', disabled: true }) // options.unshift({ name: 'pick one', value: '', disabled: true })
Sorry, something went wrong.
This is a iOS system issue and we can't do much in Vue core. You have 2 workarounds:
Add a hidden optgroup before options: <optgroup hidden="true" disabled></optgroup>
<optgroup hidden="true" disabled></optgroup>
Make sure to initialize the select with a default value that has a matching option.
No branches or pull requests
Version
2.4.2
Reproduction link
https://jsfiddle.net/smpd16g0/
Steps to reproduce
在IOS Safari中点击下拉框,此时默认会选中第一个,随后点击完成按钮,select框没有选择任何数据。
What is expected?
点击完成按钮后,第一项会选中。
What is actually happening?
点击完成按钮后,未选择任何数据。必须滑动到其他选项再回到第一项才能选中。
The text was updated successfully, but these errors were encountered: