mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
feat: 预览采用pinia驱动
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import { getSessionStorage } from '@/utils'
|
||||
import { StorageEnum } from '@/enums/storageEnum'
|
||||
import { ChartEditStorage } from '@/store/modules/chartEditStore/chartEditStore.d'
|
||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||
|
||||
const chartEditStore = useChartEditStore()
|
||||
export interface ChartEditStorageType extends ChartEditStorage {
|
||||
id: string
|
||||
}
|
||||
@@ -16,11 +18,14 @@ export const getSessionStorageInfo = () => {
|
||||
StorageEnum.GO_CHART_STORAGE_LIST
|
||||
)
|
||||
|
||||
if(!storageList) return
|
||||
|
||||
for (let i = 0; i < storageList.length; i++) {
|
||||
if (id.toString() === storageList[i]['id']) {
|
||||
return storageList[i]
|
||||
if (storageList) {
|
||||
for (let i = 0; i < storageList.length; i++) {
|
||||
if (id.toString() === storageList[i]['id']) {
|
||||
const { editCanvasConfig, requestGlobalConfig, componentList } = storageList[i]
|
||||
chartEditStore.editCanvasConfig = editCanvasConfig
|
||||
chartEditStore.requestGlobalConfig = requestGlobalConfig
|
||||
chartEditStore.componentList = componentList
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user