diff --git a/packages/fineui/src/base/layer/layer.popover.js b/packages/fineui/src/base/layer/layer.popover.js index d7649c389..0f08ac097 100644 --- a/packages/fineui/src/base/layer/layer.popover.js +++ b/packages/fineui/src/base/layer/layer.popover.js @@ -198,11 +198,11 @@ export class Popover extends Widget { mounted() { this.startX = 0; this.startY = 0; - const bodyDom = getOuterBody(); this.tracker = new MouseMoveTracker( (deltaX, deltaY) => { - const W = Widget._renderEngine.createElement(bodyDom).width(); - const H = Widget._renderEngine.createElement(bodyDom).height(); + const el = Widget._renderEngine.createElement(getOuterBody())[0]; + const W = el.clientWidth; + const H = el.clientHeight; this.startX += deltaX; this.startY += deltaY; this.element.css({ @@ -246,7 +246,7 @@ export class Popover extends Widget { } _getSuitableWidth(width) { - return clamp(width, 0, Widget._renderEngine.createElement(getOuterBody()).width()); + return clamp(width, 0, Widget._renderEngine.createElement(getOuterBody())[0].clientWidth); } _calculateSize() { diff --git a/packages/fineui/webpack/webpack.dev.js b/packages/fineui/webpack/webpack.dev.js index 3b795e02d..1f80646d2 100644 --- a/packages/fineui/webpack/webpack.dev.js +++ b/packages/fineui/webpack/webpack.dev.js @@ -6,7 +6,7 @@ const dirs = require("./dirs"); module.exports = merge(common, { mode: "development", - devtool: "inline-source-map", + devtool: "eval-source-map", output: { path: dirs.DEST, @@ -14,14 +14,14 @@ module.exports = merge(common, { }, devServer: { + headers: { + "Access-Control-Allow-Origin": "*", + }, port: 9001, // liveReload: true, client: { logging: 'error', - overlay: { - errors: true, - warnings: false, - }, + overlay: false, }, } });