DCFronted/src/views/index/VersionInfo.vue

42 lines
826 B
Vue
Raw 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>
<div class="version-page">
<div class="page-header">
<h1>版本信息</h1>
<div class="header-subtitle">
<span>当前应用版本{{ appVersion }}</span>
</div>
</div>
<div class="md-content" v-html="mdHtml"></div>
</div>
</template>
<script setup>
import pkg from '../../../package.json'
import { marked } from 'marked'
import versionMd from '@/assets/version.md?raw'
const appVersion = pkg.version || '未知'
const mdHtml = marked.parse(versionMd || '')
</script>
<style scoped>
.page-header {
margin-bottom: 16px;
}
.header-subtitle {
color: #666;
}
.md-content {
line-height: 1.8;
}
.md-content h1, .md-content h2, .md-content h3 {
margin: 12px 0 8px;
}
.md-content p {
margin: 8px 0;
}
.md-content ul, .md-content ol {
padding-left: 20px;
}
</style>