diff --git a/src/components/poptip/poptip.vue b/src/components/poptip/poptip.vue index 182da695..20dda81c 100644 --- a/src/components/poptip/poptip.vue +++ b/src/components/poptip/poptip.vue @@ -104,6 +104,9 @@ popperClass: { type: String }, + popperStyle: { + type: String + }, wordWrap: { type: Boolean, default: false @@ -163,15 +166,17 @@ ]; }, styles () { - let style = {}; - + const style = []; if (this.width) { - style.width = `${this.width}px`; + style.push(`width: ${this.width}px`); } - - if (this.transfer) style['z-index'] = 1060 + this.tIndex; - - return style; + if (this.transfer) { + style.push(`z-index: ${1060 + this.tIndex}`); + } + if (this.popperStyle) { + style.push(this.popperStyle); + } + return style.join(';'); }, localeOkText () { if (this.okText === undefined) {