ux-pps-switch-items

| 属性 | 说明 | 类型 | 默认值 | | --- | --- | --- | --- | | list | 列表数据 | array | --- | | PropsWidth | 技术宽度 | Number | --- | | handerClick | 点击items | Function() | --- |

Usage no npm install needed!

<script type="module">
  import uxPpsSwitchItems from 'https://cdn.skypack.dev/ux-pps-switch-items';
</script>

README

API

属性 说明 类型 默认值
list 列表数据 array ---
PropsWidth 技术宽度 Number ---
handerClick 点击items Function() ---

example


import React, { Component } from 'react'
import SwitchItems from 'ux-pps-switch-items'

export default class extends Component {
    handerClick=(item,index)=>{
        console.log(item);
        console.log(index)
    }

    render () {
        let list=[{'Name':'掌声','Selected':true},
          {'Name':'呵呵呵','Selected':false},
          {'Name':'我我发','Selected':false},
        ];
        return <SwitchItems list={list}  PropsWidth={200} handerClick={this.handerClick}/>
    }
}

ps: 该组件是左右切换,并且可以点击items