Javascript react native上的RTL支持

Javascript react native上的RTL支持,javascript,reactjs,react-native,native,Javascript,Reactjs,React Native,Native,我正在使用react native构建wordpress应用程序 我在加载应用程序'import{I18nManager}时使用了'react native' I18nManager.forceRTL(真)` 为了强制应用程序使用RTL,它对我来说很有效,但在postdetails中,即使使用了RTL,它仍然显示LTR flexDirection: Constants.RTL ? 'row-reverse' : 'row' -> (for the label text) 这是我的po

我正在使用react native构建wordpress应用程序

我在加载应用程序'import{I18nManager}时使用了'react native'

I18nManager.forceRTL(真)` 为了强制应用程序使用RTL,它对我来说很有效,但在postdetails中,即使使用了RTL,它仍然显示LTR

flexDirection: Constants.RTL ? 'row-reverse' : 'row'  ->  (for the label text)
这是我的postdetails styles.js代码,请帮助我找到解决此问题的方法

/**@格式*/
从“react native”导入{样式表,维度}
从“@common”导入{Constants}
const{width,height}=Dimensions.get('window')
常数vw=宽度/100
常数vh=高度/100
导出默认样式表。创建({
正文:{
弹性:1,
背景颜色:“#fff”,
宽度,
},
填写:{
弹性:1,
背景颜色:“#ffffff”,
},
卡片:{
宽度,
flexDirection:Constants.RTL?“行反转”:“行”,
},
方框:{
宽度:vw*40,
身高:100,
背景颜色:“#ccc”,
marginLeft:20,
玛金托普:10,
marginBottom:10,
},
标题:{
位置:'绝对',
排名:0,
左:0,,
zIndex:2,
右:0,,
背景颜色:“rgba(255,255,255,0.5)”,
溢出:“隐藏”,
高度:常数.Window.headerHeight,
},
线性梯度:{
身高:50,
zIndex:3,
宽度,
对齐项目:“柔性端”,
justifyContent:“柔性端”,
位置:'绝对',
},
linearGradientBottom:{
身高:50,
底部:0,
zIndex:3,
宽度,
对齐项目:“柔性端”,
justifyContent:“柔性端”,
位置:'绝对',
},
海德里克:{
身高:40,
位置:'绝对',
排名:0,
宽度,
zIndex:4,
},
图片:{
宽度:vw*40,
身高:90,
resizeMode:“封面”,
边缘左:8,
玛金托普:20,
marginBottom:10,
},
内容:{
宽度:vw*50,
marginLeft:14,
玛金托普:20,
marginBottom:30,
},
格雷罗:{
背景颜色:“#eee”,
},
菜单视图:{
背景颜色:“#f4”,
身高:40,
},
菜单项视图:{
玛金托普:6,
marginRight:6,
marginBottom:6,
边缘左:6,
身高:28,
},
菜单项:{
玛金托普:6,
marginRight:16,
marginBottom:6,
marginLeft:16,
尺寸:12,
容重:“500”,
颜色:“#8A939C”,
},
菜单活动:{
背景颜色:“#fff”,
边界半径:16,
边框宽度:1,
边框颜色:“#eee”,
},
菜单活动文本:{
颜色:“#000”,
},
横幅图像:{
宽度,
高度:宽度/2+40,
背景颜色:“rgba(67130208,0.2)”,
},
占位符图像:{
对齐项目:“居中”,
宽度,
高度:宽度/3,
为内容辩护:“中心”,
背景颜色:“rgba(67130208,0.2)”,
},
背景一:{
背景颜色:“rgba(58,75,133,0.6)”,
},
背景二:{
背景颜色:“rgba(188,59,36,0.6)”,
},
背景三:{
背景颜色:“rgba(57174840.6)”,
},
横幅文字:{
位置:'绝对',
底数:30,
背景色:“rgba(0,0,0,0.3)”,
宽度:vw*60,
},
横幅:{
玛金托普:12,
marginRight:12,
marginBottom:2,
marginLeft:12,
颜色:'白色',
尺寸:15,
},
横幅日期:{
颜色:“rgba(255,255,255,0.7)”,
字体大小:9,
容重:“500”,
marginLeft:12,
marginBottom:12,
},
时间:{
颜色:“#999”,
尺寸:12,
玛金托普:0,
marginBottom:0,
marginLeft:0,
},
标语:{
flexDirection:Constants.RTL?“行反转”:“行”,
alignItems:'flex start',
justifyContent:“flex start”,
marginBottom:6,
},
标签:{
背景颜色:“#aaa”,
边界半径:12,
alignSelf:“柔性端”,
marginRight:4,
},
标记文字:{
字体大小:9,
马金托普:1,
marginRight:8,
marginBottom:1,
边缘左:8,
颜色:'白色',
重量:'600',
},
列表:{
弹性:1,
背景颜色:“白色”,
paddingTop:0,
paddingRight:0,
填充底部:0,
paddingLeft:0,
},
颜色:{
位置:'绝对',
排名:0,
底部:0,
左:0,,
右:0,,
背景颜色:“#ebebebeb”,
},
标题:{
颜色:“#333”,
尺寸:22,
textAlign:'中心',
fontWeight:'200',
玛金托普:12,
},
标题小:{
尺寸:13,
颜色:“#999”,
textAlign:'中心',
marginBottom:10,
玛金托普:4,
},
产品项目:{
宽度:宽度-30,
身高:400,
玛金托普:5,
marginRight:5,
marginBottom:5,
边缘左:5,
},
详细信息块:{
对齐项目:“居中”,
背景颜色:“#fff”,
paddingTop:20,
paddingRight:20,
填充底部:20,
paddingLeft:20,
宽度,
},
滚动视图:{
背景颜色:“#fff”,
paddingTop:Constants.Window.headerHeight,
填充底部:200,
},
滚动视图内容:{
位置:'相对',
zIndex:9,
填充底部:200,
},
内部内容:{
背景颜色:“#fff”
},
详细说明:{
颜色:“#333”,
宽度:宽度-20,
玛金托普:16,
marginRight:16,
marginBottom:2,
marginLeft:13,
容重:“500”,
尺寸:22,
textAlign:Constants.RTL?'right':'left',
},
大图像:{
宽度,
高度:宽度-120,
resizeMode:“封面”,
},
大型内容:{
宽度,
位置:'绝对',
底部:0,
身高:100,
},
大标题:{
颜色:“#fff”,
尺码:18,
paddingTop:20,
paddingRight:20,
填充底部:0,
paddingLeft:20,
},
说明:{
背景颜色:“#fff”,
flexDirection:Constants.RTL?“行反转”:“行”,
},
图像背景:{
位置:'绝对',
排名:0,
左:0,,
右:0,,
宽度,
高度:常量。窗口。人头高度
},
详情小组:{
身高:380,
宽度,
对齐项目:“居中”,
justifyContent:“柔性端”,
},
工具栏:{
背景颜色:“黑色”,
},
共享图标:{
flexDirection:Constants.RTL?行反转