reactjs - React Material-UI 文本字段填充顶部 - 泰语
问题描述
我正在使用该库进行输入。但是当与泰语一起使用时,它需要额外的顶部填充才能正确显示单词,因为泰语有 2 级元音。例如,“ที่นั่น”之类的单词将在顶部被剪切。下面是我使用的代码。
<Grid item xs={12} md={10}>
<TextField required id="name" label="Remark name" fullWidth />
</Grid>
当我在 Textfield 中输入单词“ที่นั่น”时,只会显示这个。我尝试了各种风格来改变这一点,但没有成功。
解决方案
感谢您的所有评论。就我而言,我发现我需要将 paddingTop 放在 InputProps 中。所以,我使用的代码是:
const styles = theme => ({
thaiTextFieldInputProps:{
paddingTop: '5px'
},
});
进而
<TextField
InputProps={{
classes: {
input: classes.thaiTextFieldInputProps
}
}}
label="Thai Remark"
fullWidth
/>
推荐阅读
- jupyter-notebook - 无法连接到 Google Cloud 上的 Jupyter Notebook
- javascript - 如何用花括号包裹 json 的值?
- json - 将json解组到结构时如何不允许空字段
- jquery - 在 Node.js 中抓取 HTML 列表
- r - 如何将连续变量转换为r中的分类变量
- google-apps-script - 如何根据填充的单元格填充缺失的数据
- java - 你能把数组放到Java中的业务方法中吗
- r - 从不同列中的先前行计算列值
- python - 无法使用 selenium 将所需的键发送到下拉列表
- google-sheets - 如何比较一列中的两个单元格并查看它们是否在另一列中共享共同属性?