使用Pinia代替Vuex进行数据存储
This commit is contained in:
@ -16,6 +16,7 @@
|
||||
<script setup>
|
||||
import variables from '@/assets/styles/variables.module.scss'
|
||||
import logo from '@/assets/logo/logo.png'
|
||||
import useSettingsStore from '@/store/modules/settings'
|
||||
|
||||
defineProps({
|
||||
collapse: {
|
||||
@ -25,8 +26,8 @@ defineProps({
|
||||
})
|
||||
|
||||
const title = ref('若依管理系统');
|
||||
const store = useStore();
|
||||
const sideTheme = computed(() => store.state.settings.sideTheme);
|
||||
const settingsStore = useSettingsStore();
|
||||
const sideTheme = computed(() => settingsStore.sideTheme);
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
Reference in New Issue
Block a user