web-widget
v0.3.7
Published
前端UI组件库
Downloads
10
Readme
web-widget
前端UI组件库
使用npm安装
npm install --save web-widget
使用yarn安装
yarn add web-widget
发包
npm publish
示例
import React from 'react'
import ReactDOM from 'react-dom'
import { Button } from 'web-widget'
const Example: React.FC = () => {
return (
<Button type="primary">我是按钮</Button>
)
}
ReactDOM.render(<Example />, document.getElementById('root'))
按需加载
[
'import',
{
libraryName: 'web-widget',
transformToDefaultImport: false,
camel2DashComponentName: false,
customName: (name) => {
const widget = name === 'them'
? name
: name.endsWith('Icon') ? 'icons' : 'components' + `/${name}/${name}`
return `web-widget/dist/es/${widget}`
}
},
'web-widget'
]
License
Apache-2.0 © Ellite