Skip to content
This repository has been archived by the owner on Dec 25, 2017. It is now read-only.

Commit

Permalink
💥 breaking: not support v-model integration for v3
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed Dec 6, 2016
1 parent 5324a56 commit 0b152bc
Show file tree
Hide file tree
Showing 15 changed files with 2 additions and 1,377 deletions.
70 changes: 0 additions & 70 deletions examples/model/checkbox/index.html

This file was deleted.

95 changes: 0 additions & 95 deletions examples/model/component/index.html

This file was deleted.

62 changes: 0 additions & 62 deletions examples/model/radio/index.html

This file was deleted.

57 changes: 0 additions & 57 deletions examples/model/select/index.html

This file was deleted.

45 changes: 0 additions & 45 deletions examples/model/text/index.html

This file was deleted.

21 changes: 1 addition & 20 deletions src/components/validity/lifecycles.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ export default function (Vue: GlobalAPI): Object {
// for event control flags
this._modified = false

// for v-model integration flag
this._modelIntegrationMode = 'NONE'

// watch validation raw results
this._watchValidationRawResults()

Expand Down Expand Up @@ -96,26 +93,10 @@ export default function (Vue: GlobalAPI): Object {
toggleClasses(this.$el, this.classes.pristine, addClass)
}

function updated () {
if (this._modelIntegrationMode === 'MODEL_AND_USER') {
const maybeChangeModel: ?boolean = this._elementable.modelValueEqual(this._vnode)
if (!this._applyWithUserHandler && maybeChangeModel !== null && !maybeChangeModel) {
this._elementable.fireInputableEvent()
}
delete this._applyWithUserHandler
} else if (this._modelIntegrationMode === 'MODEL') {
const maybeChangeModel: ?boolean = this._elementable.modelValueEqual(this._vnode)
if (maybeChangeModel !== null && !maybeChangeModel) {
this._elementable.fireInputableEvent()
}
}
}

return {
created,
destroyed,
mounted,
updated
mounted
}
}

Expand Down
Loading

0 comments on commit 0b152bc

Please sign in to comment.