Skip to content

Commit

Permalink
doc: Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed May 7, 2022
1 parent 8be8c48 commit 7b312fc
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 38 deletions.
37 changes: 18 additions & 19 deletions core/README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ mdObj.codeBlock // => 组件源码索引对象,从 markdown 索引到的示
codeBlock: {
17: 'import React from ...',
77: 'import React from ...',
base23: 'import React from ...'
demo12: 'import React from ...'
},
components: { 17: ƒ, 77: ƒ, base23: ƒ },
languages: { 17: 'jsx', 77: 'jsx', base23: 'jsx'},
components: { 17: ƒ, 77: ƒ, demo12: ƒ },
languages: { 17: 'jsx', 77: 'jsx', demo12: 'jsx'},
source: "# Alert 确认对话框...."
}
```
Expand All @@ -115,25 +115,24 @@ export type CodeBlockData = {
2. `mdx:preview` 控制是否进行进行示例索引,通过对应所在行号,获取需要的示例对象。
3. `mdx:preview:demo12` 通过 `demo12` 唯一标识,准确获取索引的 `示例代码``示例组件对象`

```markdown
\```tsx mdx:preview
import React from "react"
const Demo = ()=>{
return <div>测试</div>
}
```tsx mdx:preview
import React from "react"
const Demo = ()=>{
return <div>测试</div>
}

export default Demo
\```
export default Demo
```

\```tsx mdx:preview:demo12
import React from "react"
const Demo = ()=>{
return <div>测试</div>
}

export default Demo
\```
```
```tsx mdx:preview:demo12
import React from "react"
const Demo = ()=>{
return <div>测试</div>
}
export default Demo
```

## 开发

Expand Down
39 changes: 20 additions & 19 deletions core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ mdObj.codeBlock // => The component source code index object, the sample sour
codeBlock: {
17: 'import React from ...',
77: 'import React from ...',
base23: 'import React from ...'
demo12: 'import React from ...'
},
components: { 17: ƒ, 77: ƒ, base23: ƒ },
languages: { 17: 'jsx', 77: 'jsx', base23: 'jsx'},
components: { 17: ƒ, 77: ƒ, demo12: ƒ },
languages: { 17: 'jsx', 77: 'jsx', demo12: 'jsx'},
source: "# Alert 确认对话框...."
}
```
Expand All @@ -115,25 +115,26 @@ Note: You need to add a special `meta` identifier to the code block example, and
2. `mdx:preview` Controls whether to perform example indexing, and obtain the required example object through the corresponding line number.
3. `mdx:preview:demo12` Uniquely identified by `demo12`, accurately obtain the `example code` or `example component object` of the index.

```markdown
\```tsx mdx:preview
import React from "react"
const Demo = ()=>{
return <div>测试</div>
}

export default Demo
\```
```tsx mdx:preview
import React from "react"
const Demo = ()=>{
return <div>测试</div>
}

\```tsx mdx:preview:demo12
import React from "react"
const Demo = ()=>{
return <div>测试</div>
}
export default Demo
```


```tsx mdx:preview:demo12
import React from "react"
const Demo = ()=>{
return <div>测试</div>
}
export default Demo
```

export default Demo
\```
```

## Development

Expand Down

0 comments on commit 7b312fc

Please sign in to comment.