按钮组件
创建一个可扩展的 customElement 按钮。
安装
$ npm install button-component
用法
require ( 'webcomponents.js' )
document . registerElement ( 'custom-button' , require ( 'button-component' ) )
const customButton = document . createElement ( 'button' , 'custom-button' )
document . body . appendChild ( customButton )
// => <button is="custom-button"></button>
执照
评论0
最新资源