Skip to content

Commit

Permalink
site: support debug mode for demo, close: ant-design#3506
Browse files Browse the repository at this point in the history
  • Loading branch information
benjycui committed Oct 20, 2016
1 parent d5edcb9 commit 3112b0d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 20 deletions.
12 changes: 3 additions & 9 deletions components/date-picker/demo/with-time-picker.md
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
10 changes: 2 additions & 8 deletions components/upload/demo/multiple.md
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions site/theme/template/Content/ComponentDoc.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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 (
Expand Down

0 comments on commit 3112b0d

Please sign in to comment.