feat: 修改vuex为pinia

修改vuex为pinia
This commit is contained in:
zc
2021-12-25 13:26:12 +08:00
parent d53c13ecba
commit 41cba750b5
17 changed files with 179 additions and 239 deletions

View File

@@ -13,15 +13,13 @@
<script lang="ts">
import {defineComponent} from "vue";
import {useStore} from '@/store'
import {useRoute} from "vue-router";
import {tagsViewStoreHook} from '@/store/modules/tagsView'
export default defineComponent({
setup() {
const store = useStore()
const route = useRoute()
const cachedViews = () => {
return store.state.tagsView.cachedViews
return tagsViewStoreHook().cachedViews
}
const key = () => {
return route.path
@@ -68,4 +66,4 @@ export default defineComponent({
padding-right: 15px;
}
}
</style>
</style>