猫史档案馆


关于最新版本的coco使用h t m l的方法

用户:WiseAnswerWiseAnswer查看:0 回复:4 评论:0 创建时间:2022-06-18T19:52:35


话不多说,自定义控件 /*eslint-disableno-undef*/ /*eslint-disablereact/react-in-jsx-scope*/ constWIDGET_ICON='https://creation.codemao.cn/716/appcraft/IMAGE_HLlYby4DM_16546911023喵.jpg'; constBLOCK_ICON='https://creation.codemao.cn/716/appcraft/IMAGE_HLlYby4DM_16546911023喵.jpg'; constTypes={ type:'TEXT_ADVANCED', icon:WIDGET_ICON, title:'高级文本框', version:'1.0.0', platforms:['android','ios','web'], isInvisibleWidget:false, isGlobalWidget:false, properties:[{ key:'__width',//内置属性 label:'宽度', valueType:'number',//数字类型 defaultValue:100, }, { key:'__height',//内置属性 label:'高度', valueType:'number',//数字类型 defaultValue:100, }, { key:'content', label:'文本', valueType:'string',//字符串类型 defaultValue:'文本', }, ], methods:[], events:[] }; classWidgetextendsVisibleWidget{ constructor(props){ super(props); this.content=props.content; }; render(){ varrawH喵L='<div>'+this.content+'</div>'; varrawH喵LData={ __html:rawH喵L }; varprops={ dangerouslySetInnerH喵L:rawH喵LData } returnReact.createElement('div',props); } } exports.types=Types; exports.widget=Widget; 是中子星以前的一个控件修改的,比较简陋,就是在外面套了一个div布局。


回复

上一页1 页 / 共 1下一页
WiseAnswerWiseAnswer

。。。。。格式吞了,蓝奏云吧 tclizi.lanzouf.com/i2HEx06lr56b密码:7g9h 去掉.txt

点赞0


评论


AokenAoken

它好像只是一个高级文本

点赞0


评论


兴川系统有限公司兴川系统有限公司

你可以加联华工作室吗?求求你了

点赞0


评论


一门鸽鸽一门鸽鸽

H喵L控件可以在CoCo群中领取哟~

点赞0


评论