From e49224c91851c37420a4059fbd7185fa9aae00a1 Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 10 Aug 2017 09:06:14 +0800 Subject: [PATCH] add --- bi/base.js | 10 +++++----- docs/base.js | 10 +++++----- src/base/single/button/buttons/button.js | 8 ++++---- src/base/single/text.js | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/bi/base.js b/bi/base.js index 214fc6bb39..0efb366408 100644 --- a/bi/base.js +++ b/bi/base.js @@ -545,7 +545,7 @@ BI.Text = BI.inherit(BI.Single, { this.setText(o.value); } if (BI.isKey(o.keyword)) { - this.element.__textKeywordMarked__(o.text, o.keyword, o.py); + this.text.element.__textKeywordMarked__(o.text, o.keyword, o.py); } }, @@ -16345,9 +16345,9 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) { BI.Button.superclass._init.apply(this, arguments); var o = this.options, self = this; if (BI.isNumber(o.height) && !o.clear && !o.block) { - this.element.css({height: o.height - 2, lineHeight: (o.height - 2) + 'px'}); + this.element.css({height: o.height + "px", lineHeight: o.height + "px"}); } else { - this.element.css({lineHeight: o.height + 'px'}); + this.element.css({lineHeight: o.height + "px"}); } if (BI.isKey(o.iconClass)) { this.icon = BI.createWidget({ @@ -16400,8 +16400,8 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) { if (o.clear === true) { this.element.addClass("clear"); } - if (o.minWidth > 2) { - this.element.css({"min-width": o.minWidth - 2 + "px"}); + if (o.minWidth > 0) { + this.element.css({"min-width": o.minWidth + "px"}); } }, diff --git a/docs/base.js b/docs/base.js index 214fc6bb39..0efb366408 100644 --- a/docs/base.js +++ b/docs/base.js @@ -545,7 +545,7 @@ BI.Text = BI.inherit(BI.Single, { this.setText(o.value); } if (BI.isKey(o.keyword)) { - this.element.__textKeywordMarked__(o.text, o.keyword, o.py); + this.text.element.__textKeywordMarked__(o.text, o.keyword, o.py); } }, @@ -16345,9 +16345,9 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) { BI.Button.superclass._init.apply(this, arguments); var o = this.options, self = this; if (BI.isNumber(o.height) && !o.clear && !o.block) { - this.element.css({height: o.height - 2, lineHeight: (o.height - 2) + 'px'}); + this.element.css({height: o.height + "px", lineHeight: o.height + "px"}); } else { - this.element.css({lineHeight: o.height + 'px'}); + this.element.css({lineHeight: o.height + "px"}); } if (BI.isKey(o.iconClass)) { this.icon = BI.createWidget({ @@ -16400,8 +16400,8 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) { if (o.clear === true) { this.element.addClass("clear"); } - if (o.minWidth > 2) { - this.element.css({"min-width": o.minWidth - 2 + "px"}); + if (o.minWidth > 0) { + this.element.css({"min-width": o.minWidth + "px"}); } }, diff --git a/src/base/single/button/buttons/button.js b/src/base/single/button/buttons/button.js index 9e02af0481..f5450b38f2 100644 --- a/src/base/single/button/buttons/button.js +++ b/src/base/single/button/buttons/button.js @@ -40,9 +40,9 @@ BI.Button.superclass._init.apply(this, arguments); var o = this.options, self = this; if (BI.isNumber(o.height) && !o.clear && !o.block) { - this.element.css({height: o.height - 2, lineHeight: (o.height - 2) + 'px'}); + this.element.css({height: o.height + "px", lineHeight: o.height + "px"}); } else { - this.element.css({lineHeight: o.height + 'px'}); + this.element.css({lineHeight: o.height + "px"}); } if (BI.isKey(o.iconClass)) { this.icon = BI.createWidget({ @@ -95,8 +95,8 @@ if (o.clear === true) { this.element.addClass("clear"); } - if (o.minWidth > 2) { - this.element.css({"min-width": o.minWidth - 2 + "px"}); + if (o.minWidth > 0) { + this.element.css({"min-width": o.minWidth + "px"}); } }, diff --git a/src/base/single/text.js b/src/base/single/text.js index f8067923b9..4efe5143b3 100644 --- a/src/base/single/text.js +++ b/src/base/single/text.js @@ -78,7 +78,7 @@ BI.Text = BI.inherit(BI.Single, { this.setText(o.value); } if (BI.isKey(o.keyword)) { - this.element.__textKeywordMarked__(o.text, o.keyword, o.py); + this.text.element.__textKeywordMarked__(o.text, o.keyword, o.py); } },