add more event

This commit is contained in:
Harvey Zack committed 2018-10-18 11:17:37 +08:00
1 parent b2159e7d4d
commit 506b34522b
14 files changed
+202 -77

No files matched your search

+7 -7
View File
@@ -9,18 +9,18 @@ export default class Loading {
init() {
const { option, refs: { $loading } } = this.art;
if (option.loading) {
append($loading, option.loading);
} else {
append($loading, icons.loading);
}
append($loading, option.loading || icons.loading);
}
hide() {
this.art.refs.$loading.style.display = 'none';
const { refs: { $loading } } = this.art;
$loading.style.display = 'none';
this.art.emit('loading:hide', $loading);
}
show() {
this.art.refs.$loading.style.display = 'flex';
const { refs: { $loading } } = this.art;
$loading.style.display = 'flex';
this.art.emit('loading:show', $loading);
}
}