Refactor Setting class to update range values and append items

This commit is contained in:
Harvey Zack committed 2024-10-20 14:46:40 +08:00
1 parent d678378119
commit fbfee926ca
7 files changed
+58 -18

No files matched your search

+7 -3
View File
@@ -114,9 +114,13 @@ export default class Component {
const list = option.selector
.map(
(item, index) =>
`<div class="art-selector-item ${item.default ? 'art-current' : ''}" data-index="${index}">${
item.html
}</div>`,
`<div
class="art-selector-item ${item.default ? 'art-current' : ''}"
data-index="${index}"
data-value="${item.value}"
>
${item.html}
</div>`,
)
.join('');
const $list = createElement('div');