Comments (4)
用了一个简单的模板内容:
---
nav:
title: 指南
order: 1
group:
title: 基础
order: 1
title: 快速上手
---
## 第一个例子
这是一个最简单的 Ant Design 组件的在线 codesandbox 演示。
### 使用组件
直接用下面的代码替换 index.js 的内容,用 React 的方式直接使用 antd 组件。
### 探索更多组件用法
你可以在组件页面的左侧菜单查看组件列表,比如 Alert 组件,组件文档中提供了各类演示,最下方有组件 API 文档可以查阅。在代码演示部分找到第一个例子,点击右下角的图标展开代码。
## 按需加载
antd 默认支持基于 ES modules 的 tree shaking,直接引入 import { Button } from 'antd'; 就会有按需加载的效果。
你看下标题是不是二级(##)以及三级(###),另外排除下是否有 css 样式覆盖了 toc 样式,可以审查下 tocWrapper
元素
展示如下:
如果还是没有解决问题,提供一个最小复现仓库。
from dumi-theme-antd.
@KuangPF nice, 参考你的模板是有效的,问题可以解决。
不过bug是存在的。根源在于这个模板的toc不识别单个#,3个###这样的标题,
markdown文档是必须第一个标题是2个##开头的md文档才有右侧的toc出现。
而且开头的toc属性无效。
bug示例如下:
---
nav:
title: te1st1111
order: 1
toc: content
demo:
tocDepth: 4
group:
title: group1
order: 1
title: xxxx
---
# First
something1
### title2
something2
### user guide3
coment
#### xxxx
ssffff
### user guide2
coment
from dumi-theme-antd.
一级(#)会直接被识别为页面标题,所以就不在 toc 里了
from dumi-theme-antd.
一级(#)会直接被识别为页面标题,所以就不在 toc 里了
good, 辛苦。
from dumi-theme-antd.
Related Issues (19)
- dumi 2x+antd 4x版本能使用这个主题包么 HOT 1
- loading 转圈bug HOT 4
- body污染的 全局样式 HOT 4
- themeConfig 的 title 配置目前无效 HOT 4
- 使用 antd-style 替换 emotion 方案 HOT 1
- 控制台报错 colorItemBg 废弃 HOT 4
- 首页按钮和导航不支持跳转外链 HOT 2
- SSR 服务端渲染的问题 HOT 12
- dumi-theme-antd 项目征集 HOT 1
- nginx 部署问题
- 安装依赖警告问题 HOT 1
- 重定向问题
- 请问一下sidebarGroupModePath效果是和menu组件type:group一样么?
- 首页支持配置背景图片 HOT 3
- markdown代码块显示行号 HOT 3
- cmd + k快速搜索定位失效 HOT 1
- 背景图在缩放屏幕的时候会拉伸变形 HOT 2
- 0.2.5版本,新增的bannerConfig属性失效,导致mainContent dom丢失 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dumi-theme-antd.