diff --git a/src/components/Steps.vue b/src/components/Steps.vue new file mode 100644 index 0000000..b9f0688 --- /dev/null +++ b/src/components/Steps.vue @@ -0,0 +1,88 @@ + + + + + diff --git a/src/components/Tabs.vue b/src/components/Tabs.vue new file mode 100644 index 0000000..f7b33f3 --- /dev/null +++ b/src/components/Tabs.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/src/components/operation/LiquidInjection.vue b/src/components/operation/LiquidInjection.vue new file mode 100644 index 0000000..ffa9f3a --- /dev/null +++ b/src/components/operation/LiquidInjection.vue @@ -0,0 +1,15 @@ + + + + + diff --git a/src/pages/Home.vue b/src/pages/Home.vue index b002cbf..55757aa 100644 --- a/src/pages/Home.vue +++ b/src/pages/Home.vue @@ -4,14 +4,19 @@
-
- +
+ + + +
diff --git a/src/store/index.js b/src/store/index.js index c149d67..cb7a900 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1,6 +1,7 @@ import { createPinia } from 'pinia' -import { useCountStore } from './modules/count' +import { useWebSocketStore } from './modules/websocket' +import { useTabStore } from './modules/tab' const store = createPinia() export default store -export { useCountStore } +export { useWebSocketStore, useTabStore } diff --git a/src/store/modules/count.js b/src/store/modules/count.js deleted file mode 100644 index d2d6ec3..0000000 --- a/src/store/modules/count.js +++ /dev/null @@ -1,27 +0,0 @@ -import { defineStore } from 'pinia' -export const useCountStore = defineStore({ - id: 'count', // id必填,且需要唯一 - // state - state: () => { - return { - count: 0, - } - }, - // getters - getters: { - doubleCount: state => { - return state.count * 2 - }, - }, - // actions - actions: { - // actions 同样支持异步写法 - countAdd() { - // 可以通过 this 访问 state 中的内容 - this.count++ - }, - countReduce() { - this.count-- - }, - }, -}) diff --git a/src/store/modules/tab.js b/src/store/modules/tab.js new file mode 100644 index 0000000..5b8e16d --- /dev/null +++ b/src/store/modules/tab.js @@ -0,0 +1,17 @@ +import { defineStore } from 'pinia' + +export const useTabStore = defineStore({ + id: 'tab', // id必填,且需要唯一 + // state + state: () => { + return { + activeTab: 1, + } + }, + // actions + actions: { + updateActiveTab(activeTab) { + this.activeTab = activeTab + }, + }, +})