当我从桌面视图更改为移动视图时,整个布局会调整大小。宽度为500像素的元素不应占据整个屏幕。
我希望移动设备看起来与台式机相同。
我尝试将import React from 'react';
import { TextInput, FlatList } from 'react-native';
export default class App extends React.Component {
render() {
return (
<FlatList
data={["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t"]}
keyExtractor={item => item}
renderItem={({item}) => (
<TextInput placeholder="0.0"
keyboardType='decimal-pad'
onFocus={() => {void(0)}}
/>
)}
/>
);
}
}
添加到每个index.php,但没有任何变化。
答案 0 :(得分:0)
我将<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
添加到另一个index.php中,它有效:D
答案 1 :(得分:0)
语法缺少一些字符(逗号,引号)。您可以尝试一下是否可行:
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />