Skip to content

Commit

Permalink
docs:添加文档
Browse files Browse the repository at this point in the history
  • Loading branch information
yaochuxia committed Aug 15, 2021
1 parent e3d8b78 commit 73104c5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
11 changes: 11 additions & 0 deletions website/src/pages/components/noticebar/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import Markdown, { importAll } from '../../../component/Markdown';

export default class Page extends Markdown {
path="/packages/core/src/NoticeBar/README.md"
getMarkdown = async () => {
const md = await import('@uiw/react-native/lib/NoticeBar/README.md');
// 支持 markdown 中,相对于当前 index.tsx 相对路径引入图片资源
importAll((require as any).context('./', true, /\.(png|gif|jpg|svg)$/), this.imageFiles);
return md.default || md;
}
}
1 change: 1 addition & 0 deletions website/src/routes/menus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export const componentMenus: MenuData[] = [
{ path: "/components/timeLine", name: "Timeline 时间轴" },
{ path: "/components/quicklist", name: "QuicList 快速列表" },
{ path: "/components/card", name: "Card 卡片" },
{ path: "/components/noticebar", name: "NoticeBar 通告栏" },
{ divider: true, name: "Feedback" },
{ path: "/components/loader", name: "Loader 加载" },
{ path: "/components/modal", name: "Modal 模态框" },
Expand Down
4 changes: 4 additions & 0 deletions website/src/routes/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ export const getRouterData = {
'/components/card': {
component: dynamicWrapper([], () => import('../pages/components/card')),
},
'/components/noticebar': {
component: dynamicWrapper([], () => import('../pages/components/noticebar')),
},

'/components/stepper': {
component: dynamicWrapper([], () => import('../pages/components/stepper')),
},
Expand Down

0 comments on commit 73104c5

Please sign in to comment.