任务列表
小于 1 分钟
让你的 VuePress 站点中的 Markdown 文件支持任务列表。
配置
import { hopeTheme } from "vuepress-theme-hope";
export default hopeTheme({
markdown: {
tasklist: true,
},
});语法
- 使用
- [ ] 一些文字渲染一个未勾选的任务项 - 使用
- [x] 一些文字渲染一个勾选了的任务项 (我们也支持大写的X)
案例
- [ ] 计划 A
- [x] 计划 B高级
除了设置 markdown.tasklist: true 之外,你还可以将对象作为选项传递:
import { hopeTheme } from "vuepress-theme-hope";
export default hopeTheme({
markdown: {
tasklist: {
/**
* 是否禁用 checkbox
*
* @default true
*/
disabled: false,
/**
* 是否使用 `<label>` 来包裹文字
*
* @default true
*/
label: false,
},
},
});更新日志
2025/6/4 13:34
查看所有更新日志
1bd5f-于d45e2-于55e92-于b1230-于22787-于b41c0-于54c46-于55ea3-于792dc-于8174c-于e63d6-于2fa50-于3c8d6-于9856d-于23515-于48bca-于9cdd7-于63d09-于fd395-于1eb77-于f6ff0-于3c199-于