23 lines
515 B
JavaScript
23 lines
515 B
JavaScript
|
|
import { defineStore } from 'pinia'
|
||
|
|
|
||
|
|
export const useFlowStore = defineStore('flow', {
|
||
|
|
state: () => ({
|
||
|
|
disableForm: false,
|
||
|
|
deviceList: []
|
||
|
|
}),
|
||
|
|
actions: {
|
||
|
|
updateDisableForm(value) {
|
||
|
|
this.disableForm = value
|
||
|
|
},
|
||
|
|
|
||
|
|
async getDeviceList() {
|
||
|
|
const data = await new Promise((resolve, reject) => {
|
||
|
|
resolve( ['cam1', 'cam2', 'cam3', 'cam4'])
|
||
|
|
})
|
||
|
|
this.deviceList = data
|
||
|
|
return data
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
)
|