sync from work
This commit is contained in:
@ -63,6 +63,9 @@ function createCheckbox(opts = {}) {
|
||||
if (opts.className) {
|
||||
container.classList.add(opts.className);
|
||||
}
|
||||
if (opts.enabled === false) {
|
||||
container.classList.add('disabled');
|
||||
}
|
||||
if (opts.checkedNode != null && opts.uncheckedNode != null) {
|
||||
container.classList.add('checkbox-image');
|
||||
let height = opts.imageHeight;
|
||||
@ -120,7 +123,11 @@ function resolveCheckbox(container = document.body, legacy) {
|
||||
} else {
|
||||
text = label.innerText;
|
||||
}
|
||||
label.className = 'checkbox-wrapper';
|
||||
if (chk.disabled) {
|
||||
label.className = 'checkbox-wrapper disabled';
|
||||
} else {
|
||||
label.className = 'checkbox-wrapper';
|
||||
}
|
||||
label.replaceChildren();
|
||||
fillCheckbox(label, 'fa-regular', text);
|
||||
label.insertBefore(chk, label.firstChild);
|
||||
|
Reference in New Issue
Block a user