vueのdateオプションで登録した値になんらかの変更があった際に、実行したい処理がある場合はウォッチャーを使用します。
new Vue({
watch: {
// 監視を行うデータ
todos: {
// 変化した時に行いたい処理
handler: function(todos) {
todoStorage.save(todos)
},
}
}
})
Go to list of users who liked
More than 5 years have passed since last update.
vueのdateオプションで登録した値になんらかの変更があった際に、実行したい処理がある場合はウォッチャーを使用します。
new Vue({
watch: {
// 監視を行うデータ
todos: {
// 変化した時に行いたい処理
handler: function(todos) {
todoStorage.save(todos)
},
}
}
})
Register as a new user and use Qiita more conveniently
Go to list of users who liked