sharedState.js 308 B

12345678910111213141516
  1. import { defineStore } from 'pinia'
  2. export const useSharedState = defineStore('sharedState', {
  3. state: () => ({
  4. layoutClickCount: 0,
  5. payCodeList: [],
  6. }),
  7. actions: {
  8. increment() {
  9. this.layoutClickCount++
  10. },
  11. setPayCodeList(arr) {
  12. this.payCodeList = arr || []
  13. }
  14. }
  15. })