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