start grid

This commit is contained in:
2023-04-02 23:54:41 +08:00
parent 4e230ed7e7
commit c44aaf5177
8 changed files with 649 additions and 25 deletions

View File

@ -14,8 +14,7 @@ function fillCheckbox(container, type, label) {
}
}
function createCheckbox(opts) {
opts ??= {};
function createCheckbox(opts = {}) {
const container = document.createElement('label');
container.className = 'checkbox-wrapper';
const input = document.createElement('input');
@ -56,8 +55,7 @@ function createCheckbox(opts) {
return container;
}
function resolveCheckbox(container, legacy) {
container ??= document.body;
function resolveCheckbox(container = document.body, legacy) {
if (legacy) {
const checks = container.querySelectorAll('input[type="checkbox"]');
for (let chk of checks) {