CMVR-IOT-UI/src/store/modules/flow.js

23 lines
515 B
JavaScript
Raw Normal View History

2025-08-21 14:11:58 +08:00
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
}
}
}
)