@@ -859,7 +859,8 @@ window.ComponentLine = class {
859
859
860
860
makeHeadFoot ( ) {
861
861
let head = '<tr class="dlp-tr">' ;
862
- let foot = '<tr class="dlp-tr">' ;
862
+ let foot = document . createElement ( 'tr' ) ;
863
+ foot . className = 'dlp-tr' ;
863
864
let columns = this . COLUMNS ;
864
865
for ( let column in columns ) {
865
866
if ( ! columns . hasOwnProperty ( column ) ) continue ;
@@ -872,10 +873,13 @@ window.ComponentLine = class {
872
873
let insert_type = val . insert_type ? val . insert_type : val . type ;
873
874
switch ( insert_type ) {
874
875
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>` ) ;
876
877
break ;
877
878
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 ) ;
879
883
break ;
880
884
case 'datetime' :
881
885
let format ;
@@ -892,19 +896,19 @@ window.ComponentLine = class {
892
896
}
893
897
this . format_settings [ column ] = format ;
894
898
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>` ) ;
896
900
break ;
897
901
case 'hidden' :
898
- foot += `<th><input data-column="${ column } " type="hidden"/></th>` ;
902
+ foot . insertAdjacentHTML ( 'beforeend' , `<th><input data-column="${ column } " type="hidden"/></th>` ) ;
899
903
break ;
900
904
default :
901
905
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>` ) ;
903
907
break ;
904
908
}
905
909
}
906
910
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>') ;
908
912
909
913
this . DOM . insertAdjacentHTML ( 'afterbegin' , `<table class="dlp dlp-table" style="height: 100%"><thead class="dlp-thead">${ head } </thead></table>` ) ;
910
914
this . TABLE_DOM = this . DOM . getElementsByTagName ( 'table' ) [ 0 ] ;
@@ -963,7 +967,7 @@ window.ComponentLine = class {
963
967
this . TABLE_DOM . appendChild ( tfoot ) ;
964
968
return ;
965
969
}
966
- tfoot . insertAdjacentHTML ( 'afterbegin' , foot ) ;
970
+ tfoot . append ( foot ) ;
967
971
this . TABLE_DOM . appendChild ( tfoot ) ;
968
972
/*insert action*/
969
973
let i = document . createElement ( 'i' ) ;
0 commit comments