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
vue 版本:2.6.11
以下代码会出错:
<select v-model="selected"> <option v-for="option in options" v-bind:value="option.value"> {{ option.text }} </option> </select>
错误信息:ReferenceError: option is not defined
加一个<template>就可以:
<template>
<select v-model="selected"> <template> <option v-for="option in options" v-bind:value="option.value"> {{ option.text }} </option> </template> </select>
但如果把 v-for 写在 <template> 里,也会出错。 是什么问题?
The text was updated successfully, but these errors were encountered:
这里是文档翻译项目,请到 vuejs/vue 提交 issue 并提供问题复现,谢谢。
Sorry, something went wrong.
No branches or pull requests
vue 版本:2.6.11
以下代码会出错:
错误信息:ReferenceError: option is not defined
加一个
<template>
就可以:但如果把 v-for 写在
<template>
里,也会出错。是什么问题?
The text was updated successfully, but these errors were encountered: