Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
68badab6
D
Docs
项目概览
OpenHarmony
/
Docs
大约 2 年 前同步成功
通知
161
Star
293
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
68badab6
编写于
9月 22, 2022
作者:
O
openharmony_ci
提交者:
Gitee
9月 22, 2022
浏览文件
操作
浏览文件
下载
差异文件
!9797 断链修改,文档优化
Merge pull request !9797 from LiAn/master
上级
91523f0c
7a5e3758
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
51 addition
and
51 deletion
+51
-51
zh-cn/application-dev/internationalization/intl-guidelines.md
...n/application-dev/internationalization/intl-guidelines.md
+4
-4
zh-cn/application-dev/reference/arkui-ts/ts-types.md
zh-cn/application-dev/reference/arkui-ts/ts-types.md
+47
-47
未找到文件。
zh-cn/application-dev/internationalization/intl-guidelines.md
浏览文件 @
68badab6
# Intl开发指导
本模块提供
提供
基础的应用国际化能力,包括时间日期格式化、数字格式化、排序等,相关接口在ECMA 402标准中定义。更多接口和使用方式请见
[
Intl
](
../reference/apis/js-apis-intl.md
)
。
本模块提供基础的应用国际化能力,包括时间日期格式化、数字格式化、排序等,相关接口在ECMA 402标准中定义。更多接口和使用方式请见
[
Intl
](
../reference/apis/js-apis-intl.md
)
。
[
I18N
](
i18n-guidelines.md
)
模块提供其他非ECMA 402定义的国际化接口,与本模块共同使用可提供完整地国际化支持能力。
...
...
@@ -198,7 +198,7 @@
var
collator
=
new
intl
.
Collator
();
```
另一种方法是使用开发者提供的Locale和其他相关参数来创建Collator对象,完整的参数列表参见[CollatorOptions](../reference/apis/js-apis-intl.md#collatoroptions
8
)。
另一种方法是使用开发者提供的Locale和其他相关参数来创建Collator对象,完整的参数列表参见[CollatorOptions](../reference/apis/js-apis-intl.md#collatoroptions
9
)。
```
js
var
collator
=
new
intl
.
Collator
(
"
zh-CN
"
,
{
localeMatcher
:
"
best fit
"
,
usage
:
"
sort
"
});
...
...
@@ -245,7 +245,7 @@
var
pluralRules
=
new
intl
.
PluralRules
();
```
另一种方法是使用开发者提供的Locale和其他相关参数来创建单复数对象。完整的参数列表参见[PluralRulesOptions](../reference/apis/js-apis-intl.md#pluralrulesoptions
8
)。
另一种方法是使用开发者提供的Locale和其他相关参数来创建单复数对象。完整的参数列表参见[PluralRulesOptions](../reference/apis/js-apis-intl.md#pluralrulesoptions
9
)。
```
js
var
pluralRules
=
new
intl
.
PluralRules
(
"
zh-CN
"
,
{
localeMatcher
:
"
best fit
"
,
type
:
"
cardinal
"
});
...
...
@@ -284,7 +284,7 @@
var
relativeTimeFormat
=
new
intl
.
RelativeTimeFormat
();
```
另一种方法是使用开发者提供的Locale和格式化参数来创建相对时间格式化对象。其中,格式化参数是可选的,完整的参数列表参见[ RelativeTimeFormatInputOptions](../reference/apis/js-apis-intl.md#relativetimeformatinputoptions
8
)。
另一种方法是使用开发者提供的Locale和格式化参数来创建相对时间格式化对象。其中,格式化参数是可选的,完整的参数列表参见[ RelativeTimeFormatInputOptions](../reference/apis/js-apis-intl.md#relativetimeformatinputoptions
9
)。
```
var relativeTimeFormat = new intl.RelativeTimeFormat("zh-CN", {numeric: "always", style: "long"});
...
...
zh-cn/application-dev/reference/arkui-ts/ts-types.md
浏览文件 @
68badab6
...
...
@@ -26,7 +26,7 @@
| -------- | -------------------------------------- |
| string | 需要显式指定像素单位,如'10px',也可设置百分比字符串,如'100%'。 |
| number | 默认单位vp。 |
|
Resource
| 使用引入资源的方式,引入系统资源或者应用资源中的尺寸。 |
|
[
Resource
](
#resource
)
| 使用引入资源的方式,引入系统资源或者应用资源中的尺寸。 |
## ResourceStr
...
...
@@ -35,7 +35,7 @@
| 类型 | 说明 |
| -------- | ---------------------------- |
| string | 字符串类型。 |
|
Resource
| 使用引入资源的方式,引入系统资源或者应用资源中的字符串。 |
|
[
Resource
](
#resource
)
| 使用引入资源的方式,引入系统资源或者应用资源中的字符串。 |
## Padding
...
...
@@ -43,10 +43,10 @@
| 名称 | 类型 | 必填 | 说明 |
| ------ | ------ | ---- | --------------- |
| top |
Length
| 否 | 组件内元素距组件顶部的尺寸。 |
| right |
Length
| 否 | 组件内元素距组件右边界的尺寸。 |
| bottom |
Length
| 否 | 组件内元素距组件底部的尺寸。 |
| left |
Length
| 否 | 组件内元素距组件左边界的尺寸。 |
| top |
[
Length
](
#length
)
| 否 | 组件内元素距组件顶部的尺寸。 |
| right |
[
Length
](
#length
)
| 否 | 组件内元素距组件右边界的尺寸。 |
| bottom |
[
Length
](
#length
)
| 否 | 组件内元素距组件底部的尺寸。 |
| left |
[
Length
](
#length
)
| 否 | 组件内元素距组件左边界的尺寸。 |
## Margin
...
...
@@ -54,10 +54,10 @@
| 名称 | 类型 | 必填 | 说明 |
| ------ | ------ | ---- | --------------- |
| top |
Length
| 否 | 组件外元素距组件顶部的尺寸。 |
| right |
Length
| 否 | 组件外元素距组件右边界的尺寸。 |
| bottom |
Length
| 否 | 组件外元素距组件底部的尺寸。 |
| left |
Length
| 否 | 组件外元素距组件左边界的尺寸。 |
| top |
[
Length
](
#length
)
| 否 | 组件外元素距组件顶部的尺寸。 |
| right |
[
Length
](
#length
)
| 否 | 组件外元素距组件右边界的尺寸。 |
| bottom |
[
Length
](
#length
)
| 否 | 组件外元素距组件底部的尺寸。 |
| left |
[
Length
](
#length
)
| 否 | 组件外元素距组件左边界的尺寸。 |
## EdgeWidths<sup>9+</sup>
...
...
@@ -65,10 +65,10 @@
| 名称 | 类型 | 必填 | 说明 |
| ------ | ------ | ---- | -------- |
| top |
Length
| 否 | 组件上边框宽度。 |
| right |
Length
| 否 | 组件右边框宽度。 |
| bottom |
Length
| 否 | 组件下边框宽度。 |
| left |
Length
| 否 | 组件左边框宽度。 |
| top |
[
Length
](
#length
)
| 否 | 组件上边框宽度。 |
| right |
[
Length
](
#length
)
| 否 | 组件右边框宽度。 |
| bottom |
[
Length
](
#length
)
| 否 | 组件下边框宽度。 |
| left |
[
Length
](
#length
)
| 否 | 组件左边框宽度。 |
## BorderRadiuses<sup>9+</sup>
...
...
@@ -76,10 +76,10 @@
| 名称 | 类型 | 必填 | 说明 |
| ----------- | ------ | ---- | ---------- |
| topLeft |
Length
| 否 | 组件左上角圆角半径。 |
| topRight |
Length
| 否 | 组件右上角圆角半径。 |
| bottomLeft |
Length
| 否 | 组件左下角圆角半径。 |
| bottomRight |
Length
| 否 | 组件右下角圆角半径。 |
| topLeft |
[
Length
](
#length
)
| 否 | 组件左上角圆角半径。 |
| topRight |
[
Length
](
#length
)
| 否 | 组件右上角圆角半径。 |
| bottomLeft |
[
Length
](
#length
)
| 否 | 组件左下角圆角半径。 |
| bottomRight |
[
Length
](
#length
)
| 否 | 组件右下角圆角半径。 |
## EdgeColors<sup>9+</sup>
...
...
@@ -87,10 +87,10 @@
| 名称 | 类型 | 必填 | 说明 |
| ------ | ------------- | ---- | -------- |
| top |
ResourceColor
| 否 | 组件上边框颜色。 |
| right |
ResourceColor
| 否 | 组件右边框颜色。 |
| bottom |
ResourceColor
| 否 | 组件下边框颜色。 |
| left |
ResourceColor
| 否 | 组件左边框颜色。 |
| top |
[
ResourceColor
](
#resourcecolor8
)
| 否 | 组件上边框颜色。 |
| right |
[
ResourceColor
](
#resourcecolor8
)
| 否 | 组件右边框颜色。 |
| bottom |
[
ResourceColor
](
#resourcecolor8
)
| 否 | 组件下边框颜色。 |
| left |
[
ResourceColor
](
#resourcecolor8
)
| 否 | 组件左边框颜色。 |
## EdgeStyles<sup>9+</sup>
...
...
@@ -98,10 +98,10 @@
| 名称 | 类型 | 必填 | 说明 |
| ------ | ----------- | ---- | -------- |
| top |
BorderStyle
| 否 | 组件上边框样式。 |
| right |
BorderStyle
| 否 | 组件右边框样式。 |
| bottom |
BorderStyle
| 否 | 组件下边框样式。 |
| left |
BorderStyle
| 否 | 组件左边框样式。 |
| top |
[
BorderStyle
](
ts-appendix-enums.md#borderstyle
)
| 否 | 组件上边框样式。 |
| right |
[
BorderStyle
](
ts-appendix-enums.md#borderstyle
)
| 否 | 组件右边框样式。 |
| bottom |
[
BorderStyle
](
ts-appendix-enums.md#borderstyle
)
| 否 | 组件下边框样式。 |
| left |
[
BorderStyle
](
ts-appendix-enums.md#borderstyle
)
| 否 | 组件左边框样式。 |
## Offset
...
...
@@ -110,8 +110,8 @@
| 名称 | 类型 | 必填 | 说明 |
| ---- | ------ | ---- | -------- |
| dx |
Length
| 是 | 水平方向偏移量。 |
| dy |
Length
| 是 | 竖直方向偏移量。 |
| dx |
[
Length
](
#length
)
| 是 | 水平方向偏移量。 |
| dy |
[
Length
](
#length
)
| 是 | 竖直方向偏移量。 |
## ResourceColor<sup>8+</sup>
...
...
@@ -119,10 +119,10 @@
| 类型 | 说明 |
| ---------------------------------------- | --------------------------- |
|
[
Color
](
../reference/arkui-ts/
ts-appendix-enums.md#color
)
| 颜色枚举值。 |
|
[
Color
](
ts-appendix-enums.md#color
)
| 颜色枚举值。 |
| number | HEX格式颜色。 |
| string | rgb或者rgba格式颜色。 |
|
Resource
| 使用引入资源的方式,引入系统资源或者应用资源中的颜色。 |
|
[
Resource
](
#resource
)
| 使用引入资源的方式,引入系统资源或者应用资源中的颜色。 |
## LengthConstrain
...
...
@@ -130,8 +130,8 @@
| 名称 | 类型 | 必填 | 说明 |
| --------- | ------ | ---- | ------- |
| minLength |
Length
| 是 | 组件最小长度。 |
| maxLength |
Length
| 是 | 组件最大长度。 |
| minLength |
[
Length
](
#length
)
| 是 | 组件最小长度。 |
| maxLength |
[
Length
](
#length
)
| 是 | 组件最大长度。 |
## Font
...
...
@@ -141,9 +141,9 @@
| 名称 | 类型 | 必填 | 说明 |
| ------ | ---------------------------------------- | ---- | ---------------------------------------- |
| size |
[
Length
](
#length
)
| 否 | 设置文本尺寸,Length为number类型时,使用fp单位。 |
| weight |
[
FontWeight
](
../reference/arkui-ts/
ts-appendix-enums.md#fontweight
)
\|
number
\|
string | 否 | 设置文本的字体粗细,number类型取值[100, 900],取值间隔为100,默认为400,取值越大,字体越粗。 |
| weight |
[
FontWeight
](
ts-appendix-enums.md#fontweight
)
\|
number
\|
string | 否 | 设置文本的字体粗细,number类型取值[100, 900],取值间隔为100,默认为400,取值越大,字体越粗。 |
| family | string
\|
[
Resource
](
#resource
)
| 否 | 设置文本的字体列表。使用多个字体,使用','进行分割,优先级按顺序生效。例如:'Arial, sans-serif'。 |
| style |
[
FontStyle
](
../reference/arkui-ts/
ts-appendix-enums.md#fontstyle
)
| 否 | 设置文本的字体样式。 |
| style |
[
FontStyle
](
ts-appendix-enums.md#fontstyle
)
| 否 | 设置文本的字体样式。 |
## Area<sup>8+</sup>
...
...
@@ -163,8 +163,8 @@
| 名称 | 类型 | 必填 | 说明 |
| ---- | ------ | ---- | --------------------------- |
| x |
Length
| 否 | x轴坐标,作为返回值时,类型为number,单位vp。 |
| y |
Length
| 否 | y轴坐标,作为返回值时,类型为number,单位vp。 |
| x |
[
Length
](
#length
)
| 否 | x轴坐标,作为返回值时,类型为number,单位vp。 |
| y |
[
Length
](
#length
)
| 否 | y轴坐标,作为返回值时,类型为number,单位vp。 |
## ConstraintSizeOptions
...
...
@@ -172,10 +172,10 @@
| 名称 | 类型 | 必填 | 说明 |
| --------- | ------ | ---- | ------- |
| minWidth |
Length
| 否 | 元素最小宽度。 |
| maxWidth |
Length
| 否 | 元素最大宽度。 |
| minHeight |
Length
| 否 | 元素最小高度。 |
| maxHeight |
Length
| 否 | 元素最大高度。 |
| minWidth |
[
Length
](
#length
)
| 否 | 元素最小宽度。 |
| maxWidth |
[
Length
](
#length
)
| 否 | 元素最大宽度。 |
| minHeight |
[
Length
](
#length
)
| 否 | 元素最小高度。 |
| maxHeight |
[
Length
](
#length
)
| 否 | 元素最大高度。 |
## SizeOptions
...
...
@@ -183,8 +183,8 @@
| 名称 | 类型 | 必填 | 说明 |
| ------ | ------ | ---- | ----- |
| width |
Length
| 否 | 元素宽度。 |
| height |
Length
| 否 | 元素高度。 |
| width |
[
Length
](
#length
)
| 否 | 元素宽度。 |
| height |
[
Length
](
#length
)
| 否 | 元素高度。 |
## BorderOptions
...
...
@@ -193,10 +193,10 @@
| 名称 | 类型 | 必填 | 说明 |
| ------ | ---------------------------------------- | ---- | ------- |
| width |
Length
\|
EdgeWidths
<sup>
9+
</sup>
| 否 | 边框宽度。 |
| color |
ResourceColor
\|
EdgeColors
<sup>
9+
</sup>
| 否 | 边框颜色。 |
| radius |
Length
\|
BorderRadiuses
<sup>
9+
</sup>
| 否 | 边框圆角半径。 |
| style |
[
BorderStyle
](
../reference/arkui-ts/
ts-appendix-enums.md#borderstyle
)
\|
EdgeStyles
<sup>
9+
</sup>
| 否 | 边框样式。 |
| width |
[
Length
](
#length
)
\|
[
EdgeWidths
](
#edgewidths9
)
<sup>
9+
</sup>
| 否 | 边框宽度。 |
| color |
[
ResourceColor
](
#resourcecolor8
)
\|
[
EdgeColors
](
#edgecolors9
)
<sup>
9+
</sup>
| 否 | 边框颜色。 |
| radius |
[
Length
](
#length
)
\|
[
BorderRadiuses
](
#borderradiuses9
)
<sup>
9+
</sup>
| 否 | 边框圆角半径。 |
| style |
[
BorderStyle
](
ts-appendix-enums.md#borderstyle
)
\|
EdgeStyles
<sup>
9+
</sup>
| 否 | 边框样式。 |
## ColorFilter<sup>9+</sup>
...
...
@@ -204,7 +204,7 @@
| 名称 | 类型 | 必填 | 描述 |
| ----------- | -------- | ---- | ---------------------------------------- |
| constructor | number[] | 是 | 创建具有4
*5矩阵的颜色过滤器, 入参为[m
*
n]位于m行和n列中矩阵值, 矩阵是行优先的。 |
| constructor | number[] | 是 | 创建具有4
\*
5矩阵的颜色过滤器, 入参为[m
\
*
n]位于m行和n列中矩阵值, 矩阵是行优先的。 |
## CustomBuilder<sup>8+</sup>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录