###問題点
私はVueの入力された値を取得したいと思っていますが、
取得ができていません。
v-forで回した後にその各、値を取得するためにはどのようにすれば良いでしょうか。
v-modelで取得しようと思って調べていますが間違っていますでしょうか。
大まかなところは消しています。
Vue
1<v-row v-for="field in textFields" :key="field.name"> 2 <v-col> 3 <v-text-field solo 4 :v-model="textValues" 5 :placeholder="field.name" 6 :type="field.type"></v-text-field> 7 </v-col> 8</v-row> 9 <v-btn text @click="buttonClick">{{ buttonValue }}</v-btn> 10<script src="./StackedForm.ts"></script>
Typescript
1export default class StackedForm extends Vue { 2 private textFields:any = [ 3 { 4 name: "名前", 5 type: "text" 6 }, 7 ]; 8 private buttonClick(): void { 9 console.log(this.textValues); 10 } 11}
回答1件
あなたの回答
tips
プレビュー
2020/01/15 09:59