目前需要在组件上一个一个加fontfamily属性去使用自定义字体,无法统一配置实现。也可以考虑使用动态属性,自定义class实现AttributeModifier接口,把text需要固定的样式定义,然后在页面调用。参考文档:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/ts-universal-attributes-attribute-modifier-V5
目前需要在组件上一个一个加fontfamily属性去使用自定义字体,无法统一配置实现。也可以考虑使用动态属性,自定义class实现AttributeModifier接口,把text需要固定的样式定义,然后在页面调用。参考文档:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/ts-universal-attributes-attribute-modifier-V5