gpt4 book ai didi

reactjs - fontFamily "$text-font-family"不是系统字体,没有通过 Font.loadAsync 加载

转载 作者:行者123 更新时间:2023-12-01 23:24:30 24 4
gpt4 key购买 nike

这是react expo项目,使用react-native-form-validation进行验证时出现错误。

<Input
value={fullName}
label="Full Name"
captionTextStyle={styles.captionTextStyle}
caption={errors.fullName.length > 0 && errors.fullName}
status={errors.fullName.length > 0 ? "danger" : ""}
onChangeText={value => this.handleChange("fullName", value)}
/>

这是使用 react-native-ui-kitten 验证输入的一部分。

错误运行是因为输入中的所有文本都像标签和输入文本。

我没有找到这个错误发生的原因。

最佳答案

我遇到了同样的错误。原因是 ui-kitten 库使用“OpenSans-Regular”。参见:ui-kitten-documentation

你可以添加OpenSans-Regular的.ttf字体到 Assets 文件夹。

然后通过expo-font加载字体到系统。参见:Expo documentation

enter image description here

关于reactjs - fontFamily "$text-font-family"不是系统字体,没有通过 Font.loadAsync 加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67515119/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com