blob: fffb1cabb6d7e4d15eeb7cab2222e1383d26e42b [file] [log] [blame]
Yoshie Muranaka3be801a2020-04-21 11:34:56 -07001const LoadingBarMixin = {
Mateusz Gapski471f2e02020-07-27 14:43:26 +02002 data() {
3 return {
4 loading: true
5 };
6 },
Yoshie Muranaka3be801a2020-04-21 11:34:56 -07007 methods: {
8 startLoader() {
9 this.$root.$emit('loader::start');
Mateusz Gapski471f2e02020-07-27 14:43:26 +020010 this.loading = true;
Yoshie Muranaka3be801a2020-04-21 11:34:56 -070011 },
12 endLoader() {
13 this.$root.$emit('loader::end');
Mateusz Gapski471f2e02020-07-27 14:43:26 +020014 this.loading = false;
Yoshie Muranaka3be801a2020-04-21 11:34:56 -070015 },
16 hideLoader() {
17 this.$root.$emit('loader::hide');
18 }
19 }
20};
21
22export default LoadingBarMixin;