佳简诚锄

关注

vue中store的使用

佳简诚锄

关注

阅读 46

2023-09-24

// import { useStore } from "vuex";

// let store = useStore();

一直都是这么使用,但是最近出bug才知道这么使用的弊端

store.commit 会报commit undefined错误,最后的解决方法是吧

import store from '../store/index'

直接导入使用。

真难受,这个bug

相关推荐

一葉_code

vue中的store

一葉_code 9 0 0

钎探穗

vue3中使用route、router、store的方式

钎探穗 71 0 0

谷中百合517

Vue中this.$store.dispatch() 与 this.$store.commit()的区别

谷中百合517 154 0 0

Hyggelook

如何在Vue组件中访问Vuex store中的状态?

Hyggelook 38 0 0

在觉

Vue 简单的 store 模式

在觉 63 0 0

花明

vue 全局状态管理(简单的store模式、使用Pinia)

花明 51 0 0

千白莫

vue 简单的状态管理store

千白莫 49 0 0

爱喝酒的幸福人

vue3+ts中使用this.$store报错Property ‘$store‘ does not exist on type

爱喝酒的幸福人 320 0 0

时光已翩然轻擦

ExtJs中Store的种类

时光已翩然轻擦 55 0 0

慕容冲_a4b8

【Vuex中Store】

慕容冲_a4b8 49 0 0

精彩评论(0)

0 0 举报