mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
feat: 新增预览页缩放功能
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { getLocalStorage, fetchRouteParams } from '@/utils'
|
||||
import { StorageEnum } from '@/enums/storageEnum'
|
||||
import { ChartEditStorage } from '@/store/modules/chartEditStore/chartEditStore.d'
|
||||
|
||||
export interface ChartEditStorageType extends ChartEditStorage {
|
||||
id: string
|
||||
}
|
||||
|
||||
export const getLocalStorageInfo: () => ChartEditStorageType | undefined = () => {
|
||||
const routeParamsRes = fetchRouteParams()
|
||||
if (!routeParamsRes) return
|
||||
const { id } = routeParamsRes
|
||||
|
||||
const storageList: ChartEditStorageType[] = getLocalStorage(
|
||||
StorageEnum.GO_CHART_STORAGE_LIST
|
||||
)
|
||||
|
||||
for (let i = 0; i < storageList.length; i++) {
|
||||
if (id.toString() === storageList[i]['id']) {
|
||||
return storageList[i]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user