You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

progressBarStore.ts 444B

123456789101112131415161718192021222324
  1. import { defineStore } from 'pinia'
  2. //异步写法
  3. type Result = {
  4. name: string,
  5. isChu: boolean
  6. }
  7. export const progressBarStore = defineStore('progressBar', {
  8. state: () => ({
  9. user: <Result>{},
  10. show: true, //是否展示
  11. progress: 10 //进度
  12. }),
  13. //类似于computed 可以帮我们去修饰我们的值
  14. getters: {
  15. },
  16. //可以操作异步 和 同步提交state
  17. actions: {
  18. }
  19. })