【发布时间】:2019-11-10 20:31:29
【问题描述】:
我正在使用 Gifted Chat https://github.com/FaridSafi/react-native-gifted-chat/,但我需要一些标签才能使用另一种语言,即此处的 LoadEarlier 标签:https://github.com/FaridSafi/react-native-gifted-chat/blob/master/src/LoadEarlier.tsx
在这里定义:
static defaultProps = {
onLoadEarlier: () => {},
isLoadingEarlier: false,
label: 'Load earlier messages',
containerStyle: {},
wrapperStyle: {},
textStyle: {},
activityIndicatorStyle: {},
activityIndicatorColor: 'white',
activityIndicatorSize: 'small',
}
static propTypes = {
onLoadEarlier: PropTypes.func,
isLoadingEarlier: PropTypes.bool,
label: PropTypes.string,
containerStyle: ViewPropTypes.style,
wrapperStyle: ViewPropTypes.style,
textStyle: PropTypes.any,
activityIndicatorStyle: ViewPropTypes.style,
activityIndicatorColor: PropTypes.string,
activityIndicatorSize: PropTypes.string,
}
我通过导入 react-native-gifted-chat 组件来使用聊天,然后只使用 <GiftedChat /> 作为它所拥有的道具的一部分:
loadEarlier={true}
isLoadingEarlier={false}
我想知道是否可以通过某种方式访问该标签以将“加载早期消息”修改为另一种语言。我想不通。
【问题讨论】: