2019-12-16から1日間の記事一覧

VueJS: computedで得たListをlist rendering し、かつその値を変更させる必要があるとき

vue@2.6.11 Example computed: { items() { this.$store.state.items } } itemsは{name: "ITEM_NAME", quantity: 0}の複数配列とする。 <v-for item in items :key=item.key> {{ item.name }} <v-btn @click="item.quantity++"> >>>>> computedは基本的にgetterとして使用するのでボタンを押してもquantityの値を変化させられな</v-btn></v-for>…