From 3c8b326cd63f3611f92e722737d6d58852631dfb Mon Sep 17 00:00:00 2001 From: qcc Date: Thu, 13 Sep 2018 20:04:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3IE=E4=B8=8B=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E8=8E=B7=E5=BE=97=E5=85=89=E6=A0=87=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/base.js | 28 ++++++++++++++++++++-------- src/base/single/editor/editor.js | 28 ++++++++++++++++++++-------- 2 files changed, 40 insertions(+), 16 deletions(-) diff --git a/dist/base.js b/dist/base.js index 5ed28943ca..0816188257 100644 --- a/dist/base.js +++ b/dist/base.js @@ -8444,18 +8444,30 @@ BI.Editor = BI.inherit(BI.Single, { } e.stopEvent(); }); - this.watermark.element.css({ - position: "absolute", - left: "3px", - right: "3px", - top: "0px", - bottom: "0px" + } + + var _items = []; + if (this.watermark) { + _items.push({ + el: this.watermark, + left: 3, + right: 3, + top: 0, + bottom: 0 }); } + _items.push({ + el: this.editor, + left: 0, + right: 0, + top: 0, + bottom: 0 + }); + var items = [{ el: { - type: "bi.default", - items: this.watermark ? [this.editor, this.watermark] : [this.editor] + type: "bi.absolute", + items: _items }, left: o.hgap + o.lgap, right: o.hgap + o.rgap, diff --git a/src/base/single/editor/editor.js b/src/base/single/editor/editor.js index 95e50a2012..7941567eb4 100644 --- a/src/base/single/editor/editor.js +++ b/src/base/single/editor/editor.js @@ -74,18 +74,30 @@ BI.Editor = BI.inherit(BI.Single, { } e.stopEvent(); }); - this.watermark.element.css({ - position: "absolute", - left: "3px", - right: "3px", - top: "0px", - bottom: "0px" + } + + var _items = []; + if (this.watermark) { + _items.push({ + el: this.watermark, + left: 3, + right: 3, + top: 0, + bottom: 0 }); } + _items.push({ + el: this.editor, + left: 0, + right: 0, + top: 0, + bottom: 0 + }); + var items = [{ el: { - type: "bi.default", - items: this.watermark ? [this.editor, this.watermark] : [this.editor] + type: "bi.absolute", + items: _items }, left: o.hgap + o.lgap, right: o.hgap + o.rgap,