使用Pinia代替Vuex进行数据存储

This commit is contained in:
RuoYi
2022-05-29 21:40:32 +08:00
parent 6f359c1534
commit 44ad220cdd
30 changed files with 479 additions and 623 deletions

View File

@ -11,11 +11,13 @@
</template>
<script setup>
let store = useStore()
import useTagsViewStore from '@/store/modules/tagsview'
const tagsViewStore = useTagsViewStore()
const route = useRoute()
store.dispatch('tagsView/addCachedView', route)
tagsViewStore.addCachedView(route)
const cachedViews = computed(() => {
return store.state.tagsView.cachedViews
return tagsViewStore.cachedViews
})
</script>