refactor: simplify DocDialog and move documentation to markdown body

Simplify the `DocDialog` component by removing hardcoded property
tables and syntax blocks. Instead, rely on the raw markdown body
provided in the `DocEntry` to render documentation content. This
shifts the responsibility of formatting (syntax, props, etc.) from
the component to the individual markdown files, allowing for more
flexible and detailed documentation.
This commit is contained in:
2026-07-13 15:29:08 +08:00
parent 7cb28e631e
commit 99dd49b077
20 changed files with 362 additions and 316 deletions
+13 -15
View File
@@ -2,22 +2,12 @@
tag: md-font
icon: 🔤
title: 字体组件
description: 设置整个文档的字体和文字颜色,支持 Google Fonts、emfont 和系统本地字体三种来源。
syntax: ':md-font[Noto Sans SC]{source="google" weight="400" color="#ff00dd"}'
props:
- name: source
type: google | emfont | local
default: local
desc: 字体来源
- name: weight
type: string
default: '"400"'
desc: 字体粗细
- name: color
type: string
desc: 文字颜色(CSS 颜色值,如 #ff00dd、rgb(255,0,0))
---
设置整个文档的字体和文字颜色,支持 Google Fonts、emfont 和系统本地字体三种来源。
**语法:** `:md-font[字体名]{选项}`
**Google 字体:**
:md-font[Noto Sans SC]{source="google"}
@@ -34,6 +24,14 @@ props:
字体和颜色将应用到整个文档卡片。
## 属性
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| `source` | `google` \| `emfont` \| `local` | `local` | 字体来源 |
| `weight` | string | `"400"` | 字体粗细 |
| `color` | string | — | 文字颜色(CSS 颜色值,如 `#ff00dd`、`rgb(255,0,0)`) |
## 使用场景
用于切换文档的显示字体和文字颜色,适配不同风格需求。
用于切换文档的显示字体和文字颜色,适配不同风格需求。