図書館合金 Part 2

programming and books, music etc.

vue.js で v-on:change で複数のファンクションを呼ぶには?

参考: https://stackoverflow.com/questions/38744932/how-to-call-multiple-function-with-v-onclick

<input v-on:change="calcAmount, calcSum">

というように書けるのかなと思ったが、だめらしい。

<input v-on:change="calcBoth">

としておいて、

      methods: {
        calcBoth: function () {
            this.calcAmount();
            this.calcSum();
        }
      }

とするようだ。

モッピー!お金がたまるポイントサイト

Vue.js 2 Cookbook: Build modern, interactive web applications with Vue.js

Vue.js 2 Cookbook: Build modern, interactive web applications with Vue.js