appInfoStore.js 301 B

123456789101112131415161718192021
  1. import {
  2. defineStore
  3. } from 'pinia'
  4. export const useAppInfoStore = defineStore('appInfo', {
  5. state: () => {
  6. return {
  7. appId: '',
  8. version: ''
  9. }
  10. },
  11. actions: {
  12. updateAppId(appId) {
  13. this.appId = appId
  14. },
  15. updateVersion(version) {
  16. this.version = version
  17. }
  18. },
  19. unistorage: true
  20. })