From 1e34d0773506d542ddcf914cdcaa94708167d89b Mon Sep 17 00:00:00 2001
From: Mr.Shi <1878285526@qq.com>
Date: 星期二, 22 八月 2023 10:24:55 +0800
Subject: [PATCH] 大屏

---
 screen_standard/src/stores/counter.js |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/screen_standard/src/stores/counter.js b/screen_standard/src/stores/counter.js
index b6757ba..42f01ba 100644
--- a/screen_standard/src/stores/counter.js
+++ b/screen_standard/src/stores/counter.js
@@ -1,12 +1,15 @@
-import { ref, computed } from 'vue'
-import { defineStore } from 'pinia'
+import { computed } from 'vue';
+import { defineStore } from 'pinia';
 
-export const useCounterStore = defineStore('counter', () => {
-  const count = ref(0)
-  const doubleCount = computed(() => count.value * 2)
-  function increment() {
-    count.value++
+export const useCounterStore = defineStore('enterprise', {
+  state: () => {
+    return { count: 0 }
+  },
+  // 涔熷彲浠ュ畾涔変负
+  // state: () => ({ count: 0 })
+  actions: {
+    increment() {
+      this.count++
+    },
   }
-
-  return { count, doubleCount, increment }
 })

--
Gitblit v1.9.3