调整控制器结构

This commit is contained in:
Harvey Zack committed 2018-11-22 19:19:20 +08:00
1 parent cce1eda7eb
commit a380836d75
21 files changed
+1152 -1422

No files matched your search

@@ -24,6 +24,9 @@ export default function componentMethod(art, parent, target, component, callback
const { proxy } = art.events;
const option = typeof component === 'function' ? component(art) : component;
if (!option.disable) {
if (parent.id === undefined) {
parent.id = 0;
}
parent.id += 1;
const name = option.name || `${title}${parent.id}`;
const $element = document.createElement('div');
+11
View File
@@ -118,3 +118,14 @@ export function debounce(func, wait, context) {
return fn;
}
export function show(target, display) {
target.classList.remove('art-hide');
if (display) {
target.style.display = display;
}
}
export function hide(target) {
target.classList.add('art-hide');
}