Browse Source

BI-161134 fix: display: none 时计算为 0 下次调用也需重新计算,不能单靠 isNull 判断

master
Xavier.Meng 4 weeks ago
parent
commit
ddc4156b37
  1. 4
      packages/fineui/src/core/utils/dom.js

4
packages/fineui/src/core/utils/dom.js

@ -2,7 +2,7 @@
* 对DOM操作的通用函数 * 对DOM操作的通用函数
*/ */
import $ from "jquery"; import $ from "jquery";
import { each, isEmpty, isNotEmptyObject, isNull } from "../2.base"; import { each, isEmpty, isNotEmptyObject } from "../2.base";
import { Widget } from "../4.widget"; import { Widget } from "../4.widget";
import { isIE } from "./../platform"; import { isIE } from "./../platform";
@ -116,7 +116,7 @@ export function getScrollWidth(css) {
if (hasNoneScrollWidth) { if (hasNoneScrollWidth) {
return 0; return 0;
} else if (isNull(_scrollWidthMap[key])) { } else if (!_scrollWidthMap[key]) {
const ul = Widget._renderEngine const ul = Widget._renderEngine
.createElement("<div>") .createElement("<div>")
.width(50) .width(50)

Loading…
Cancel
Save