sharedState.js 302 B

123456789101112131415
  1. import { defineStore } from 'pinia'
  2. export const useSharedState = defineStore('sharedState', {
  3. state: () => ({
  4. layoutClickCount: 0
  5. }),
  6. actions: {
  7. increment() {
  8. this.layoutClickCount++
  9. }
  10. // setMessage(message) {
  11. // this.message = this.message + message
  12. // }
  13. }
  14. })