Browse Source

Merge branch 'master' of ssh://code.fineres.com:7999/~dailer/fineui

research/test
翠屏山最速下山传说 7 months ago
parent
commit
4bba27b638
  1. BIN
      packages/fineui/dist/font/iconfont.eot
  2. 32
      packages/fineui/dist/font/iconfont.svg
  3. BIN
      packages/fineui/dist/font/iconfont.ttf
  4. BIN
      packages/fineui/dist/font/iconfont.woff
  5. BIN
      packages/fineui/dist/font/iconfont.woff2
  6. 8
      packages/fineui/src/base/layer/layer.popover.js
  7. 16
      packages/fineui/src/core/controller/controller.popover.js
  8. 10
      packages/fineui/webpack/webpack.dev.js

BIN
packages/fineui/dist/font/iconfont.eot vendored

Binary file not shown.

32
packages/fineui/dist/font/iconfont.svg vendored

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 1024 KiB

After

Width:  |  Height:  |  Size: 1.0 MiB

BIN
packages/fineui/dist/font/iconfont.ttf vendored

Binary file not shown.

BIN
packages/fineui/dist/font/iconfont.woff vendored

Binary file not shown.

BIN
packages/fineui/dist/font/iconfont.woff2 vendored

Binary file not shown.

8
packages/fineui/src/base/layer/layer.popover.js

@ -198,11 +198,11 @@ export class Popover extends Widget {
mounted() { mounted() {
this.startX = 0; this.startX = 0;
this.startY = 0; this.startY = 0;
const bodyDom = getOuterBody();
this.tracker = new MouseMoveTracker( this.tracker = new MouseMoveTracker(
(deltaX, deltaY) => { (deltaX, deltaY) => {
const W = Widget._renderEngine.createElement(bodyDom).width(); const el = Widget._renderEngine.createElement(getOuterBody())[0];
const H = Widget._renderEngine.createElement(bodyDom).height(); const W = el.clientWidth;
const H = el.clientHeight;
this.startX += deltaX; this.startX += deltaX;
this.startY += deltaY; this.startY += deltaY;
this.element.css({ this.element.css({
@ -246,7 +246,7 @@ export class Popover extends Widget {
} }
_getSuitableWidth(width) { _getSuitableWidth(width) {
return clamp(width, 0, Widget._renderEngine.createElement(getOuterBody()).width()); return clamp(width, 0, Widget._renderEngine.createElement(getOuterBody())[0].clientWidth);
} }
_calculateSize() { _calculateSize() {

16
packages/fineui/src/core/controller/controller.popover.js

@ -38,7 +38,7 @@ export class PopoverController extends Controller {
type: "bi.popover", type: "bi.popover",
}, context); }, context);
this.add(name, popover, options, context); this.add(name, popover, options, context);
return this; return this;
} }
@ -58,8 +58,8 @@ export class PopoverController extends Controller {
const popover = this.get(name); const popover = this.get(name);
popover.show && popover.show(); popover.show && popover.show();
const render = this.getRender(); const render = this.getRender();
const W = Widget._renderEngine.createElement(render).width(), const el = Widget._renderEngine.createElement(render)[0];
H = Widget._renderEngine.createElement(render).height(); const W = el.clientWidth, H = el.clientHeight;
const w = popover.element.width(), h = popover.element.height(); const w = popover.element.width(), h = popover.element.height();
let left = (W - w) / 2, top = (H - h) / 2; let left = (W - w) / 2, top = (H - h) / 2;
if (left < 0) { if (left < 0) {
@ -74,7 +74,7 @@ export class PopoverController extends Controller {
top: `${top}px`, top: `${top}px`,
}); });
} }
return this; return this;
} }
@ -87,7 +87,7 @@ export class PopoverController extends Controller {
this.floatContainer[name].invisible(); this.floatContainer[name].invisible();
this.modal && this.floatContainer[name].element.__releaseZIndexMask__(this.zindexMap[name]); this.modal && this.floatContainer[name].element.__releaseZIndexMask__(this.zindexMap[name]);
} }
return this; return this;
} }
@ -135,7 +135,7 @@ export class PopoverController extends Controller {
bottom: 0, bottom: 0,
}], }],
}); });
return this; return this;
} }
@ -167,7 +167,7 @@ export class PopoverController extends Controller {
delete this.zindexMap[name]; delete this.zindexMap[name];
delete this.floatContainer[name]; delete this.floatContainer[name];
delete this.floatOpened[name]; delete this.floatOpened[name];
return this; return this;
} }
@ -181,7 +181,7 @@ export class PopoverController extends Controller {
this.floatContainer = {}; this.floatContainer = {};
this.floatOpened = {}; this.floatOpened = {};
this.zindexMap = {}; this.zindexMap = {};
return this; return this;
} }

10
packages/fineui/webpack/webpack.dev.js

@ -6,7 +6,7 @@ const dirs = require("./dirs");
module.exports = merge(common, { module.exports = merge(common, {
mode: "development", mode: "development",
devtool: "inline-source-map", devtool: "eval-source-map",
output: { output: {
path: dirs.DEST, path: dirs.DEST,
@ -14,14 +14,14 @@ module.exports = merge(common, {
}, },
devServer: { devServer: {
headers: {
"Access-Control-Allow-Origin": "*",
},
port: 9001, port: 9001,
// liveReload: true, // liveReload: true,
client: { client: {
logging: 'error', logging: 'error',
overlay: { overlay: false,
errors: true,
warnings: false,
},
}, },
} }
}); });

Loading…
Cancel
Save