组件

BlogScreen

<BlogScreen / >

构造函数

<BlogScreen / >

您可以使用此组件在自定义屏幕中显示Blog屏幕。

属性:
的名字 类型 属性 描述
screenTitle <可选>

屏幕标题列表。默认值来自BuddyBoss网站的翻译文件

showSearch <可选>

使用隐藏搜索框

hideTitle <可选>

使用真正的隐藏屏幕标题

hideFilters <可选>

使用真正的在屏幕中隐藏过滤器

hideNavigationHeader <可选>

使用真正的隐藏屏幕标题容器

headerHeight <可选>

定义头高度

例子

使用react导航标签来显示Blog和Activities列表屏幕

/ /在custom_code /组件/ MyCustomScreen.js……import React from ' React ';import {View, Text} from 'react-native';从'react-navigation'中导入{createAppContainer};从'react-navigation-tabs'中导入{createaterialtoptabnavigator};import {createStackNavigator} from 'react-navigation-stack';import BlogScreen from "@src/containers/Custom/BlogScreen";导入actitiesscreen from "@src/containers/Custom/ actitiesscreen ";const MyCustomScreen = (props) => (   Hello {props. screenprops .auth.user.user_nicename}!    ) const Tabs = createMaterialTopTabNavigator( { MyBlog: { screen: MyCustomScreen, navigationOptions: { tabBarLabel: ({ tintColor }) => (  Blog  ) } }, MyActivity: { screen: ActivitiesScreen, navigationOptions: { tabBarLabel: ({ tintColor }) => (  Activities  ) } } }, { initialRouteName: 'MyBlog', swipeEnabled: true, tabBarOptions: { style: { height: 45, backgroundColor: '#fff', marginTop: 50 }, indicatorStyle: { backgroundColor: 'red', }, activeTintColor: 'black', inactiveTintColor: 'gray', }, }, ); const MyCustomScreenNavigator = createStackNavigator({ Tabs: { screen: Tabs, navigationOptions: { header: null } } }); MyCustomScreenNavigator.navigationOptions = { header: null } export default MyCustomScreenNavigator; //In custom_code/index.js... ... import MyCustomScreen from "./components/MyCustomScreen"; export const applyCustomCode = externalCodeSetup => { externalCodeSetup.navigationApi.addNavigationRoute( "book", "BookScreen", MyCustomScreen, "All" ); externalCodeSetup.navigationApi.addNavigationRoute( "book", "BookScreen", MyCustomScreen, "Main" ); }
Baidu