UITable: Add h3
This commit is contained in:
parent
e21d6ffc37
commit
1a214bf8c5
1 changed files with 6 additions and 3 deletions
|
@ -12,15 +12,18 @@ class UITable extends AbstractUIItem {
|
||||||
|
|
||||||
this.emel = new Emel().emel;
|
this.emel = new Emel().emel;
|
||||||
|
|
||||||
|
const preamble = `h3{${def.name}}`;
|
||||||
|
let result;
|
||||||
switch(typeof def.content) {
|
switch(typeof def.content) {
|
||||||
case "string":
|
case "string":
|
||||||
this.el.replaceChildren(this.emel(`table>(thead>tr>th{Peer}+th{Value})+tbody`))
|
result = this.emel(`${preamble}+table>(thead>tr>th{Peer}+th{Value})+tbody`);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
this.el.replaceChildren(this.emel(`table>(thead>tr>th{Peer}+${
|
result = this.emel(`${preamble}+table>(thead>tr>th{Peer}+${
|
||||||
Object.keys(def.content).map(header => `th{${header}}`).join("+")
|
Object.keys(def.content).map(header => `th{${header}}`).join("+")
|
||||||
})+tbody`));
|
})+tbody`);
|
||||||
}
|
}
|
||||||
|
this.el.replaceChildren(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
clear() {
|
clear() {
|
||||||
|
|
Loading…
Reference in a new issue