Skip to content

Commit c198af8

Browse files
ffxingyuefeng
authored andcommitted
docs: 优化Icon文档
1 parent c53034f commit c198af8

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed
Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
1-
import svgPaths from '@uiw/icons/fonts/w-icon.json';
2-
import Markdown, { importAll } from '../../../component/Markdown';
1+
import Preview from 'src/component/Preview';
2+
import md from '@uiw/react-native/lib/Icon/README.md';
33

4-
export default class Page extends Markdown {
5-
dependencies = { svgPaths };
6-
path = '/packages/core/src/Icon/README.md';
7-
getMarkdown = async () => {
8-
const md = await import('@uiw/react-native/lib/Icon/README.md');
9-
// 支持 markdown 中,相对于当前 index.tsx 相对路径引入图片资源
10-
importAll((require as any).context('./', true, /\.(png|gif|jpg|svg)$/), this.imageFiles);
11-
return md.default || md;
12-
};
13-
}
4+
const MD = () => <Preview {...md} />;
5+
export default MD;

0 commit comments

Comments
 (0)