What's the correct way to use twoWay directive in vue2.0

104 views Asked by At

Since vue2.0 removes the "twoWay" parameter and "set" function in directive, how to set back the value to the model.

Vue1.0 code

Vue.directive('dire', {
    twoWay: true,
    bind() {
        ...
        this.set(...);
    }
}

Then what's the best way in vue2.0?

0

There are 0 answers