所以我看到很多关于这个问题的帖子,但我无法理解为什么我在这里做错了。我有一个放置在组件中的表单。它主要由使用 vuetify 的 TextFields 组成。然后我在其他地方重用这个表格。我尝试了不同的方法,但仍然出现错误,这是我的组件。
<v-window continuous v-model="step">
<v-window-item :value="1">
<v-form>
<v-container>
<v-row>
<v-col
cols="12"
md="4"
>
<v-text-field
label="First name"
required
autocomplete="off"
clearable
v-model="modalFirstNameValue"
></v-text-field>
</v-col>
<v-col
cols="12"
md="4"
>
<v-text-field
label="Last name"
required
autocomplete="off"
clearable
v-model="modalLastNameValue"
></v-text-field>
</v-col>
<v-col
cols="12"
md="4"
>
<v-text-field
label="E-mail"
required
autocomplete="off"
clearable
v-model="modalEmailValue"
></v-text-field>
</v-col>
</v-container>
</v-form>
</v-window-item>
<script>
export default {
props: {
modalFirstNameValue: {
},
modalLastNameValue:{
},
modalEmailValue:{
},
</script>
Run Code Online (Sandbox Code Playgroud)
导入组件
<template>
<div id="app">
<FormModal
v-show="isModalVisible"
@close="closeModal"
modalTitle="Book Appointment Form"
v-bind:modalFirstNameValue="modalFirstNameValue"
v-bind:modalFirstNameLabel="modalFirstNameLabel" …Run Code Online (Sandbox Code Playgroud)