鸿蒙智能电子锁前端项目
whychdw
2024-11-27 393eceedc6ed2382fe60901294f978b73f709fa4
src/layout/index.vue
@@ -22,6 +22,7 @@
import { mapState } from 'pinia';
import store from '@/store';
import { defineComponent } from 'vue';
import changeTheme from '@/utils/changeTheme.js';
export default defineComponent({
  name: 'LayoutIndex',
@@ -33,10 +34,16 @@
    Sidebar,
    TagsView
  },
  watch: {
    theme() {
      changeTheme(this.theme);
    }
  },
  mixins: [ResizeMixin],
  computed: {
    ...mapState(store.app, ['sidebar', 'device']),
    ...mapState(store.settings, {
      theme: 'theme',
      showSettings: 'showSettings',
      needTagsView: 'tagsView',
      fixedHeader: 'fixedHeader'
@@ -54,13 +61,19 @@
    handleClickOutside() {
      store.app().closeSidebar({ withoutAnimation: false });
    }
  },
  beforeMount() {
    changeTheme(this.theme);
  },
  mounted() {
  }
});
</script>
<style lang="scss" scoped>
@import "@/styles/mixin.scss";
// @import "@/styles/variables.module.scss";
@import "@/styles/element/index.scss";
.app-wrapper {
  @include clearfix;