@beisen/selected-component

selectedComponent

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
@beisen/selected-component
Minified + gzip package size for @beisen/selected-component in KB

Readme

SelectedComponent组件说明文档

参数说明

  sideTip: false,
  hiddenTip: false,
  defaultValue: '本级别及直接下级',          //默认选中的item
  inputItems: [                           //下拉中选项    
            {
                "value":0               
                ,"text":"本级别及直接下级" 
                ,"isChecked":true       //是否被选中
            }  
            ,{
                "value":1
                ,"text":"本级别"
                ,"isChecked":false
            } 
            ,{
                "value":2
                ,"text":"本级别及所有下级"
                ,"isActive":false
                ,"isChecked":false
            } 
            ,{
                "value":3
                ,"text":"直接下级"
                ,"isChecked":false
            } 
            ,{
                "value":4
                ,"text":"全部下级"
                ,"isChecked":false
            }
        ],
  itemClickCallback:function(event,target,val){console.log(val.text)}  //点击选项的回调函数

组件使用方法


import SelectedComponent from '@beisen/selected-component';

const options = {
  sideTip: false,
  hiddenTip: false,
  defaultValue: '本级别',
  inputItems: [
            {
                "value":0
                ,"text":"本级别及直接下级"
                ,"isChecked":true
            }  
            ,{
                "value":1
                ,"text":"本级别"
                ,"isChecked":false
            } 
            ,{
                "value":2
                ,"text":"本级别及所有下级"
                ,"isActive":false
                ,"isChecked":false
            } 
            ,{
                "value":3
                ,"text":"直接下级"
                ,"isChecked":false
            } 
            ,{
                "value":4
                ,"text":"全部下级"
                ,"isChecked":false
            }
        ],
  itemClickCallback:function(event,target,val){console.log(val.text)}
}

使用组件

<SelectedComponent {...options} /> //将数据传入组件

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.