You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
vite-vue3-lowcode/src/App.vue

30 lines
742 B

4 years ago
<template>
<el-config-provider :locale="locale">
<router-view #="{ Component, route }">
<component :is="Component" :key="route.path" />
</router-view>
</el-config-provider>
4 years ago
</template>
<script setup lang="ts">
import { provide } from 'vue'
import zhCn from 'element-plus/lib/locale/lang/zh-cn'
import { initVisualData, injectKey, localKey } from '@/visual-editor/hooks/useVisualData'
4 years ago
const visualData = initVisualData()
// 注入可视化编辑器所有配置
provide(injectKey, visualData)
const { jsonData } = visualData
4 years ago
const locale = zhCn
window.addEventListener('beforeunload', () => {
sessionStorage.setItem(localKey, JSON.stringify(jsonData))
4 years ago
})
</script>
<style lang="scss">
@import 'style/common';
</style>