Skip to content

Commit 41df326

Browse files
committed
add loader action
1 parent 823f6d9 commit 41df326

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

src/layouts/img/loader.gif

6.65 KB
Loading

src/layouts/web-frame.vue

+20-3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ export default {
3232
overlay: null
3333
};
3434
},
35+
created() {
36+
window.addEventListener('load', () => {
37+
$('#loader').fadeOut(350);
38+
});
39+
},
3540
mounted() {
3641
this.overlay = document.querySelector('#wrapper > .header_overlay');
3742
},
@@ -72,9 +77,6 @@ export default {
7277
}
7378
}
7479
75-
//
76-
// Overlay
77-
//
7880
.header_overlay {
7981
display: none;
8082
background-color: rgba($black, 0.8);
@@ -85,4 +87,19 @@ export default {
8587
left: 0;
8688
z-index: 19997;
8789
}
90+
91+
#loader {
92+
background: {
93+
color: $_color-base;
94+
image: url("./img/loader.gif");
95+
repeat: no-repeat;
96+
position: 50% 50%;
97+
}
98+
width: 100%;
99+
height: 100%;
100+
position: fixed;
101+
top: 0;
102+
left: 0;
103+
z-index: 10000;
104+
}
88105
</style>

0 commit comments

Comments
 (0)