This commit is contained in:
Harvey authored and Harvey Zack committed 2022-02-11 11:20:54 +08:00
1 parent aaa5934790
commit 1101ce0ba9
4 files changed
+35 -7

No files matched your search

+16 -2
View File
@@ -31,12 +31,26 @@ export default class Setting extends Component {
}
creatItme(item) {
const { icons } = this.art;
const {
icons,
events: { proxy },
} = this.art;
const $item = document.createElement('div');
addClass($item, 'art-setting-item');
append($item, `<div class="art-setting-item-left">${item.html}</div>`);
const $right = append($item, `<div class="art-setting-item-right"></div>`);
append($right, icons.arrowRight);
if (item.items && item.items.length) {
append($right, icons.arrowRight);
}
if (typeof item.click === 'function') {
proxy($item, 'click', (event) => {
item.click.call(this.art, event);
});
}
return $item;
}