This commit is contained in:
Harvey Zack committed 2018-10-17 20:52:13 +08:00
1 parent 5f6febce42
commit b2159e7d4d
9 files changed
+64 -61

No files matched your search

+4 -7
View File
@@ -1,4 +1,5 @@
import Icons from './icons';
import icons from './icons';
import { append } from './utils';
export default class Loading {
constructor(art) {
@@ -9,13 +10,9 @@ export default class Loading {
init() {
const { option, refs: { $loading } } = this.art;
if (option.loading) {
if (option.loading instanceof Element) {
$loading.appendChild(option.loading);
} else {
$loading.innerHTML = option.loading;
}
append($loading, option.loading);
} else {
$loading.appendChild(Icons.loading);
append($loading, icons.loading);
}
}