Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Vue.directive('select2', {
- twoWay: true,
- inserted: function (el) {
- $(el).select2()
- .on("select2:select", function(e) {
- alert($(el).val());
- // this.set($(el).val());
- }.bind(this));
- },
- update: function(nv, ov) {
- $(this.el).trigger("change");
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement