Files
front-pc/pages/editor-view/index.vue

30 lines
743 B
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<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>