多监测点修改
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { reactive } from 'vue'
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
interface MonitoringPoint {
|
||||
lineId: string
|
||||
lineName: string
|
||||
@@ -21,9 +20,7 @@ export const useMonitoringPoint = defineStore(
|
||||
state[key] = val
|
||||
}
|
||||
const setShowCheckBox = (val: boolean) => {
|
||||
if (!val) {
|
||||
state.lineIds = []
|
||||
} else {
|
||||
if (val && state.lineIds.length === 0) {
|
||||
state.lineIds = [state.lineId]
|
||||
}
|
||||
state.showCheckBox = val
|
||||
@@ -31,6 +28,8 @@ export const useMonitoringPoint = defineStore(
|
||||
return { state, setValue, setShowCheckBox }
|
||||
},
|
||||
{
|
||||
persist: true
|
||||
persist: {
|
||||
paths: ['state.lineId', 'state.lineName']
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user