diff --git a/components/ms-input/demo/input.md b/components/ms-input/ms-input.md similarity index 100% rename from components/ms-input/demo/input.md rename to components/ms-input/ms-input.md diff --git a/components/ms-select/demo/select.md b/components/ms-select/ms-select.md similarity index 100% rename from components/ms-select/demo/select.md rename to components/ms-select/ms-select.md diff --git a/docs/nav.config.js b/docs/nav.config.js index eb2dab9..ff44ecf 100644 --- a/docs/nav.config.js +++ b/docs/nav.config.js @@ -2,11 +2,11 @@ module.exports = [{ key: 'components', title: '组件', children: [{ - key: 'ms-input', + key: 'component-demo-input', title: '输入框', uri: '/input' }, { - key: 'ms-select', + key: 'component-demo-select', title: '选择框', uri: '/select' }] diff --git a/docs/router.ts b/docs/router.ts index c1f56ac..6b66faa 100644 --- a/docs/router.ts +++ b/docs/router.ts @@ -42,8 +42,8 @@ const travel = item => { path: item.uri, component(resolve) { require.ensure([], function () { - const name = item.key.replace('ms-', ''); - resolve(require('../components/ms-' + name + '/demo/' + name + '.md')); + const name = item.key.replace('component-demo-', ''); + resolve(require('../components/ms-' + name + '/ms-' + name + '.md')); }); } }); diff --git a/webpack.doc.config.js b/webpack.doc.config.js index 72d893a..63aee97 100644 --- a/webpack.doc.config.js +++ b/webpack.doc.config.js @@ -76,7 +76,7 @@ module.exports = { }, { test: /\.md$/, include: [ - RegExp(path.resolve(__dirname, 'components') + '/.*?/demo') + RegExp(path.resolve(__dirname, 'components') + '/.*?') ], use: [ { loader: 'ane-markdown-loader', options: { highlight: false } }