fix: 修改类型错误的问题

This commit is contained in:
奔跑的面条
2022-11-02 19:30:47 +08:00
parent 7fcfb953bd
commit 0e1ae71b78
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ let content = ref('')
// 从sessionStorage 获取数据
function getDataBySession() {
const localStorageInfo: ChartEditStorageType = getSessionStorageInfo() as ChartEditStorageType
const localStorageInfo: ChartEditStorageType = getSessionStorageInfo() as unknown as ChartEditStorageType
content.value = JSON.stringify(localStorageInfo, undefined, 2)
}
getDataBySession()
+1 -1
View File
@@ -49,7 +49,7 @@ const storageList: ChartEditStorageType[] = getSessionStorage(
StorageEnum.GO_CHART_STORAGE_LIST
)
const localStorageInfo = await getSessionStorageInfo() as ChartEditStorageType
const localStorageInfo = await getSessionStorageInfo() as unknown as ChartEditStorageType
// @ts-ignore
if(localStorageInfo.isRelease === false) {
+1 -1
View File
@@ -12,7 +12,7 @@ import { ref } from 'vue'
import Preview from './index.vue'
let key = ref(Date.now())
let localStorageInfo: ChartEditStorageType = getSessionStorageInfo() as ChartEditStorageType
let localStorageInfo: ChartEditStorageType = getSessionStorageInfo() as unknown as ChartEditStorageType
// 数据变更 -> 同步sessionStorage -> reload页面 (重新执行Mounted
;[SavePageEnum.JSON, SavePageEnum.CHART].forEach((saveEvent: string) => {