Refactor code structure and remove redundant changes
This commit is contained in:
29
pages/editor-view/index.vue
Normal file
29
pages/editor-view/index.vue
Normal file
@ -0,0 +1,29 @@
|
||||
<template>
|
||||
<KlNavTab active="" :type="1" />
|
||||
<div class="editor-view">
|
||||
<div class="rich-content" v-html="decodedContent"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useRoute } from 'vue-router'
|
||||
import { computed } from 'vue'
|
||||
|
||||
// 获取路由参数
|
||||
const route = useRoute()
|
||||
// 假设内容通过query参数传递,如 /editor-view?content=xxx
|
||||
const content = computed(() => (route.query.content as string) || '')
|
||||
|
||||
// 解码(如果需要)
|
||||
const decodedContent = computed(() => decodeURIComponent(content.value))
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.rich-content {
|
||||
/* 可根据需要自定义样式 */
|
||||
padding: 16px;
|
||||
background: #fff;
|
||||
border-radius: 8px;
|
||||
min-height: 200px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user