5 changed files with 46 additions and 5 deletions
-
4src/components/Image.vue
-
2src/components/Task.vue
-
20src/pages/index.vue
-
9src/store/index.js
-
16src/store/modules/camera.js
@ -0,0 +1,16 @@ |
|||
import { defineStore } from 'pinia' |
|||
export const useCameraStore = defineStore({ |
|||
id: 'camera', // id必填,且需要唯一
|
|||
// state
|
|||
state: () => { |
|||
return { |
|||
cameraState: false, |
|||
} |
|||
}, |
|||
// actions
|
|||
actions: { |
|||
updateCameraState(cameraState) { |
|||
this.cameraState = cameraState |
|||
}, |
|||
}, |
|||
}) |
Write
Preview
Loading…
Cancel
Save
Reference in new issue