当我更改选项时,我正在尝试在电子邮件输入中进行后缀更改。这是我的代码的不同部分:
<q-field
icon="work"
label="Institution"
:label-width="3"
>
<q-option-group
type="radio"
v-model="institution"
@change="changeInstitution"
:options="[
{label: 'Institution 1', value: 'I1', suffix: '@institution1.fr'},
{label: 'Institution 2', value: 'I2', suffix: '@institution2.fr'}
]"
/>
</q-field>
<q-field
icon="email"
label="Adresse courriel"
:label-width="3"
>
<q-input v-model="email" type="email" suffix="" />
</q-field>
我也有这些行:
<script>
export default {
methods: {
changeInstitution () {
console.log('Change institution')
}
},
data () {
return {
institution: '',
email: ''
}
}
}
</script>
问题是当我更改“机构”选项时,我没有预期的日志(“更改机构”)。相反,我有这个:
[Vue warn]: Missing required prop: "value"
found in
---> <QInput>
<QField>
<QTabPane>
<QTabs>
<QModal>
<QDialog>
<Testlogin> at src/components/views/testlogin.vue
<QToolbar>
<QLayoutHeader>
<QLayout>
<LayoutDefault> at src/layouts/default.vue
<Root>
谁能给我一个提示?我查看了文档(http://quasar-framework.org/components/option-group.html#Installation),但无济于事......
提前致谢。