feat: 新增预览页

This commit is contained in:
mtruning
2022-03-06 02:08:14 +08:00
parent 6f74838e1e
commit bea36accff
13 changed files with 172 additions and 38 deletions
+36
View File
@@ -0,0 +1,36 @@
<template>
<div class="go-preview">
<h1>预览</h1>
</div>
</template>
<script setup lang="ts">
import { getLocalStorage, fetchRouteParams } from '@/utils'
import { StorageEnum } from '@/enums/storageEnum'
const init = () => {
const routeParamsRes = fetchRouteParams()
if (!routeParamsRes) return
const { id } = routeParamsRes
const storageList = getLocalStorage(StorageEnum.GO_CHART_STORAGE_LIST)
for (let i = 0; i < storageList.length; i++) {
if (id.toString() === storageList[i]['id']) {
console.log(storageList[i]);
break;
}
}
}
init()
</script>
<style lang="scss" scoped>
@include go("preview") {
height: 100vh;
width: 100vw;
overflow: hidden;
@include background-image("background-image");
}
</style>