generator-draw
v1.0.3
Published
用来生成真实元素和元素转换成对象
Downloads
16
Maintainers
Readme
generator-draw
生成真实元素
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"
}
]
})
提取成对象
drow(dom) //=> { type:'xxx' , props:{ xxx:'xxx' } , children:[...chid] }