5 changed files with 104 additions and 11 deletions
-
35src/components/Operator.vue
-
41src/components/Progress.vue
-
19src/pages/Home.vue
-
3src/store/index.js
-
17src/store/modules/operator.js
@ -1,7 +1,8 @@ |
|||||
import { createPinia } from 'pinia' |
import { createPinia } from 'pinia' |
||||
import { useTestStore } from './modules/test' |
import { useTestStore } from './modules/test' |
||||
import { useSettingStore } from './modules/setting' |
import { useSettingStore } from './modules/setting' |
||||
|
import { useOperatorStore } from './modules/operator' |
||||
const store = createPinia() |
const store = createPinia() |
||||
|
|
||||
export default store |
export default store |
||||
export { useTestStore, useSettingStore } |
|
||||
|
export { useTestStore, useSettingStore, useOperatorStore } |
@ -0,0 +1,17 @@ |
|||||
|
import { defineStore } from 'pinia' |
||||
|
export const useOperatorStore = defineStore({ |
||||
|
id: 'operator', // id必填,且需要唯一
|
||||
|
// state
|
||||
|
state: () => { |
||||
|
return { |
||||
|
// 是否开始消毒
|
||||
|
disinfectStatus: false, |
||||
|
} |
||||
|
}, |
||||
|
// actions
|
||||
|
actions: { |
||||
|
updateDisinfectStatus(val) { |
||||
|
this.disinfectStatus = val |
||||
|
}, |
||||
|
}, |
||||
|
}) |
Write
Preview
Loading…
Cancel
Save
Reference in new issue