From df2b9d95f647c946f311551c766ff9dda9598deb Mon Sep 17 00:00:00 2001 From: yp9522 Date: Tue, 25 Nov 2025 20:28:33 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20[Issues:#ID8NLG]=E4=BF=AE=E6=94=B9typog?= =?UTF-8?q?raphy&markdown-renderer=E5=BA=93=E7=9A=84=E4=B8=AD=E8=8B=B1?= =?UTF-8?q?=E6=96=87=E6=8C=87=E5=AF=BC=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yp9522 --- en/react-native-markdown-renderer.md | 22 ++++++--- en/react-native-typography.md | 22 ++++++--- zh-cn/react-native-markdown-renderer.md | 30 ++++++------- zh-cn/react-native-typography.md | 60 ++++++++++++------------- 4 files changed, 77 insertions(+), 57 deletions(-) diff --git a/en/react-native-markdown-renderer.md b/en/react-native-markdown-renderer.md index 9a24edef..1938d36e 100644 --- a/en/react-native-markdown-renderer.md +++ b/en/react-native-markdown-renderer.md @@ -14,26 +14,37 @@ > [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-markdown-renderer) -## Installation and Usage +Find the matching version information in the release address of a third-party library: -Find the matching version information in the release address of a third-party library: [@react-native-oh-tpl/react-native-markdown-renderer Releases](https://github.com/react-native-oh-library/react-native-markdown-renderer/releases).For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package. +| Third-party Library Version | Release Information | Supported RN Version | +| ---------- | ------------------------------------------------------------ | ---------- | +| 3.2.8 | [@react-native-oh-tpl/react-native-markdown-renderer Releases](https://github.com/react-native-oh-library/react-native-markdown-renderer/releases) | 0.72 | +| 3.3.0 | [@react-native-ohos/react-native-markdown-renderer Releases]() | 0.77 | -Go to the project directory and execute the following instruction: +For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package. +## Installation and Usage +Go to the project directory and execute the following instruction: #### **npm** ```bash +# 0.72 npm install @react-native-oh-tpl/react-native-markdown-renderer +# 0.77 +npm install @react-native-ohos/react-native-markdown-renderer ``` #### **yarn** ```bash +# 0.72 yarn add @react-native-oh-tpl/react-native-markdown-renderer +# 0.77 +yarn add @react-native-ohos/react-native-markdown-renderer ``` @@ -70,9 +81,10 @@ export default class Page extends PureComponent { ### Compatibility -To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. +This document is verified based on the following versions: -Find the matching version information in the release address of a third-party library: [@react-native-oh-tpl/react-native-markdown-renderer Releases](https://github.com/react-native-oh-library/react-native-markdown-renderer/releases). +1. RNOH: 0.72.20; SDK: HarmonyOS NEXT Developer Beta1; IDE: DevEco Studio 5.0.3.200; ROM: 3.0.0.18; +2. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.868; ROM: 6.0.0.112; ## Markdown components diff --git a/en/react-native-typography.md b/en/react-native-typography.md index 916757b0..412d219a 100644 --- a/en/react-native-typography.md +++ b/en/react-native-typography.md @@ -14,26 +14,37 @@ > [!TIP] [ GitHub address](https://github.com/react-native-oh-library/react-native-typography) -## Installation and Usage +Find the matching version information in the release address of a third-party library: -Find the matching version information in the release address of a third-party library: [@react-native-oh-tpl/react-native-typography Releases](https://github.com/react-native-oh-library/react-native-typography/releases).For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package. +| Third-party Library Version | Release Information | Supported RN Version | +| ---------- | ------------------------------------------------------------ | ---------- | +| 1.4.1 | [react-native-oh-tpl/react-native-typography Releases](https://github.com/react-native-oh-library/react-native-typography/releases) | 0.72 | +| 1.5.0 | [@react-native-ohos/react-native-typography Releases]() | 0.77 | -Go to the project directory and execute the following instruction: +For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package. +## Installation and Usage +Go to the project directory and execute the following instruction: #### **npm** ```bash +# 0.72 npm install @react-native-oh-tpl/react-native-typography +# 0.77 +npm install @react-native-ohos/react-native-typography ``` #### **yarn** ```bash +# 0.72 yarn add @react-native-oh-tpl/react-native-typography +# 0.77 +yarn add @react-native-ohos/react-native-typography ``` @@ -62,9 +73,10 @@ export function TypographyExample1() { ### Compatibility -To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. +This document is verified based on the following versions: -Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/react-native-typography Releases](https://github.com/react-native-oh-library/react-native-typography/releases) +1. RNOH: 0.72.20; SDK: HarmonyOS NEXT Developer Beta1; IDE: DevEco Studio 5.0.3.200; ROM: 3.0.0.18; +2. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.868; ROM: 6.0.0.112; ## Properties diff --git a/zh-cn/react-native-markdown-renderer.md b/zh-cn/react-native-markdown-renderer.md index 07abdc40..1e941ab9 100644 --- a/zh-cn/react-native-markdown-renderer.md +++ b/zh-cn/react-native-markdown-renderer.md @@ -14,14 +14,16 @@ > [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-markdown-renderer) -## 安装与使用 - 请到三方库的 Releases 发布地址查看配套的版本信息: | 三方库版本 | 发布信息 | 支持RN版本 | | ---------- | ------------------------------------------------------------ | ---------- | | 3.2.8 | [@react-native-oh-tpl/react-native-markdown-renderer Releases](https://github.com/react-native-oh-library/react-native-markdown-renderer/releases) | 0.72 | -| 3.2.9 | [@react-native-ohos/react-native-markdown-renderer Releases]() | 0.77 | +| 3.3.0 | [@react-native-ohos/react-native-markdown-renderer Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 + +## 安装与使用 进入到工程目录并输入以下命令: @@ -30,18 +32,18 @@ #### **npm** ```bash -#V3.2.8 +# 0.72 npm install @react-native-oh-tpl/react-native-markdown-renderer -#V3.2.9 +# 0.77 npm install @react-native-ohos/react-native-markdown-renderer ``` #### **yarn** ```bash -#V3.2.8 +# 0.72 yarn add @react-native-oh-tpl/react-native-markdown-renderer -#V3.2.9 +# 0.77 yarn add @react-native-ohos/react-native-markdown-renderer ``` @@ -79,14 +81,10 @@ export default class Page extends PureComponent { ### 兼容性 -要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 +本文档内容基于以下版本验证通过: -请到三方库的 Releases 发布地址查看配套的版本信息: - -| 三方库版本 | 发布信息 | 支持RN版本 | -| ---------- | ------------------------------------------------------------ | ---------- | -| 3.2.8 | [@react-native-oh-tpl/react-native-markdown-renderer Releases](https://github.com/react-native-oh-library/react-native-markdown-renderer/releases) | 0.72 | -| 3.2.9 | [@react-native-ohos/react-native-markdown-renderer Releases]() | 0.77 | +1. RNOH: 0.72.20; SDK: HarmonyOS NEXT Developer Beta1; IDE: DevEco Studio 5.0.3.200; ROM: 3.0.0.18; +2. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.868; ROM: 6.0.0.112; ## Markdown 组件 @@ -105,8 +103,8 @@ Markdown 组件的 Props | Name | Description | Type | Required | Platform | HarmonyOS Support | | ---------- | ------------------------------------------------------------------------------------------------ | -------- | -------- | ----------- | ----------------- | -| style | Overrides the built-in style of the original Markdown component | object | no | iOS/Android | yes | -| rules | Rendering rule of the markdowm syntax tag in the Markdown component. | function | yes | iOS/Android | yes | +| style | 覆盖原始 Markdown 组件内置样式的属性 | object | no | iOS/Android | yes | +| rules | Markdown 组件中标记语法标签的渲染规则 | function | yes | iOS/Android | yes | | markdownit | MarkdownIt 类的 md 实例,用于覆盖默认的 MarkdownIt 实例(默认:MarkdownIt({typographer: true})) | object | yes | iOS/Android | yes | ## 库相关变量、封装类及工具函数 diff --git a/zh-cn/react-native-typography.md b/zh-cn/react-native-typography.md index 1d2972b8..a776d55b 100644 --- a/zh-cn/react-native-typography.md +++ b/zh-cn/react-native-typography.md @@ -14,14 +14,16 @@ > [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-typography) -## 安装与使用 - 请到三方库的 Releases 发布地址查看配套的版本信息: | 三方库版本 | 发布信息 | 支持RN版本 | | ---------- | ------------------------------------------------------------ | ---------- | | 1.4.1 | [react-native-oh-tpl/react-native-typography Releases](https://github.com/react-native-oh-library/react-native-typography/releases) | 0.72 | -| 1.4.2 | [@react-native-ohos/react-native-typography Releases]() | 0.77 | +| 1.5.0 | [@react-native-ohos/react-native-typography Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 + +## 安装与使用 进入到工程目录并输入以下命令: @@ -30,18 +32,18 @@ #### **npm** ```bash -#v1.4.1 +# 0.72 npm install @react-native-oh-tpl/react-native-typography -#v1.4.2 +# 0.77 npm install @react-native-ohos/react-native-typography ``` #### **yarn** ```bash -#v1.4.1 +# 0.72 yarn add @react-native-oh-tpl/react-native-typography -#v1.4.2 +# 0.77 yarn add @react-native-ohos/react-native-typography ``` @@ -71,14 +73,10 @@ export function TypographyExample1() { ### 兼容性 -要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 +本文档内容基于以下版本验证通过: -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: - -| 三方库版本 | 发布信息 | 支持RN版本 | -| ---------- | ------------------------------------------------------------ | ---------- | -| 1.4.1 | [react-native-oh-tpl/react-native-typography Releases](https://github.com/react-native-oh-library/react-native-typography/releases) | 0.72 | -| 1.4.2 | [@react-native-ohos/react-native-typography Releases]() | 0.77 | +1. RNOH: 0.72.20; SDK: HarmonyOS NEXT Developer Beta1; IDE: DevEco Studio 5.0.3.200; ROM: 3.0.0.18; +2. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.868; ROM: 6.0.0.112; ## 属性 @@ -88,23 +86,23 @@ export function TypographyExample1() { | Name | Description | Type | Required | Platform | HarmonyOS Support | | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------- | -------- | ----------------- | -| material | Includes all the styles defined in the [Material Design Guidelines](https://material.io/guidelines/style/typography.html#typography-styles).Defines size, weight and color. | object | no | All | yes | -| materialDense | material`s Dense scripts | object | no | All | yes | -| materialTall | material`s Tall scripts | object | no | All | yes | -| human | Defined in the [Human Interface Guidelines](https://developer.apple.com/ios/human-interface-guidelines/visual-design/typography/).Defines size, weight and color. | object | no | All | yes | -| humanDense | human`s Dense scripts | object | no | All | yes | -| humanTall | human`s Tall scripts | object | no | All | yes | -| iOSUIKit | Extracted from [the official Apple sketch file](https://developer.apple.com/design/resources/) These are the text styles that fall under the category of iOS UIKit, and are used to build the UI components of iOS Apps. They build on top of the Human Interface styles, customizing some properties such as weight or letter spacing. | object | no | iOS | yes | -| iOSUIKitDense | iOSUIKit`s Dense scripts | object | no | iOS | yes | -| iOSUIKitTall | iOSUIKit`s Tall scripts | object | no | iOS | yes | -| systemWeights | A font weight in React Native is sometimes formed by a pair of a fontFamily and a fontWeight, but not always! It depends on the typeface, sometimes it's just. defined by the fontFamily. With these helpers, you don't have to worry about those inconsistencies. To combine them with a collection style (or your own styles) just spread them, as they are plain objects. | object | no | All | yes | -| systemDenseWeights | systemWeights`s Dense scripts | object | no | All | yes | -| systemTallWeights | systemWeights`s Tall scripts | object | no | All | yes | -| sanFranciscoWeights | San Francisco typeface | object | no | iOS | yes | -| robotoWeights | These weights are **only intended for Android**, as they directly reference the native Roboto typeface. | object | no | Android | yes | -| webWeights | These weights are **only intended for the web**, and render [react-native-web](https://github.com/necolas/react-native-web)'s system font stack. | object | no | Web | yes | -| iOSColors | Colors iOS | object | no | iOS | yes | -| materialColors | Colors Material | object | no | All | yes | +| material | 包含[Material Design 指南](https://material.io/guidelines/style/typography.html#typography-styles)中定义的所有样式。定义大小、粗细和颜色。 | object | no | All | yes | +| materialDense | material 的 Dense 脚本 | object | no | All | yes | +| materialTall | material 的 Tall 脚本 | object | no | All | yes | +| human | 定义于[Human Interface Guidelines](https://developer.apple.com/ios/human-interface-guidelines/visual-design/typography/)。定义大小、粗细和颜色。 | object | no | All | yes | +| humanDense | human 的 Dense 脚本 | object | no | All | yes | +| humanTall | human 的 Tall 脚本 | object | no | All | yes | +| iOSUIKit | 提取自[官方 Apple Sketch 文件](https://developer.apple.com/design/resources/)这些是属于 iOS UIKit 类别的文本样式,用于构建 iOS 应用的 UI 组件。它们建立在 Human Interface 样式的基础上,自定义了一些属性,如粗细或字母间距。 | object | no | iOS | yes | +| iOSUIKitDense | iOSUIKit 的 Dense 脚本 | object | no | iOS | yes | +| iOSUIKitTall | iOSUIKit 的 Tall 脚本 scripts | object | no | iOS | yes | +| systemWeights | 在 React Native 中,字体粗细有时由 fontFamily 和 fontWeight 成对组成,但并非总是如此!这取决于字体类型,有时仅由 fontFamily 定义。使用这些辅助工具,您无需担心这些不一致性。要将它们与集合样式(或您自己的样式)结合使用,只需展开它们即可,因为它们是普通对象。 | object | no | All | yes | +| systemDenseWeights | systemWeights 的 Dense 脚本 | object | no | All | yes | +| systemTallWeights | systemWeights 的 Tall 脚本 | object | no | All | yes | +| sanFranciscoWeights | San Francisco 字体 | object | no | iOS | yes | +| robotoWeights | 这些字重**仅适用于 Android**,因为它们直接引用了原生 Roboto 字体。 | object | no | Android | yes | +| webWeights | 这些字重**仅适用于网页**,并渲染[react-native-web](https://github.com/necolas/react-native-web)的系统字体堆栈。 | object | no | Web | yes | +| iOSColors | iOS颜色 | object | no | iOS | yes | +| materialColors | Material 颜色 | object | no | All | yes | ## 遗留问题 -- Gitee