mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-01 11:39:28 +08:00
site: migrate changelog.md
This commit is contained in:
parent
38f9864732
commit
95222a51fa
@ -1,6 +1,6 @@
|
||||
---
|
||||
- order: 3
|
||||
- title: 小数
|
||||
order: 3
|
||||
title: 小数
|
||||
---
|
||||
|
||||
和原生的数字输入框一样,value 的精度由 step 的小数位数决定。
|
||||
|
@ -1,7 +1,11 @@
|
||||
const path = require('path');
|
||||
|
||||
module.exports = {
|
||||
source: ['./components', './docs', './CHANGELOG.md'],
|
||||
source: [
|
||||
'./components',
|
||||
'./docs',
|
||||
'CHANGELOG.md', // TODO: fix it in bisheng
|
||||
],
|
||||
theme: './site/theme',
|
||||
plugins: [
|
||||
'bisheng-plugin-description',
|
||||
|
@ -25,6 +25,7 @@ export default {
|
||||
'/docs/practice/:children': contentTmpl,
|
||||
'/docs/pattern/:children': contentTmpl,
|
||||
'/docs/react/:children': contentTmpl,
|
||||
'/CHANGELOG': contentTmpl,
|
||||
'/components/:children': contentTmpl,
|
||||
'/docs/spec/:children': contentTmpl,
|
||||
'/docs/resource/:children': contentTmpl,
|
||||
|
@ -81,18 +81,26 @@ export default class MainContent extends React.Component {
|
||||
return [...topLevel, ...itemGroups];
|
||||
}
|
||||
|
||||
getMenuItems() {
|
||||
getModuleData() {
|
||||
const props = this.props;
|
||||
|
||||
let moduleData;
|
||||
if (/(docs\/react\/)|(components\/)/i.test(props.location.pathname)) {
|
||||
if (/(docs\/react\/)|(components\/)|(CHANGELOG)/i.test(props.location.pathname)) {
|
||||
moduleData = {
|
||||
...props.data.docs.react,
|
||||
...props.data.components,
|
||||
CHANGELOG: props.data.CHANGELOG,
|
||||
};
|
||||
} else {
|
||||
moduleData = props.utils.get(props.data, props.location.pathname.split('/').slice(0, 2));
|
||||
}
|
||||
|
||||
return moduleData;
|
||||
}
|
||||
|
||||
getMenuItems() {
|
||||
const moduleData = this.getModuleData();
|
||||
|
||||
const menuItems = utils.getMenuItems(moduleData, this.context.intl.locale);
|
||||
const topLevel = this.generateSubMenuItems(menuItems.topLevel);
|
||||
const subMenu = Object.keys(menuItems).filter(this.isNotTopLevel)
|
||||
@ -144,15 +152,7 @@ export default class MainContent extends React.Component {
|
||||
const { prev, next } = this.getFooterNav(menuItems, activeMenuItem);
|
||||
|
||||
const locale = this.context.intl.locale;
|
||||
let moduleData;
|
||||
if (/(docs\/react\/)|(components\/)/i.test(props.location.pathname)) {
|
||||
moduleData = {
|
||||
...props.data.docs.react,
|
||||
...props.data.components,
|
||||
};
|
||||
} else {
|
||||
moduleData = props.utils.get(props.data, props.location.pathname.split('/').slice(0, 2));
|
||||
}
|
||||
const moduleData = this.getModuleData();
|
||||
const pageData = props.pageData.index || props.pageData;
|
||||
const localizedPageData = pageData[locale] || pageData;
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user