Tooltip: fix ssr, fixed #3173 (#3214)

pull/3389/head
cinwell.li 2017-03-09 16:18:20 +08:00 committed by baiyaaaaa
parent 3768ba2bcf
commit 4ac6fed6a5
1 changed files with 17 additions and 17 deletions

View File

@ -52,23 +52,23 @@ export default {
}, },
render(h) { render(h) {
if (this.$isServer) return; if (this.popperVM) {
this.popperVM.node = (
this.popperVM.node = ( <transition
<transition name={ this.transition }
name={ this.transition } onAfterLeave={ this.doDestroy }>
onAfterLeave={ this.doDestroy }> <div
<div onMouseleave={ () => { this.debounceClose(); this.togglePreventClose(); } }
onMouseleave={ () => { this.debounceClose(); this.togglePreventClose(); } } onMouseenter= { this.togglePreventClose }
onMouseenter= { this.togglePreventClose } ref="popper"
ref="popper" v-show={!this.disabled && this.showPopper}
v-show={!this.disabled && this.showPopper} class={
class={ ['el-tooltip__popper', 'is-' + this.effect, this.popperClass]
['el-tooltip__popper', 'is-' + this.effect, this.popperClass] }>
}> { this.$slots.content || this.content }
{ this.$slots.content || this.content } </div>
</div> </transition>);
</transition>); }
if (!this.$slots.default || !this.$slots.default.length) return this.$slots.default; if (!this.$slots.default || !this.$slots.default.length) return this.$slots.default;