30 lines
743 B
Vue
30 lines
743 B
Vue
<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>
|