Skip to content

Commit

Permalink
docs: update doucment
Browse files Browse the repository at this point in the history
  • Loading branch information
DiamondYuan committed Oct 9, 2023
1 parent bceda02 commit 5074d8c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions scripts/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,23 @@ try {
${jsonConfig}
\`\`\`
1。 参考 usingComponents , 从对应路径导入
1. 根据上方 usingComponents 的内容, 获取组件实际导入的位置, 从对应路径导入
举个例子, 假设 usingComponents 是这样的
\`\`\`
"usingComponents": {
"ant-button": "../../../src/Button/index",
"container": "../../../src/Container/index"
}
\`\`\`
那么 tsx 里就是从对应路径导入
那么 tsx 的转换结果应该是这样的
\`\`\`
import AntButton from '../../../src/Button/index.axml';
import Container from '../../../src/Container/index.axml';
\`\`\`
2. 如果最外层有多个组件,用 <Page /> 或者 <Component / > 包裹起来 , 如果配置了 component: true, 用 <Component /> 包裹起来。
`.trim();
Expand Down

0 comments on commit 5074d8c

Please sign in to comment.