From baa8e881f3d2138c4dd3f722e80061e3b11866b5 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Fri, 26 Apr 2019 14:07:31 +0800 Subject: [PATCH 1/3] =?UTF-8?q?BI-44174=20fix:=20checkbox=E6=9C=AA?= =?UTF-8?q?=E5=8B=BE=E9=80=89=E6=97=B6=E7=9A=84=E7=81=B0=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/2.0/fineui.css | 4 +++- dist/2.0/fineui.ie.js | 24 ++++++++++++++++-------- dist/2.0/fineui.js | 24 ++++++++++++++++-------- dist/base.css | 4 +++- dist/bundle.css | 4 +++- dist/bundle.ie.js | 24 ++++++++++++++++-------- dist/bundle.js | 24 ++++++++++++++++-------- dist/fineui.ie.js | 24 ++++++++++++++++-------- dist/fineui.js | 24 ++++++++++++++++-------- src/css/base/single/input/checkbox.css | 4 +++- src/less/base/single/input/checkbox.less | 4 +++- 11 files changed, 111 insertions(+), 53 deletions(-) diff --git a/dist/2.0/fineui.css b/dist/2.0/fineui.css index 9c414c77a..214c1b104 100644 --- a/dist/2.0/fineui.css +++ b/dist/2.0/fineui.css @@ -3572,12 +3572,14 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before, border-color: #ffffff; opacity: 1; } +.bi-checkbox.disabled .checkbox-content { + background-color: #d0d4da; +} .bi-checkbox.disabled .checkbox-content:after { opacity: 0; } .bi-checkbox.disabled.active .checkbox-content { border-color: #e8eaed; - background-color: #d0d4da; } .bi-checkbox.disabled.active .checkbox-content:after { opacity: 1; diff --git a/dist/2.0/fineui.ie.js b/dist/2.0/fineui.ie.js index c1e9b89d2..19230dd03 100644 --- a/dist/2.0/fineui.ie.js +++ b/dist/2.0/fineui.ie.js @@ -19976,7 +19976,7 @@ BI.prepares.push(function () { var i, direct; var leftRight = [], topBottom = []; var isNeedAdaptHeight = false, tbFirst = false, lrFirst = false; - var left, top, pos; + var left, top, pos, firstDir = directions[0]; for (i = 0; i < directions.length; i++) { direct = directions[i]; switch (direct) { @@ -20086,39 +20086,45 @@ BI.prepares.push(function () { } } + // 此处为四个方向放不下时挑空间最大的方向去放置, 也就是说我设置了弹出方向为"bottom,left", + // 最后发现实际弹出方向可能是"top,left",那么此时外界获取popup的方向应该是"top,left" switch (directions[0]) { case "left": case "right": if (BI.DOM.isRightSpaceLarger(combo)) { left = BI.DOM.getRightAdaptPosition(combo, popup, extraWidth).left; + firstDir = "right"; } else { left = BI.DOM.getLeftAdaptPosition(combo, popup, extraWidth).left; + firstDir = "left"; } if (topBottom[0] === "bottom") { pos = BI.DOM.getTopAlignPosition(combo, popup, extraHeight, needAdaptHeight); pos.left = left; - pos.dir = directions[0] + ",bottom"; + pos.dir = firstDir + ",bottom"; return pos; } pos = BI.DOM.getBottomAlignPosition(combo, popup, extraHeight, needAdaptHeight); pos.left = left; - pos.dir = directions[0] + ",top"; + pos.dir = firstDir + ",top"; return pos; default : if (BI.DOM.isBottomSpaceLarger(combo)) { pos = BI.DOM.getBottomAdaptPosition(combo, popup, extraHeight, needAdaptHeight); + firstDir = "bottom"; } else { pos = BI.DOM.getTopAdaptPosition(combo, popup, extraHeight, needAdaptHeight); + firstDir = "top"; } if (leftRight[0] === "right") { left = BI.DOM.getLeftAlignPosition(combo, popup, extraWidth, needAdaptHeight).left; pos.left = left; - pos.dir = directions[0] + ",right"; + pos.dir = firstDir + ",right"; return pos; } left = BI.DOM.getRightAlignPosition(combo, popup, extraWidth).left; pos.left = left; - pos.dir = directions[0] + ",left"; + pos.dir = firstDir + ",left"; return pos; } }, @@ -41606,7 +41612,7 @@ BI.PopupView = BI.inherit(BI.Widget, { var tbHeight = this.toolbar ? (this.toolbar.attr("height") || 24) : 0, tabHeight = this.tab ? (this.tab.attr("height") || 24) : 0, toolHeight = ((this.tool && this.tool.attr("height")) || 24) * ((this.tool && this.tool.isVisible()) ? 1 : 0); - var resetHeight = h - tbHeight - tabHeight - toolHeight - 2 * this.options.innerVGap - 2; + var resetHeight = h - tbHeight - tabHeight - toolHeight - 2 * this.options.innerVGap; this.view.resetHeight ? this.view.resetHeight(resetHeight) : this.view.element.css({"max-height": resetHeight + "px"}); }, @@ -45524,8 +45530,10 @@ BI.Input = BI.inherit(BI.Single, { }) .on("input propertychange", function (e) { // 输入内容全选并直接删光,如果按键没放开就失去焦点不会触发keyup,被focusout覆盖了 - // 这个事件在input的属性发生改变的时候就会触发(class的变化也算) - if (BI.isNotNull(keyCode)) { + // 其中propertychange在元素属性发生改变的时候就会触发 是为了兼容IE8 + // 通过keyCode判断会漏掉输入法点击输入(右键粘贴暂缓) + var originalEvent = e.originalEvent; + if (BI.isNull(originalEvent.propertyName) || originalEvent.propertyName === "value") { keyCode = null; inputEventValid = true; self._keydown_ = true; diff --git a/dist/2.0/fineui.js b/dist/2.0/fineui.js index 01eb3efe2..73e1d82c0 100644 --- a/dist/2.0/fineui.js +++ b/dist/2.0/fineui.js @@ -19976,7 +19976,7 @@ BI.prepares.push(function () { var i, direct; var leftRight = [], topBottom = []; var isNeedAdaptHeight = false, tbFirst = false, lrFirst = false; - var left, top, pos; + var left, top, pos, firstDir = directions[0]; for (i = 0; i < directions.length; i++) { direct = directions[i]; switch (direct) { @@ -20086,39 +20086,45 @@ BI.prepares.push(function () { } } + // 此处为四个方向放不下时挑空间最大的方向去放置, 也就是说我设置了弹出方向为"bottom,left", + // 最后发现实际弹出方向可能是"top,left",那么此时外界获取popup的方向应该是"top,left" switch (directions[0]) { case "left": case "right": if (BI.DOM.isRightSpaceLarger(combo)) { left = BI.DOM.getRightAdaptPosition(combo, popup, extraWidth).left; + firstDir = "right"; } else { left = BI.DOM.getLeftAdaptPosition(combo, popup, extraWidth).left; + firstDir = "left"; } if (topBottom[0] === "bottom") { pos = BI.DOM.getTopAlignPosition(combo, popup, extraHeight, needAdaptHeight); pos.left = left; - pos.dir = directions[0] + ",bottom"; + pos.dir = firstDir + ",bottom"; return pos; } pos = BI.DOM.getBottomAlignPosition(combo, popup, extraHeight, needAdaptHeight); pos.left = left; - pos.dir = directions[0] + ",top"; + pos.dir = firstDir + ",top"; return pos; default : if (BI.DOM.isBottomSpaceLarger(combo)) { pos = BI.DOM.getBottomAdaptPosition(combo, popup, extraHeight, needAdaptHeight); + firstDir = "bottom"; } else { pos = BI.DOM.getTopAdaptPosition(combo, popup, extraHeight, needAdaptHeight); + firstDir = "top"; } if (leftRight[0] === "right") { left = BI.DOM.getLeftAlignPosition(combo, popup, extraWidth, needAdaptHeight).left; pos.left = left; - pos.dir = directions[0] + ",right"; + pos.dir = firstDir + ",right"; return pos; } left = BI.DOM.getRightAlignPosition(combo, popup, extraWidth).left; pos.left = left; - pos.dir = directions[0] + ",left"; + pos.dir = firstDir + ",left"; return pos; } }, @@ -42010,7 +42016,7 @@ BI.PopupView = BI.inherit(BI.Widget, { var tbHeight = this.toolbar ? (this.toolbar.attr("height") || 24) : 0, tabHeight = this.tab ? (this.tab.attr("height") || 24) : 0, toolHeight = ((this.tool && this.tool.attr("height")) || 24) * ((this.tool && this.tool.isVisible()) ? 1 : 0); - var resetHeight = h - tbHeight - tabHeight - toolHeight - 2 * this.options.innerVGap - 2; + var resetHeight = h - tbHeight - tabHeight - toolHeight - 2 * this.options.innerVGap; this.view.resetHeight ? this.view.resetHeight(resetHeight) : this.view.element.css({"max-height": resetHeight + "px"}); }, @@ -45928,8 +45934,10 @@ BI.Input = BI.inherit(BI.Single, { }) .on("input propertychange", function (e) { // 输入内容全选并直接删光,如果按键没放开就失去焦点不会触发keyup,被focusout覆盖了 - // 这个事件在input的属性发生改变的时候就会触发(class的变化也算) - if (BI.isNotNull(keyCode)) { + // 其中propertychange在元素属性发生改变的时候就会触发 是为了兼容IE8 + // 通过keyCode判断会漏掉输入法点击输入(右键粘贴暂缓) + var originalEvent = e.originalEvent; + if (BI.isNull(originalEvent.propertyName) || originalEvent.propertyName === "value") { keyCode = null; inputEventValid = true; self._keydown_ = true; diff --git a/dist/base.css b/dist/base.css index ec7e24d72..5091d3fc2 100644 --- a/dist/base.css +++ b/dist/base.css @@ -1416,12 +1416,14 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before, border-color: #ffffff; opacity: 1; } +.bi-checkbox.disabled .checkbox-content { + background-color: #d0d4da; +} .bi-checkbox.disabled .checkbox-content:after { opacity: 0; } .bi-checkbox.disabled.active .checkbox-content { border-color: #e8eaed; - background-color: #d0d4da; } .bi-checkbox.disabled.active .checkbox-content:after { opacity: 1; diff --git a/dist/bundle.css b/dist/bundle.css index 9c414c77a..214c1b104 100644 --- a/dist/bundle.css +++ b/dist/bundle.css @@ -3572,12 +3572,14 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before, border-color: #ffffff; opacity: 1; } +.bi-checkbox.disabled .checkbox-content { + background-color: #d0d4da; +} .bi-checkbox.disabled .checkbox-content:after { opacity: 0; } .bi-checkbox.disabled.active .checkbox-content { border-color: #e8eaed; - background-color: #d0d4da; } .bi-checkbox.disabled.active .checkbox-content:after { opacity: 1; diff --git a/dist/bundle.ie.js b/dist/bundle.ie.js index c1e9b89d2..19230dd03 100644 --- a/dist/bundle.ie.js +++ b/dist/bundle.ie.js @@ -19976,7 +19976,7 @@ BI.prepares.push(function () { var i, direct; var leftRight = [], topBottom = []; var isNeedAdaptHeight = false, tbFirst = false, lrFirst = false; - var left, top, pos; + var left, top, pos, firstDir = directions[0]; for (i = 0; i < directions.length; i++) { direct = directions[i]; switch (direct) { @@ -20086,39 +20086,45 @@ BI.prepares.push(function () { } } + // 此处为四个方向放不下时挑空间最大的方向去放置, 也就是说我设置了弹出方向为"bottom,left", + // 最后发现实际弹出方向可能是"top,left",那么此时外界获取popup的方向应该是"top,left" switch (directions[0]) { case "left": case "right": if (BI.DOM.isRightSpaceLarger(combo)) { left = BI.DOM.getRightAdaptPosition(combo, popup, extraWidth).left; + firstDir = "right"; } else { left = BI.DOM.getLeftAdaptPosition(combo, popup, extraWidth).left; + firstDir = "left"; } if (topBottom[0] === "bottom") { pos = BI.DOM.getTopAlignPosition(combo, popup, extraHeight, needAdaptHeight); pos.left = left; - pos.dir = directions[0] + ",bottom"; + pos.dir = firstDir + ",bottom"; return pos; } pos = BI.DOM.getBottomAlignPosition(combo, popup, extraHeight, needAdaptHeight); pos.left = left; - pos.dir = directions[0] + ",top"; + pos.dir = firstDir + ",top"; return pos; default : if (BI.DOM.isBottomSpaceLarger(combo)) { pos = BI.DOM.getBottomAdaptPosition(combo, popup, extraHeight, needAdaptHeight); + firstDir = "bottom"; } else { pos = BI.DOM.getTopAdaptPosition(combo, popup, extraHeight, needAdaptHeight); + firstDir = "top"; } if (leftRight[0] === "right") { left = BI.DOM.getLeftAlignPosition(combo, popup, extraWidth, needAdaptHeight).left; pos.left = left; - pos.dir = directions[0] + ",right"; + pos.dir = firstDir + ",right"; return pos; } left = BI.DOM.getRightAlignPosition(combo, popup, extraWidth).left; pos.left = left; - pos.dir = directions[0] + ",left"; + pos.dir = firstDir + ",left"; return pos; } }, @@ -41606,7 +41612,7 @@ BI.PopupView = BI.inherit(BI.Widget, { var tbHeight = this.toolbar ? (this.toolbar.attr("height") || 24) : 0, tabHeight = this.tab ? (this.tab.attr("height") || 24) : 0, toolHeight = ((this.tool && this.tool.attr("height")) || 24) * ((this.tool && this.tool.isVisible()) ? 1 : 0); - var resetHeight = h - tbHeight - tabHeight - toolHeight - 2 * this.options.innerVGap - 2; + var resetHeight = h - tbHeight - tabHeight - toolHeight - 2 * this.options.innerVGap; this.view.resetHeight ? this.view.resetHeight(resetHeight) : this.view.element.css({"max-height": resetHeight + "px"}); }, @@ -45524,8 +45530,10 @@ BI.Input = BI.inherit(BI.Single, { }) .on("input propertychange", function (e) { // 输入内容全选并直接删光,如果按键没放开就失去焦点不会触发keyup,被focusout覆盖了 - // 这个事件在input的属性发生改变的时候就会触发(class的变化也算) - if (BI.isNotNull(keyCode)) { + // 其中propertychange在元素属性发生改变的时候就会触发 是为了兼容IE8 + // 通过keyCode判断会漏掉输入法点击输入(右键粘贴暂缓) + var originalEvent = e.originalEvent; + if (BI.isNull(originalEvent.propertyName) || originalEvent.propertyName === "value") { keyCode = null; inputEventValid = true; self._keydown_ = true; diff --git a/dist/bundle.js b/dist/bundle.js index 01eb3efe2..73e1d82c0 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -19976,7 +19976,7 @@ BI.prepares.push(function () { var i, direct; var leftRight = [], topBottom = []; var isNeedAdaptHeight = false, tbFirst = false, lrFirst = false; - var left, top, pos; + var left, top, pos, firstDir = directions[0]; for (i = 0; i < directions.length; i++) { direct = directions[i]; switch (direct) { @@ -20086,39 +20086,45 @@ BI.prepares.push(function () { } } + // 此处为四个方向放不下时挑空间最大的方向去放置, 也就是说我设置了弹出方向为"bottom,left", + // 最后发现实际弹出方向可能是"top,left",那么此时外界获取popup的方向应该是"top,left" switch (directions[0]) { case "left": case "right": if (BI.DOM.isRightSpaceLarger(combo)) { left = BI.DOM.getRightAdaptPosition(combo, popup, extraWidth).left; + firstDir = "right"; } else { left = BI.DOM.getLeftAdaptPosition(combo, popup, extraWidth).left; + firstDir = "left"; } if (topBottom[0] === "bottom") { pos = BI.DOM.getTopAlignPosition(combo, popup, extraHeight, needAdaptHeight); pos.left = left; - pos.dir = directions[0] + ",bottom"; + pos.dir = firstDir + ",bottom"; return pos; } pos = BI.DOM.getBottomAlignPosition(combo, popup, extraHeight, needAdaptHeight); pos.left = left; - pos.dir = directions[0] + ",top"; + pos.dir = firstDir + ",top"; return pos; default : if (BI.DOM.isBottomSpaceLarger(combo)) { pos = BI.DOM.getBottomAdaptPosition(combo, popup, extraHeight, needAdaptHeight); + firstDir = "bottom"; } else { pos = BI.DOM.getTopAdaptPosition(combo, popup, extraHeight, needAdaptHeight); + firstDir = "top"; } if (leftRight[0] === "right") { left = BI.DOM.getLeftAlignPosition(combo, popup, extraWidth, needAdaptHeight).left; pos.left = left; - pos.dir = directions[0] + ",right"; + pos.dir = firstDir + ",right"; return pos; } left = BI.DOM.getRightAlignPosition(combo, popup, extraWidth).left; pos.left = left; - pos.dir = directions[0] + ",left"; + pos.dir = firstDir + ",left"; return pos; } }, @@ -42010,7 +42016,7 @@ BI.PopupView = BI.inherit(BI.Widget, { var tbHeight = this.toolbar ? (this.toolbar.attr("height") || 24) : 0, tabHeight = this.tab ? (this.tab.attr("height") || 24) : 0, toolHeight = ((this.tool && this.tool.attr("height")) || 24) * ((this.tool && this.tool.isVisible()) ? 1 : 0); - var resetHeight = h - tbHeight - tabHeight - toolHeight - 2 * this.options.innerVGap - 2; + var resetHeight = h - tbHeight - tabHeight - toolHeight - 2 * this.options.innerVGap; this.view.resetHeight ? this.view.resetHeight(resetHeight) : this.view.element.css({"max-height": resetHeight + "px"}); }, @@ -45928,8 +45934,10 @@ BI.Input = BI.inherit(BI.Single, { }) .on("input propertychange", function (e) { // 输入内容全选并直接删光,如果按键没放开就失去焦点不会触发keyup,被focusout覆盖了 - // 这个事件在input的属性发生改变的时候就会触发(class的变化也算) - if (BI.isNotNull(keyCode)) { + // 其中propertychange在元素属性发生改变的时候就会触发 是为了兼容IE8 + // 通过keyCode判断会漏掉输入法点击输入(右键粘贴暂缓) + var originalEvent = e.originalEvent; + if (BI.isNull(originalEvent.propertyName) || originalEvent.propertyName === "value") { keyCode = null; inputEventValid = true; self._keydown_ = true; diff --git a/dist/fineui.ie.js b/dist/fineui.ie.js index cb9b88514..e9fee8755 100644 --- a/dist/fineui.ie.js +++ b/dist/fineui.ie.js @@ -20221,7 +20221,7 @@ BI.prepares.push(function () { var i, direct; var leftRight = [], topBottom = []; var isNeedAdaptHeight = false, tbFirst = false, lrFirst = false; - var left, top, pos; + var left, top, pos, firstDir = directions[0]; for (i = 0; i < directions.length; i++) { direct = directions[i]; switch (direct) { @@ -20331,39 +20331,45 @@ BI.prepares.push(function () { } } + // 此处为四个方向放不下时挑空间最大的方向去放置, 也就是说我设置了弹出方向为"bottom,left", + // 最后发现实际弹出方向可能是"top,left",那么此时外界获取popup的方向应该是"top,left" switch (directions[0]) { case "left": case "right": if (BI.DOM.isRightSpaceLarger(combo)) { left = BI.DOM.getRightAdaptPosition(combo, popup, extraWidth).left; + firstDir = "right"; } else { left = BI.DOM.getLeftAdaptPosition(combo, popup, extraWidth).left; + firstDir = "left"; } if (topBottom[0] === "bottom") { pos = BI.DOM.getTopAlignPosition(combo, popup, extraHeight, needAdaptHeight); pos.left = left; - pos.dir = directions[0] + ",bottom"; + pos.dir = firstDir + ",bottom"; return pos; } pos = BI.DOM.getBottomAlignPosition(combo, popup, extraHeight, needAdaptHeight); pos.left = left; - pos.dir = directions[0] + ",top"; + pos.dir = firstDir + ",top"; return pos; default : if (BI.DOM.isBottomSpaceLarger(combo)) { pos = BI.DOM.getBottomAdaptPosition(combo, popup, extraHeight, needAdaptHeight); + firstDir = "bottom"; } else { pos = BI.DOM.getTopAdaptPosition(combo, popup, extraHeight, needAdaptHeight); + firstDir = "top"; } if (leftRight[0] === "right") { left = BI.DOM.getLeftAlignPosition(combo, popup, extraWidth, needAdaptHeight).left; pos.left = left; - pos.dir = directions[0] + ",right"; + pos.dir = firstDir + ",right"; return pos; } left = BI.DOM.getRightAlignPosition(combo, popup, extraWidth).left; pos.left = left; - pos.dir = directions[0] + ",left"; + pos.dir = firstDir + ",left"; return pos; } }, @@ -41851,7 +41857,7 @@ BI.PopupView = BI.inherit(BI.Widget, { var tbHeight = this.toolbar ? (this.toolbar.attr("height") || 24) : 0, tabHeight = this.tab ? (this.tab.attr("height") || 24) : 0, toolHeight = ((this.tool && this.tool.attr("height")) || 24) * ((this.tool && this.tool.isVisible()) ? 1 : 0); - var resetHeight = h - tbHeight - tabHeight - toolHeight - 2 * this.options.innerVGap - 2; + var resetHeight = h - tbHeight - tabHeight - toolHeight - 2 * this.options.innerVGap; this.view.resetHeight ? this.view.resetHeight(resetHeight) : this.view.element.css({"max-height": resetHeight + "px"}); }, @@ -45769,8 +45775,10 @@ BI.Input = BI.inherit(BI.Single, { }) .on("input propertychange", function (e) { // 输入内容全选并直接删光,如果按键没放开就失去焦点不会触发keyup,被focusout覆盖了 - // 这个事件在input的属性发生改变的时候就会触发(class的变化也算) - if (BI.isNotNull(keyCode)) { + // 其中propertychange在元素属性发生改变的时候就会触发 是为了兼容IE8 + // 通过keyCode判断会漏掉输入法点击输入(右键粘贴暂缓) + var originalEvent = e.originalEvent; + if (BI.isNull(originalEvent.propertyName) || originalEvent.propertyName === "value") { keyCode = null; inputEventValid = true; self._keydown_ = true; diff --git a/dist/fineui.js b/dist/fineui.js index 65191028b..a3981e4d9 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -20221,7 +20221,7 @@ BI.prepares.push(function () { var i, direct; var leftRight = [], topBottom = []; var isNeedAdaptHeight = false, tbFirst = false, lrFirst = false; - var left, top, pos; + var left, top, pos, firstDir = directions[0]; for (i = 0; i < directions.length; i++) { direct = directions[i]; switch (direct) { @@ -20331,39 +20331,45 @@ BI.prepares.push(function () { } } + // 此处为四个方向放不下时挑空间最大的方向去放置, 也就是说我设置了弹出方向为"bottom,left", + // 最后发现实际弹出方向可能是"top,left",那么此时外界获取popup的方向应该是"top,left" switch (directions[0]) { case "left": case "right": if (BI.DOM.isRightSpaceLarger(combo)) { left = BI.DOM.getRightAdaptPosition(combo, popup, extraWidth).left; + firstDir = "right"; } else { left = BI.DOM.getLeftAdaptPosition(combo, popup, extraWidth).left; + firstDir = "left"; } if (topBottom[0] === "bottom") { pos = BI.DOM.getTopAlignPosition(combo, popup, extraHeight, needAdaptHeight); pos.left = left; - pos.dir = directions[0] + ",bottom"; + pos.dir = firstDir + ",bottom"; return pos; } pos = BI.DOM.getBottomAlignPosition(combo, popup, extraHeight, needAdaptHeight); pos.left = left; - pos.dir = directions[0] + ",top"; + pos.dir = firstDir + ",top"; return pos; default : if (BI.DOM.isBottomSpaceLarger(combo)) { pos = BI.DOM.getBottomAdaptPosition(combo, popup, extraHeight, needAdaptHeight); + firstDir = "bottom"; } else { pos = BI.DOM.getTopAdaptPosition(combo, popup, extraHeight, needAdaptHeight); + firstDir = "top"; } if (leftRight[0] === "right") { left = BI.DOM.getLeftAlignPosition(combo, popup, extraWidth, needAdaptHeight).left; pos.left = left; - pos.dir = directions[0] + ",right"; + pos.dir = firstDir + ",right"; return pos; } left = BI.DOM.getRightAlignPosition(combo, popup, extraWidth).left; pos.left = left; - pos.dir = directions[0] + ",left"; + pos.dir = firstDir + ",left"; return pos; } }, @@ -42255,7 +42261,7 @@ BI.PopupView = BI.inherit(BI.Widget, { var tbHeight = this.toolbar ? (this.toolbar.attr("height") || 24) : 0, tabHeight = this.tab ? (this.tab.attr("height") || 24) : 0, toolHeight = ((this.tool && this.tool.attr("height")) || 24) * ((this.tool && this.tool.isVisible()) ? 1 : 0); - var resetHeight = h - tbHeight - tabHeight - toolHeight - 2 * this.options.innerVGap - 2; + var resetHeight = h - tbHeight - tabHeight - toolHeight - 2 * this.options.innerVGap; this.view.resetHeight ? this.view.resetHeight(resetHeight) : this.view.element.css({"max-height": resetHeight + "px"}); }, @@ -46173,8 +46179,10 @@ BI.Input = BI.inherit(BI.Single, { }) .on("input propertychange", function (e) { // 输入内容全选并直接删光,如果按键没放开就失去焦点不会触发keyup,被focusout覆盖了 - // 这个事件在input的属性发生改变的时候就会触发(class的变化也算) - if (BI.isNotNull(keyCode)) { + // 其中propertychange在元素属性发生改变的时候就会触发 是为了兼容IE8 + // 通过keyCode判断会漏掉输入法点击输入(右键粘贴暂缓) + var originalEvent = e.originalEvent; + if (BI.isNull(originalEvent.propertyName) || originalEvent.propertyName === "value") { keyCode = null; inputEventValid = true; self._keydown_ = true; diff --git a/src/css/base/single/input/checkbox.css b/src/css/base/single/input/checkbox.css index 7541a35eb..7ca07eb4e 100644 --- a/src/css/base/single/input/checkbox.css +++ b/src/css/base/single/input/checkbox.css @@ -30,12 +30,14 @@ border-color: #ffffff; opacity: 1; } +.bi-checkbox.disabled .checkbox-content { + background-color: #d0d4da; +} .bi-checkbox.disabled .checkbox-content:after { opacity: 0; } .bi-checkbox.disabled.active .checkbox-content { border-color: #e8eaed; - background-color: #d0d4da; } .bi-checkbox.disabled.active .checkbox-content:after { opacity: 1; diff --git a/src/less/base/single/input/checkbox.less b/src/less/base/single/input/checkbox.less index d243f2714..2bd3ccc8c 100644 --- a/src/less/base/single/input/checkbox.less +++ b/src/less/base/single/input/checkbox.less @@ -28,6 +28,9 @@ } } &.disabled { + & .checkbox-content { + background-color: @color-bi-background-dark-gray; + } & .checkbox-content:after { opacity: 0; } @@ -35,7 +38,6 @@ & .checkbox-content { // 深浅主题下border-color是一样的 border-color: @color-bi-border-line; - background-color: @color-bi-background-dark-gray; &:after { opacity: 1; } From 6bcfeec8919fce3f529176648791bc3cfe35d8f5 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Fri, 26 Apr 2019 15:52:13 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=87=8F=E5=B0=91show=E6=AC=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/combination/combo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base/combination/combo.js b/src/base/combination/combo.js index 31fcc7640..70faf5d59 100644 --- a/src/base/combination/combo.js +++ b/src/base/combination/combo.js @@ -469,7 +469,7 @@ BI.Combo = BI.inherit(BI.Widget, { }, showView: function (e) { - if (this.isEnabled() && this.combo.isEnabled()) { + if (this.isEnabled() && this.combo.isEnabled() && !this.isViewVisible()) { this._popupView(e); } }, From ece1e6a1ecb54559b89bb7be4d471abb9edf2635 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Fri, 26 Apr 2019 15:54:34 +0800 Subject: [PATCH 3/3] update --- src/base/combination/combo.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/base/combination/combo.js b/src/base/combination/combo.js index 70faf5d59..bed059725 100644 --- a/src/base/combination/combo.js +++ b/src/base/combination/combo.js @@ -469,6 +469,7 @@ BI.Combo = BI.inherit(BI.Widget, { }, showView: function (e) { + // 减少popup 调整宽高的次数 if (this.isEnabled() && this.combo.isEnabled() && !this.isViewVisible()) { this._popupView(e); }