Socket
Socket
Sign inDemoInstall

@beisen-platform/radio-list

Package Overview
Dependencies
8
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @beisen-platform/radio-list

用于在多个备选项中选中单个状态。与单选选择器的区别在于备选项直观可见适用于备选项不超过5个且字数较少的场景下


Version published
Weekly downloads
1
decreased by-95.24%
Maintainers
1
Install size
1.28 MB
Created
Weekly downloads
 

Readme

Source

RadioList 使用说明

项目运行

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

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

  3. npm run test (测试用例)

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

RadioList 参数

  data:{
        hidden:false,
        disabled:true,
        required: true,
        hasRender: true,
        radioLabel: '测试测试测试测试',
        radioValue: '内容2',
        errorStatus:true, //是否报错
        errorMsg:"出错了~~~!", //报错信息
        helpMsg:"dqwdqw",
        sideTip:false ,//toolTip是否左右显示
        hiddenTip:false, //toolTip是否显示
        lablePos: true, //label位置,true时在左边,false在上边
        lableTxt: false, //label中文字对齐方式,true左对齐,false右对齐
        onClick:function(e,val){console.log(e,val)},
        onLabelClick: function(val){console.log(val)},
        radioItems: [
          {
            value: 0,
            bsStyle: true,
            isChecked: false,
            text: '内容0'
          },
          {
            value: 1,
            bsStyle: true,
            isChecked: false,
            text: '内容1',
          },
          {
            value: 2,
            bsStyle: true,
            isChecked: true,
            text: '内容2'
          }
        ]
      }


Radiolist 调用方法

1.安装npm组件包

npm install @beisen/radio-list --save-dev

2.引用组件

import RadioList from "@beisen/radio-list"

3.传入参数


data:{
        hidden:false,
        disabled:true,
        required: true,
        hasRender: true,
        radioLabel: '测试测试测试测试',
        radioValue: '内容2',
        errorStatus:true, //是否报错
        errorMsg:"出错了~~~!", //报错信息
        helpMsg:"dqwdqw",
        sideTip:false ,//toolTip是否左右显示
        hiddenTip:false, //toolTip是否显示
        lablePos: true, //label位置,true时在左边,false在上边
        lableTxt: false, //label中文字对齐方式,true左对齐,false右对齐
        onClick:function(e,val){console.log(e,val)},
        onLabelClick: function(val){console.log(val)},
        radioItems: [
          {
            value: 0,
            bsStyle: true,
            isChecked: false,
            text: '内容0'
          },
          {
            value: 1,
            bsStyle: true,
            isChecked: false,
            text: '内容1',
          },
          {
            value: 2,
            bsStyle: true,
            isChecked: true,
            text: '内容2'
          }
        ]
      }
      //定义传入组件的数据

使用组件

<RadioList {...this.state} /> //将数据传入组件


Keywords

FAQs

Last updated on 15 Nov 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc