React 支持 #705
Closed
pubuzhixing8
started this conversation in
Ideas
React 支持
#705
Replies: 2 comments
-
先写一个基于 React 的画图示例( https://github.com/plait-board/react-drawing-tourist ),实现画图的基本功能,参考: https://github.com/worktile/plait 里面的 board 组件和插件机制 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Framework agnostic Angular framework React framework |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
主要讨论支持 React 的方案及落地计划。
当前框架及主要插件对 Angular 的依赖情况
@plait/core
PlaitContextService:目前主要用它存储下上传中的图片列表,可以移除@plait/common
@plait/text
@plait/draw
draw 已经属于业务插件了,用到地方不多,主要是实现插件自定义渲染的部分继承了 PlaitPluginElementComponent:geometry.component、image.component、line.component
@plait/mind
和 @plait/draw 类似,只不过场景多了 emoji 的支持。
初步落地方案
前期有两个非常重要的事情需要搞定:
实现基于 react 的渲染
这块的主要工作应该是基于 react 组件将 plait 的数据渲染出来,目前 plait 绘图元素渲染主要还是基于 SVG,基于 angular 框架主要是为了实现基于数据驱动的渲染模式,另外一个就是自定义插件的渲染也是提供的 angular 组件(只不过这个组件是要受框架约束的,继承一个基类),具体的工作:
计划任务:
Beta Was this translation helpful? Give feedback.
All reactions