Pinia可以直接修改state的值吗?

290 阅读1分钟

先说结论:当然可以!

根据官网最新文档

image.png

可以通过 store 实例访问 state,直接对其进行读写。

image.png

官网链接