fixed #205
This commit is contained in:
梁灏 2017-01-16 12:29:03 +08:00
parent f36be426d4
commit b89a982e64
7 changed files with 111 additions and 23 deletions

View file

@ -161,6 +161,17 @@
const maxRows = autosize.maxRows;
this.textareaStyles = calcTextareaHeight(this.$els.textarea, minRows, maxRows);
},
init () {
if (this.type !== 'textarea') {
this.prepend = this.$els.prepend.innerHTML !== '';
this.append = this.$els.append.innerHTML !== '';
} else {
this.prepend = false;
this.append = false;
}
this.slotReady = true;
this.resizeTextarea();
}
},
watch: {
@ -171,16 +182,8 @@
this.$dispatch('on-form-change', this.value);
}
},
ready () {
if (this.type !== 'textarea') {
this.prepend = this.$els.prepend.innerHTML !== '';
this.append = this.$els.append.innerHTML !== '';
} else {
this.prepend = false;
this.append = false;
}
this.slotReady = true;
this.resizeTextarea();
compiled () {
this.$nextTick(() => this.init());
}
};
</script>