UNPKG

generator-draw

Version:

用来生成真实元素和元素转换成对象

35 lines (27 loc) 557 B
# generator-draw ### 生成真实元素 ```javascript generator({ type:"div", events:{ click:[ function(){ console.log('绑定成功') }, function(){ console.log('再次绑定') } ], dblclick:function(){ console.log('双击') } }, props:{ id:'app' }, children:[ { type:"text", text:"this is text node" } ] }) ``` ### 提取成对象 ```javascript drow(dom) //=> { type:'xxx' , props:{ xxx:'xxx' } , children:[...chid] } ```