2.2.4 • Published 3 years ago

hosjoy-wi-ui v2.2.4

Weekly downloads
20
License
MIT
Repository
-
Last release
3 years ago

hosjoy-wi-ui

Links

install

npm install hosjoy-wi-ui -D

Usage

app.jsx

import 'hosjoy-wi-ui/dist/style/index.scss'

pages/picker/index.jsx

import Taro, { Component } from '@tarojs/taro'
import { View } from '@tarojs/components'
import {
    WiPicker
} from 'hosjoy-wi-ui'
import './index.scss'


export default class Index extends Component {
    constructor(props){
        super(props)
        this.state = {
            lists:[]
        }
    }

    componentWillMount () { }

    componentDidMount () {
    }

    componentWillUnmount () { }

    componentDidShow () { }

    componentDidHide () { }

    onCloseTest(){
        console.log('关闭后执行')
    }

    onConfirmTest(val){
        console.log(val)
    }
  config = {
      navigationBarTitleText: 'Picker组件'
  }

  render () {
      const _list = [
          {
              label:'美国',
              children:[
                  {
                      label:'上海',
                      children:[
                          {
                              label:'江宁'
                          },
                          {
                              label:'江北'
                          },
                          {
                              label:'建业'
                          },
                      ]
                  },
                  {
                      label:'北京',
                      children:[
                          {
                              label:'管店'
                          },
                          {
                              label:'杨庙'
                          },
                          {
                              label:'石坝'
                          },
                      ]
                  },
                  {
                      label:'南京'
                  },
                  {
                      label:'深圳'
                  },
              ]
          },
          {
              label:'中国',
              children:[
                  {
                      label:'芜湖',
                      children:[
                          {
                              label:'明光'
                          },
                          {
                              label:'蚯蚓'
                          },
                          {
                              label:'天长'
                          },
                      ]
                  },
                  {
                      label:'合肥',
                      children:[
                          {
                              label:'涧西'
                          },
                          {
                              label:'古沛'
                          },
                          {
                              label:'魏刚'
                          },
                      ]
                  },
                  {
                      label:'滁州'
                  },
              ]
          },
          {
              label:'巴西',
              children:[
                  {
                      label:'上海'
                  },
                  {
                      label:'北京'
                  },
                  {
                      label:'南京'
                  },
              ]
          },
          {
              label:'日本',
              children:[
                  {
                      label:'上海'
                  },
                  {
                      label:'北京'
                  },
                  {
                      label:'南京'
                  },
              ]
          }
      ]
      return (
          <View className='index'>
              <WiPicker
                  list={_list}
                  rangeKey='label'
                  confirmClick={this.onConfirmTest.bind(this)}
              >
                  <View>弹出</View>
              </WiPicker>

          </View>
      )
  }
}
2.2.4

3 years ago

2.2.3

3 years ago

2.2.2

3 years ago

2.2.1

4 years ago

2.2.0

4 years ago

2.1.10

4 years ago

2.1.9

4 years ago

2.1.8

4 years ago

2.1.7

4 years ago

2.1.6

4 years ago

2.1.5

4 years ago

2.1.2

4 years ago

2.1.4

4 years ago

2.1.3

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.6

4 years ago

2.0.4

4 years ago

2.0.3

4 years ago

1.6.1

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

1.6.0

4 years ago

1.5.10

4 years ago

1.5.9

4 years ago

1.5.8

4 years ago

1.5.7

4 years ago

1.5.6

4 years ago

1.5.5

4 years ago

1.5.4

4 years ago

1.5.3

4 years ago

1.5.2

4 years ago

1.5.1

4 years ago

1.5.0

4 years ago

1.4.0

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago