【文件属性】:
文件名称:virtual-form:创建虚拟dom形式
文件大小:4KB
文件格式:ZIP
更新时间:2021-05-11 23:49:17
JavaScript
虚拟形式
创建一个虚拟dom形式。
安装
$ npm install virtual-form
用法
const virtualForm = require ( 'virtual-form' )
const vel = require ( 'vel' )
vel ( function ( h ) {
return h ( 'form.myForm' , virtualForm ( h , [
'name' ,
'address' ,
{ type : 'password' , name : 'passphrase' } ,
{ type : 'submit' , value : 'Submit' }
] )
} )
输出
< form class =" myForm " >
< input type =" text " name =" nam
【文件预览】:
virtual-form-master
----test.js(2KB)
----.travis.yml(152B)
----LICENSE(1KB)
----README.md(3KB)
----.gitignore(54B)
----index.js(825B)
----package.json(822B)