目前在这个vue组件中有2v-combobox,但是其中一个工作正常,但是第二个没有工作。
CreateProd.vue:
<Template>
<v-app>
<v-row>
<v-col cols="6">
<v-combobox :items="items"></v-combobox>
</v-col>
</v-row>
<v-row>
<v-col cols="6">
<v-combobox :operatingSystem="operatingSystem"></v-combobox>
</v-col>
</v-row>
</v-app>
</Template>
<script>
export default {
data() {
return {
items: [
'Mobiles & Tablets > Smartphones',
'Mobiles & Tablets > Tablets',
'Mobiles & Tablets > Landline Phones',
'Mobiles & Tablets > Feature Phones'
],
operatingSystem: [
'Windows',
'Linux',
'Windows XP Professional'
],
}
},
}
</script>问题是,当我单击第二个组合框时,它不会列出在operatingSystems中创建的项目。请帮忙,谢谢。
发布于 2020-03-31 11:27:13
您在第二个组合框中使用了错误的道具。它应该是:operatingSystem.:条目,而不是
WRONG
<v-combobox :operatingSystem="operatingSystem"></v-combobox>RIGHT
<v-combobox :items="operatingSystem"></v-combobox>https://stackoverflow.com/questions/60943574
复制相似问题