Skip to content

Commit d23f269

Browse files
author
hikki
committed
v4.7
1 parent cbc7555 commit d23f269

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

resources/assets/component.js

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -991,8 +991,8 @@ window.ComponentLine = class {
991991
makeFoot(foot) {
992992
let tfoot = document.createElement('tfoot');
993993
tfoot.className = 'dlp-tfoot';
994+
tfoot.insertAdjacentHTML('afterbegin', `<tr class="dlp-tr"></tr>`);
994995
if (!this.OPTIONS.insert) {
995-
tfoot.insertAdjacentHTML('afterbegin', `<tr class="dlp-tr"></tr>`);
996996
this.TABLE_DOM.appendChild(tfoot);
997997
return;
998998
}
@@ -1303,17 +1303,15 @@ window.ComponentPlane = class {
13031303
}
13041304

13051305
makeModal() {
1306-
let width;
1307-
if (this.OPTIONS.w.toString().indexOf('.') !== -1) {
1308-
width = (window.innerWidth * this.OPTIONS.w) + 'px';
1309-
} else {
1310-
width = this.OPTIONS.w;
1311-
}
1312-
let height;
1313-
if (this.OPTIONS.h.toString().indexOf('.') !== -1) {
1314-
height = (window.innerHeight * this.OPTIONS.h) + 'px';
1315-
} else {
1316-
height = this.OPTIONS.h;
1306+
let width = this.OPTIONS.w;
1307+
if (this.OPTIONS.w.toString().indexOf('px') === -1 || this.OPTIONS.w.toString().indexOf('%') === -1) {
1308+
width = window.innerWidth * this.OPTIONS.w - 18;
1309+
width += 'px';
1310+
}
1311+
let height = this.OPTIONS.h;
1312+
if (this.OPTIONS.h.toString().indexOf('px') === -1 || this.OPTIONS.h.toString().indexOf('%') === -1) {
1313+
height = window.innerHeight * this.OPTIONS.h - 25;
1314+
height += 'px';
13171315
}
13181316
let margin = this.OPTIONS.top + ' ' + this.OPTIONS.left;
13191317
let html = `<div id="dlp-plane" class="dlp-plane-gauze"><div style="width: ${width};margin: ${margin}"><div class="dlp plane-header"></div><div class="plane-body dlp-scroll" style="height:${height};"></div></div></div>`;

0 commit comments

Comments
 (0)