谐波监测点
This commit is contained in:
24
src/stores/monitoringPoint.ts
Normal file
24
src/stores/monitoringPoint.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { reactive } from 'vue'
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
interface MonitoringPoint {
|
||||
lineId: string
|
||||
lineName: string
|
||||
}
|
||||
|
||||
export const useMonitoringPoint = defineStore(
|
||||
'monitoringPoint',
|
||||
() => {
|
||||
const state: MonitoringPoint = reactive({
|
||||
lineId: '',
|
||||
lineName: '',
|
||||
})
|
||||
const setValue = (key: keyof MonitoringPoint, val: any) => {
|
||||
state[key] = val
|
||||
}
|
||||
return { state, setValue }
|
||||
},
|
||||
{
|
||||
persist: true
|
||||
}
|
||||
)
|
||||
Reference in New Issue
Block a user