New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

igroot-tags

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

igroot-tags

简单的示例 ```jsx import Tags from 'igroot-tags' import React, { Component } from 'react' class Dome extends Component { render() { return ( 多选 <Tags options={[ { label: '类型1', value: '1' }, { label: '类型2', value: '2' }, {

npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

受控的tags组件

简单的示例

import Tags from 'igroot-tags'
import React, { Component } from 'react'
class Dome extends Component {
    render() {
        return (
            <div>
                <h3 style={{ height: 40 }}>多选</h3>
                <Tags options={[
                    {
                        label: '类型1',
                        value: '1'
                    },
                    {
                        label: '类型2',
                        value: '2'
                    },
                    {
                        label: '类型3',
                        value: '3'
                    },
                    {
                        label: '类型4',
                        value: '4'
                    }
                ]} />
                <h3 style={{ height: 40 }}>单选</h3>
                <Tags
                    radio
                    options={[
                        {
                            label: '类型1',
                            value: '1'
                        },
                        {
                            label: '类型2',
                            value: '2'
                        },
                        {
                            label: '类型3',
                            value: '3'
                        },
                        {
                            label: '类型4',
                            value: '4'
                        }
                    ]} />
            </div>
        )
    }
}
ReactDOM.render(<Dome />, mountNode)

props

props类型说明
optionsarraytags的选项,只支持label和value的形式
radioboolean单选 ,默认为多选状态

Keywords

igroot

FAQs

Package last updated on 11 Jun 2018

Related posts