mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
site: support debug mode for demo, close: #3506
This commit is contained in:
parent
d5edcb9ef0
commit
3112b0d7ca
@ -1,18 +1,12 @@
|
||||
---
|
||||
order: 4
|
||||
hidden: true
|
||||
title:
|
||||
debug: true
|
||||
title:
|
||||
zh-CN: 日期时间选择二
|
||||
en-US: To select a date, case 2
|
||||
---
|
||||
|
||||
## zh-CN
|
||||
|
||||
和 <a href="/components/time-picker">时间选择框</a> 配合使用。
|
||||
|
||||
## en-US
|
||||
|
||||
Cooperate with `<a href="/components/time-picker">time-picker</a>`
|
||||
For debugging.
|
||||
|
||||
````jsx
|
||||
import { DatePicker, TimePicker } from 'antd';
|
||||
|
@ -1,18 +1,12 @@
|
||||
---
|
||||
order: 5
|
||||
hidden: true
|
||||
debug: true
|
||||
title:
|
||||
zh-CN: 多文件选择
|
||||
en-US: Multifile Selection
|
||||
---
|
||||
|
||||
## zh-CN
|
||||
|
||||
按住 ctrl 可选择多个文件,`ie10+` 支持。
|
||||
|
||||
## en-US
|
||||
|
||||
You can select multiple files with CTRL holding down. `IE10+` supported.
|
||||
For debugging.
|
||||
|
||||
````jsx
|
||||
import { Upload, message, Button, Icon } from 'antd';
|
||||
|
@ -85,7 +85,7 @@
|
||||
"babel-plugin-import": "^1.0.0",
|
||||
"babel-plugin-transform-runtime": "~6.15.0",
|
||||
"bisheng": "^0.13.0",
|
||||
"bisheng-plugin-antd": "~0.2.0",
|
||||
"bisheng-plugin-antd": "~0.3.0",
|
||||
"bisheng-plugin-description": "^0.1.1",
|
||||
"bisheng-plugin-react": "^0.2.0",
|
||||
"bisheng-plugin-toc": "^0.3.0",
|
||||
|
@ -38,7 +38,7 @@ export default class ComponentDoc extends React.Component {
|
||||
const leftChildren = [];
|
||||
const rightChildren = [];
|
||||
const showedDemo = demos.some(demo => demo.meta.only) ?
|
||||
demos.filter(demo => demo.meta.only) : demos.filter(demo => !demo.meta.hidden);
|
||||
demos.filter(demo => demo.meta.only) : demos.filter(demo => demo.preview);
|
||||
showedDemo.sort((a, b) => a.meta.order - b.meta.order)
|
||||
.forEach((demoData, index) => {
|
||||
if (index % 2 === 0 || isSingleCol) {
|
||||
@ -62,7 +62,7 @@ export default class ComponentDoc extends React.Component {
|
||||
'code-box-expand-trigger-active': expand,
|
||||
});
|
||||
|
||||
const jumper = demos.map((demo) => {
|
||||
const jumper = showedDemo.map((demo) => {
|
||||
const title = demo.meta.title;
|
||||
const localizeTitle = title[locale] || title;
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user