App.vue 342 B

12345678910111213141516171819
  1. <template>
  2. <router-view :class="[mode]" />
  3. </template>
  4. <script>
  5. import Vue from 'vue';
  6. import config from '@/config/style';
  7. export default Vue.extend({
  8. computed: {
  9. mode() {
  10. return this.$store.getters['setting/mode'];
  11. },
  12. },
  13. mounted() {
  14. this.$store.dispatch('setting/changeTheme', { ...config });
  15. },
  16. });
  17. </script>