@beisen/icon-button

0.1.26-1 • Public • Published

icon-button使用说明

项目运行

  1. cnpm install 或 npm install cnpm使用教程

  2. npm run dev (开发环境打包 port:8080)

  3. npm run test (测试用例)

  4. npm run build (生产环境打包)

IconButton参数

{
"bsStyle": "default"
  /**按钮类型(string)。参数:
                                  1.默认:“default”
                                  2.弱化按钮:“weaken”
                                  3.连接按钮:“link”,将返回一个<a></a>
                              **/
  ,
"active": false //是否激活
  ,
"disabled": false //是否禁用
  ,
"href": "" //返回<a>的链接
  ,
"title": "测试11" //返回<a>的title
  ,
"onClick": function(target,onClick,btnInfo) {
  console.log(target);  //输出e
  console.log(onClick); //输出true
  console.log(btnInfo); //输出this.state
},
"hidden": false //是否显示按钮
  ,
"iconName": "sys-icon-spread"

}

icon-button调用方法

1.安装npm组件包

npm install @beisen/icon-button --save-dev

2.引用组件

import IconButton from "@beisen/icon-button"
  1. 传入参数

该参数为上述参数,传入方式使用: {...参数}

{
  "bsStyle": "default"
    /**按钮类型(string)。参数:
                                    1.默认:“default”
                                    2.弱化按钮:“weaken”
                                    3.连接按钮:“link”,将返回一个<a></a>
                                **/
    ,
  "active": false //是否激活
    ,
  "disabled": false //是否禁用
    ,
  "href": "" //返回<a>的链接
    ,
  "title": "测试11" //返回<a>的title
    ,
  "onClick": function(target,onClick,btnInfo) {
    console.log(target);  //输出e
    console.log(onClick); //输出true
    console.log(btnInfo); //输出this.state
  },
  "hidden": false //是否显示按钮
    ,
  "iconName": "sys-icon-spread"
}

render () {
    return (
      <IconButton {...this.state.IconData} />
    )
  }

Package Sidebar

Install

npm i @beisen/icon-button

Weekly Downloads

3

Version

0.1.26-1

License

ISC

Unpacked Size

1.11 MB

Total Files

30

Last publish

Collaborators

  • beisencorp