adjustment

This commit is contained in:
2024-01-19 15:47:42 +08:00
parent feec8b59a7
commit 3d9c5bd3f2
9 changed files with 63 additions and 54 deletions

View File

@ -284,6 +284,8 @@ export class Dropdown {
const html = item[htmlkey];
if (html instanceof HTMLElement) {
this._var.label.replaceChildren(html.cloneNode(true));
} else if (typeof html === 'string') {
this._var.label.innerHTML = html;
} else {
let text = item[textkey];
if (nullOrEmpty(text)) {
@ -462,6 +464,9 @@ export class Dropdown {
const html = item[htmlkey];
if (html instanceof HTMLElement) {
label = html;
} else if (typeof html === 'string') {
label = createElement('span');
label.innerHTML = html;
}
if (multiselect) {
const selected = selectedlist.some(s => s[valuekey] === val);