Troila Mobile Ui

Troila Mobile Ui

  • Docs
  • API
  • Help
  • Blog

›卓朗云桌面-内部组件

Troila Mobile Ui

  • Getting Started

Components

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

卓朗云桌面-内部组件

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

ExtendsBackButton

基于react-navigation的HeaderBackButton的封装

规则

  • 继承导航器统一的返回按钮的同时,可以添加一个自定义文本的按钮

Example

iOS Android

Code

import React, { Component } from 'react';
import {
    ExtendsBackButton,
} from '../../components/theme';



const Navigator = createStackNavigator(
    {
        ListCreate:{
            screen:ListCreate,
            navigationOptions:({ navigation }) => ({
                title:'创建目录',
                headerLeft: (e)=>(
                    <ExtendsBackButton
                        onPress={() => {
                            
                        }}
                        title={'关闭'}
                        navigationProps={e}
                    />
                ),
            })
        },
    }
)

Props

属性说明类型默认值
onPress点击事件Function()=>{}
navigationPropsnavigationOptions的navigation propsObjectnull
title标题String''

请注意:

1.不允许把此组件直接赋值给headerLeft,必须要用函数接受参数并且赋值给属性后再返回

2.此组件必须要配置在react-navigation的navigationOptions中,不能单独使用

← BackgroundButtonHeaderTitleButton →
  • 规则
  • 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