@@ -91,7 +91,11 @@ p._bind = function (def) {
watcher.addCb(update)
}
this._watcher = watcher
- this.update(watcher.value)
+ if (this._initValue != null) {
+ watcher.set(this._initValue)
+ } else {
+ this.update(watcher.value)
+ }
this._bound = true
@@ -10,8 +10,7 @@ module.exports = {
_.on(el, 'change', this.listener)
if (el.checked) {
- // watcher is not set up yet
- this.vm.$set(this.expression, el.checked)
+ this._initValue = el.checked
},
- this.vm.$set(this.expression, el.value)
+ this._initValue = el.value
@@ -124,7 +124,7 @@ function checkInitialValue () {
if (initValue) {
- this.vm.$set(this.expression, initValue)
+ this._initValue = initValue
@@ -99,8 +99,7 @@ module.exports = {
el.hasAttribute('value') ||
(el.tagName === 'TEXTAREA' && el.value.trim())
) {