pinia 两种写法定义pinia 第一种:对象形式 不需要写refstate直接就是响应式数据 import{defineStore}from"pinia" exportconstuseCounterStore=defineStore("useCounterStore",{ state:()=>{ return{ } }, actions:{ }, getters:{ } }) 第二种:匿名函数形式 需要写ref定义state不然不是响应式用了ref在actions和getters中使用的时候就需要.value import{defineStore}from"pinia...

  5OB6i59zi5sb   2023年12月22日   26   0   0 Vue
关注 更多

空空如也 ~ ~

粉丝 更多

空空如也 ~ ~