Skip to content

Commit f615ef6

Browse files
author
hikki
committed
v3.6
1 parent 62e5f0a commit f615ef6

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

resources/assets/component.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@
123123
display: flex!important;
124124
border-radius: 3px;
125125
color: #ffffff;
126+
border: 1px solid #1e1e1e;
126127
}
127128
.dlp-dot-menu-select>div:first-child{
128129
width: 100%;

resources/assets/component.js

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,8 @@ window.ComponentLine = class {
859859

860860
makeHeadFoot() {
861861
let head = '<tr class="dlp-tr">';
862-
let foot = '<tr class="dlp-tr">';
862+
let foot = document.createElement('tr');
863+
foot.className = 'dlp-tr';
863864
let columns = this.COLUMNS;
864865
for (let column in columns) {
865866
if (!columns.hasOwnProperty(column)) continue;
@@ -872,10 +873,13 @@ window.ComponentLine = class {
872873
let insert_type = val.insert_type ? val.insert_type : val.type;
873874
switch (insert_type) {
874875
case 'input':
875-
foot += `<th ${style}><input class="dlp dlp-input" data-column="${column}" placeholder=":${val.name}"/></th>`;
876+
foot.insertAdjacentHTML('beforeend',`<th ${style}><input class="dlp dlp-input" data-column="${column}" placeholder=":${val.name}"/></th>`);
876877
break;
877878
case 'select':
878-
879+
let td = document.createElement('td');
880+
td.style = val.style;
881+
td.append(this.menuMake([],val.options,val.options_limit,val.name));
882+
foot.append(td);
879883
break;
880884
case 'datetime':
881885
let format;
@@ -892,19 +896,19 @@ window.ComponentLine = class {
892896
}
893897
this.format_settings[column] = format;
894898
style = val.style ? `${val.style}` : '';
895-
foot += `<th style="position: relative;overflow: unset;${style}"><input class="dlp dlp-input datetime-${column}" data-column="${column}"/></th>`;
899+
foot.insertAdjacentHTML('beforeend',`<th style="position: relative;overflow: unset;${style}"><input class="dlp dlp-input datetime-${column}" data-column="${column}"/></th>`);
896900
break;
897901
case 'hidden':
898-
foot += `<th><input data-column="${column}" type="hidden"/></th>`;
902+
foot.insertAdjacentHTML('beforeend',`<th><input data-column="${column}" type="hidden"/></th>`);
899903
break;
900904
default:
901905
this.COLUMNS[column].insert_type = 'input';
902-
foot += `<th ${style}><input class="dlp dlp-input" data-column="${column}" placeholder=":${val.name}"/></th>`;
906+
foot.insertAdjacentHTML('beforeend',`<th ${style}><input class="dlp dlp-input" data-column="${column}" placeholder=":${val.name}"/></th>`);
903907
break;
904908
}
905909
}
906910
head += '<th class="operate-column" style="width: 48px;"></th></tr>';
907-
foot += '<th class="insert_handel operate-column" style="width: 48px;"></th></tr>';
911+
foot.insertAdjacentHTML('beforeend','<th class="insert_handel operate-column" style="width: 48px;"></th></tr>');
908912

909913
this.DOM.insertAdjacentHTML('afterbegin', `<table class="dlp dlp-table" style="height: 100%"><thead class="dlp-thead">${head}</thead></table>`);
910914
this.TABLE_DOM = this.DOM.getElementsByTagName('table')[0];
@@ -963,7 +967,7 @@ window.ComponentLine = class {
963967
this.TABLE_DOM.appendChild(tfoot);
964968
return;
965969
}
966-
tfoot.insertAdjacentHTML('afterbegin', foot);
970+
tfoot.append(foot);
967971
this.TABLE_DOM.appendChild(tfoot);
968972
/*insert action*/
969973
let i = document.createElement('i');

0 commit comments

Comments
 (0)