1const LoadingBarMixin = {
2  data() {
3    return {
4      loading: true
5    };
6  },
7  methods: {
8    startLoader() {
9      this.$root.$emit('loader::start');
10      this.loading = true;
11    },
12    endLoader() {
13      this.$root.$emit('loader::end');
14      this.loading = false;
15    },
16    hideLoader() {
17      this.$root.$emit('loader::hide');
18    }
19  }
20};
21
22export default LoadingBarMixin;
23