Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Vue from 'vue'
- import autosize from 'autosize'
- Vue.directive('autosize', {
- bind: function() {
- console.log('autosize bind')
- var self = this
- Vue.nextTick(function() {
- autosize(self.el)
- })
- },
- update: function(value) {
- console.log('autosize update')
- var self = this
- Vue.nextTick(function() {
- self.el.value = value
- autosize.update(self.el)
- })
- },
- unbind: function() {
- autosize.destroy(this.el)
- }
- })
- import Autosize from 'components/directives/autosize.js'
- directives: {
- Autosize
- }
- console.log('autosize bind')
- console.log('autosize update')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement