Skip to content

Commit 337e82b

Browse files
committed
doc: Update README.md
1 parent b92b053 commit 337e82b

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

core/README-zh.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,18 @@ export default Demo
226226

227227
注意 ⚠️:需要在代码块示例中添加特殊的 `meta` 标识,`loader` 才会去索引对于的 `react` 示例,进行代码转换。
228228

229+
```
230+
Meta Tag Meta ID Meta Param
231+
┈┈┈┈┈┈┈┈ ┈┈┈┈┈┈┈ ┈┈┈┈┈┈┈┈┈┈
232+
╭┈┈┈┈┈┈┈┈╲‥‥‥‥‥‥‥‥‥‥‥‥‥‥╱‥‥‥‥‥‥‥╱‥‥‥‥┈┈┈┈╮
233+
┆ ```jsx mdx:preview:demo12&boreder=0 ┆
234+
┆ import React from "react" ┆
235+
┆ const Demo = () => <div>Test</div> ┆
236+
┆ export default Demo ┆
237+
┆ ``` ┆
238+
╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯
239+
```
240+
229241
1. `mdx:` 特殊标识前缀
230242
2. `mdx:preview` 控制是否进行进行示例索引,通过对应所在行号,获取需要的示例对象。
231243
3. `mdx:preview:demo12` 通过 `demo12` 唯一标识,准确获取索引的 `示例代码``示例组件对象`

core/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,18 @@ const getCodeBlock: (child: MarkdownParseData['children'], opts?: Options) => Co
225225

226226
Note ⚠️: You need to add a special `meta` identifier to the code block example, and `loader` will index the `react` example for code conversion.
227227

228+
```
229+
Meta Tag Meta ID Meta Param
230+
┈┈┈┈┈┈┈┈ ┈┈┈┈┈┈┈ ┈┈┈┈┈┈┈┈┈┈
231+
╭┈┈┈┈┈┈┈┈╲‥‥‥‥‥‥‥‥‥‥‥‥‥‥╱‥‥‥‥‥‥‥╱‥‥‥‥┈┈┈┈╮
232+
┆ ```jsx mdx:preview:demo12&boreder=0 ┆
233+
┆ import React from "react" ┆
234+
┆ const Demo = () => <div>Test</div> ┆
235+
┆ export default Demo ┆
236+
┆ ``` ┆
237+
╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯
238+
```
239+
228240
1. `mdx:` special identifier prefix
229241
2. `mdx:preview` Controls whether to perform example indexing, and obtain the required example object through the corresponding line number.
230242
3. `mdx:preview:demo12` Uniquely identified by `demo12`, accurately obtain the `example code` or `example component object` of the index.

0 commit comments

Comments
 (0)