Closed zt6991 closed 4 months ago
可以结合自定义视图的能力来做:https://opensumi.com/zh/docs/integrate/universal-integrate-case/custom-view/
代码这一行返回的整个的页面布局,你可以将需要全局包裹的放这里。
好咧,谢谢回复。我试试
目前已经在custom-layout加上了,自定义视图的运行正常。就是编辑器里的拖拽模型显示有问题。就是一片空白。 界面效果图
Uncaught Error: Could not find "store" in the context of "Connect(Droppable)". Either wrap the root component in a , or pass a custom React context provider to and the corresponding React context consumer to Connect(Droppable) in connect options. Error: Could not find "store" in the context of "Connect(Droppable)". Either wrap the root component in a , or pass a custom React context provider to and the corresponding React context consumer to Connect(Droppable) in connect options. at ConnectFunction (bundle.js:591738:15) at renderWithHooks (bundle.js:578326:18) at mountIndeterminateComponent (bundle.js:581005:13) at beginWork (bundle.js:582119:16) at HTMLUnknownElement.callCallback (bundle.js:563711:14) at Object.invokeGuardedCallbackDev (bundle.js:563760:16) at invokeGuardedCallback (bundle.js:563815:31) at beginWork$1 (bundle.js:586726:7) at performUnitOfWork (bundle.js:585680:12) at workLoopSync (bundle.js:585653:22) at bundle.js:212961:27
这个报错看起来是 Redux 报错了,OpenSumi 内部没有使用 Redux,你可以检查下你的代码?
嗯嗯,好的。主要是代码写的都差不多。其他视图都正常,就是编辑器里有问题。
目前需要在opensumi里增加拖拽功能,使用到了react-beautiful-dnd库。因为拖拽的范围包括整个页面,所以需要使用react-beautiful-dnd 的组件包裹需要拖拽的组件。我要修改哪个文件才能将整个页面在呢。
下面是react-beautiful-dnd的组件关系 react-beautiful-dnd的github地址 https://github.com/atlassian/react-beautiful-dnd