Troila Mobile Ui

Troila Mobile Ui

  • Docs
  • API
  • Help
  • Blog

›Components

Troila Mobile Ui

  • Getting Started

Components

  • Text
  • ListView
  • List
  • TextInput
  • InputItem
  • Step
  • SpringAnimatedView

卓朗云桌面-内部组件

  • request (请求类)
  • BackgroundButton
  • ExtendsBackButton
  • HeaderTitleButton
  • HeaderImageButton
  • 注意事项
  • 不同平台和设备的入口

InputItem

基于react-native的TextInput的封装

规则

  • 包裹在List内使用效果更好

Example

iOS Android

Code

import React, { Component } from 'react';
import {
    View,
    StyleSheet,
    Image,
    Button,
} from 'react-native';
import { InputItem, TextInput, Text } from 'troila-mobile-ui';


export default class Example extends Component {
    render() {
        return (
            <View style={styles.container}>
                <InputItem
                    placeholder={'请输入内容'}
                    style={{ marginTop: 15, }}
                >
                    请输入内容
                </InputItem>
                <InputItem
                    placeholder={'请输入内容'}
                    style={{marginTop: 15,}}
                >
                    <Image
                        source={require('../assets/list_1.png')}
                        style={{ width: 20 }}
                    />
                </InputItem>
                <InputItem
                    placeholder={'请输入内容'}
                    style={{ marginTop: 15, }}
                >
                    <View>
                        <Image
                            source={require('../assets/list_1.png')}
                            style={{ width: 20 }}
                        />
                        <Text style={{marginVertical: 10,}}>测试内容</Text>
                        <Image
                            source={require('../assets/list_1.png')}
                            style={{ width: 20 }}
                        />
                    </View>
                </InputItem>
            </View>
        )
    }
}


const styles = StyleSheet.create({
    container: {
        flex: 1,
        backgroundColor: '#f5f5f9',
    }
})

Props

属性说明类型默认值
style外部容器样式Stylenull
inputStyleInput样式Stylenull
placeholder没有内容时的文字String
other propsTextInput props

更多 react-native TextInput 属性请参考 react-native TextInput (http://facebook.github.io/react-native/docs/textinput.html)

← TextInputStep →
  • 规则
  • Example
  • Code
  • Props
Troila Mobile Ui
Docs
Getting Started (or other categories)Guides (or other categories)API Reference (or other categories)
Community
User ShowcaseStack OverflowProject ChatTwitter
More
BlogGitHubStar
Facebook Open Source
Copyright © 2018 Your Name or Your Company Name