docs: add view.tsx guide in material.md

This commit is contained in:
eternalsky 2022-12-05 20:06:58 +08:00 committed by 林熠
parent 20c8419f22
commit 0fbf4cda4c
2 changed files with 9 additions and 2 deletions

View File

@ -57,7 +57,7 @@ npm run build
npm publish
```
## 🔥🔥🔥 调试物料/插件/设置器
## 🔥🔥🔥 在低代码项目中调试物料/插件/设置器
> 📢📢📢 低代码生态脚手架提供的调试利器,在启动 setter/插件/物料 项目后,直接在已有的低代码平台就可以调试,不需要 npm link / 手改 npm main 入口等传统方式,轻松上手,强烈推荐使用!!

View File

@ -182,7 +182,14 @@ npm run lowcode:build
display: 'accordion' | 'inline' | 'block' | 'plain' | 'popup' | 'entry', // 常用的是 inline(默认), block、entry
}
```
发布组件
#### 编辑态视图
用户可以在 lowcode/<component-name\> 目录下新增 view.tsx 来增加编辑态视图编辑态视图用于在编辑态时展示与真实预览不一样的视图
view.tsx 输出的也是一个 React 组件。
注意如果是单组件而非组件库模式的话view.tsx 应置于 lowcode 而非 lowcode/<component-name\> 目录下
#### 发布组件
```bash
# 在组件根目录下,执行
$ npm publish