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

@ -2,7 +2,7 @@
<div
:class="[prefixCls]"
v-clickoutside="handleClose">
<div v-el:reference>
<div v-el:reference :class="[prefixCls + '-rel']">
<slot>
<i-input
:class="[prefixCls + '-editor']"

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>

View file

@ -66,7 +66,7 @@
popper._popper.style.transformOrigin = `center ${ origin }`;
}
},
ready () {
compiled () {
this.$on('on-update-popper', this.update);
this.$on('on-destroy-popper', this.destroy);
},

View file

@ -50,7 +50,7 @@
const cell = document.createElement('div');
cell.innerHTML = template;
const _oldParentChildLen = $parent.$children.length;
$parent.$compile(cell);
$parent.$compile(cell); // todo ready
const _newParentChildLen = $parent.$children.length;
if (_oldParentChildLen !== _newParentChildLen) { // if render normal html node, do not tag

View file

@ -4,8 +4,11 @@
@date-picker-cells-width: 196px;
.@{date-picker-prefix-cls} {
position: relative;
//position: relative;
line-height: normal;
&-rel{
position: relative;
}
.@{select-dropdown-prefix-cls} {
width: auto;
padding: 0;