2016-10-27 6 views

答えて

2

computedプロパティを使用します。http://jsfiddle.net/xb5h545w/17/

+0

ありがとう:

new Vue({ el: '#test', data: { foo: 0 }, computed: { normalizedFoo: { get() { return this.foo + 1; }, set (value) { this.foo = value - 1; } } } }); 

ここでは、あなたの更新フィドルです!それでおしまい!! –

関連する問題