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
+11 -7
View File
@@ -2,21 +2,25 @@
tag: md-dice
icon: 🎲
title: 骰子组件
description: 点击文字执行掷骰,可用于属性检定、伤害投掷等场景。
syntax: ':md-dice[2d6+d8]{key="attack"}'
props:
- name: key
type: string
desc: URL 参数标识,结果记录到 ?dice-key=15
---
点击骰子图标执行掷骰,点击文字重置为公式,可用于属性检定、伤害投掷等场景。
**语法:** `:md-dice[公式]{key="标识"}`
**攻击检定:** :md-dice[1d20+5]{key="attack"}
**伤害掷骰:** :md-dice[2d6+3]{key="damage"}
**优势检定:** :md-dice[2d20k1+5]{key="advantage"}
点击掷骰文字执行投掷,再次点击重置为公式。
点击 🎲 图标执行投掷,显示结果;点击文字重置为原始公式。
## 属性
| 属性 | 类型 | 说明 |
|---|---|---|
| `key` | string | URL 参数标识,结果记录到 `?dice-key=15` |
## 使用场景