2020-03-29から1日間の記事一覧
thisによる参照 thisが指すのはVueインスタンス自身 data: { items: [ { name: 'item1', price: 200, quantity: 3 }, { name: 'item2', price: 340, quantity: 2 }, ] }, computed: { totalPrice() { // this.itemsはこのVueインスタンスのdataのitems retur…
thisによる参照 thisが指すのはVueインスタンス自身 data: { items: [ { name: 'item1', price: 200, quantity: 3 }, { name: 'item2', price: 340, quantity: 2 }, ] }, computed: { totalPrice() { // this.itemsはこのVueインスタンスのdataのitems retur…