Skip to content

Commit 4e4afc1

Browse files
committed
doc: Update README.md
1 parent 4b68820 commit 4e4afc1

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

core/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@ mdObj.components // => 组件索引对象,从 markdown 索引到的示例转
1919
mdObj.codeBlock // => 组件源码索引对象,从 markdown 索引到的示例源码。(需要配置 meta)
2020
```
2121

22+
```js
23+
{
24+
codeBlock: {
25+
17: 'import React from ...',
26+
77: 'import React from ...',
27+
base23: 'import React from ...'
28+
},
29+
components: { 17: ƒ, 77: ƒ, base23: ƒ },
30+
languages: { 17: 'jsx', 77: 'jsx', base23: 'jsx'},
31+
source: "# Alert 确认对话框...."
32+
}
33+
```
34+
2235
```ts
2336
export type CodeBlockData = {
2437
source: string;

website/src/pages/example/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@ export function ExamplePage() {
2323
languages: {},
2424
});
2525

26-
const [lang, setLang] = useState('');
26+
const [lang] = useState('');
2727
useEffect(() => {
2828
const getMd = async () => {
2929
// const result = await import(`@uiw/react-layout/README${lang}.md`);
3030
const result = await import(`./App${lang}.md`);
31+
console.log(result);
3132
if (result.default) {
3233
setMdData(result.default);
3334
}

0 commit comments

Comments
 (0)