|
123456789101112131415161718192021222324 |
- import { defineStore } from 'pinia'
-
- //异步写法
- type Result = {
- name: string,
- isChu: boolean
- }
-
- export const progressBarStore = defineStore('progressBar', {
- state: () => ({
- user: <Result>{},
- show: true, //是否展示
- progress: 10 //进度
- }),
- //类似于computed 可以帮我们去修饰我们的值
- getters: {
-
- },
- //可以操作异步 和 同步提交state
- actions: {
-
- }
-
- })
|