问题描述
我正在尝试制作一个可排序的动态古腾堡块,这意味着取决于后台管理集的位置,它显示左侧或右侧的文本。
const {SortableContainer,SortableElement} = 'react-sortable-hoc';
registerBlockType('pulse/test',{
title:'Test',category:'widgets',supports:{
html:false,align: true,align:["full"]
},edit({className,attributes,setAttributes}){
let items = ['Item 1','Item 2','Item 3','Item 4','Item 5','Item 6'];
return (
<section>
<ul>
{items.map((value,index) => (
SortableElement(({value}) => <li>{value}</li>)
))}
</ul>
</section>
)
},save(){
return null;
}
})
我实际上有类似的东西,但它说由于问题而无法呈现块,但我无法弄清楚。
非常感谢您
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)