预览 二维码

/** @jsx createElement */
import {createElement, Component} from 'weex-rx';
import { View, Text} from 'nuke-components';
import { Button, Modal,Picker } from 'nuke';
import {mount} from 'nuke-mounter';

let ds=[{key:'111',value:'大家好'},{key:'222',value:'aaa'},{key:'333',value:'aaa'},{key:'11111',value:'aaa'},{key:'3443423',value:'aaa'},{key:'765675',value:'aaa'},{key:'1232132123',value:'aaa'},{key:'4455555',value:'aaa'}]

let App = class NukeDemoIndex extends Component {
    constructor() {
        super(); 
    }

    press() {
        Picker.show({title:'请选择',dataSource:ds,maskClosable:true},function(e){
            console.log('select item ',e)
        },function(e){
            console.log('canceled')
        });
        Modal.toast('4444444')   
    }

    render() {
        return (
            <View>
                <View style={{flexDirection:'row',marginBottom:'20rem'}}>
                    <Button onPress={this.press.bind(this)} type="normal">点我选择</Button>
                </View>
            </View>

        );
    }
}

mount(<App/>, mountNode);

普通。