diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-blank.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-blank.md index 04e04b47272a13c9e4068134837c016e547a022f..712f1619796f55e7e730460806e362b155ec4838 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-blank.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-blank.md @@ -23,15 +23,15 @@ Blank(min?: Length) **参数:** -| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | -| ------ | ------------------------------ | ---- | ------ | ------------------------------------ | -| min | [Length](../../ui/ts-types.md) | 否 | 0 | 空白填充组件在容器主轴上的最小大小。 | +| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | +| ------ | ---------------------------- | ---- | ------ | ------------------------------------ | +| min | [Length](ts-types.md#length) | 否 | 0 | 空白填充组件在容器主轴上的最小大小。 | ## 属性 -| 名称 | 参数类型 | 默认值 | 描述 | -| ----- | -------- | -------- | ------------------------ | -| color | [ResourceColor](../../ui/ts-types.md) | 0xffffff | 设置空白填充的填充颜色。 | +| 名称 | 参数类型 | 默认值 | 描述 | +| ----- | ------------------------------------------- | -------- | ------------------------ | +| color | [ResourceColor](ts-types.md#resourcecolor8) | 0xffffff | 设置空白填充的填充颜色。 | > **说明:** > diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-button.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-button.md index 24658816288295310ec2b2a37901db0c897d82e2..8980ae36f882c3819a81b53851d722d728e928f5 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-button.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-button.md @@ -35,7 +35,7 @@ | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | | ------- | ------ | ---- | ---- | ------------- | -| label | [ResourceStr](../../ui/ts-types.md) | 否 | - | 按钮文本内容。 | +| label | [ResourceStr](ts-types.md#resourcestr8) | 否 | - | 按钮文本内容。 | | options | Object | 否 | - | 见options参数说明。 | ## 属性 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-checkbox.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-checkbox.md index ee71c65e92e81eb7d5fd494dd9bfc4e17790b553..1ed06ba87e197e56bfe813e880cfabf6766887a5 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-checkbox.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-checkbox.md @@ -30,7 +30,7 @@ Checkbox( name?: string, group?: string ) | 名称 | 参数类型 | 默认值 | 描述 | | ------------- | ----- | ----- | ------------ | | select | boolean | false | 设置多选框是否选中。 | -| selectedColor | [ResourceColor](../../ui/ts-types.md) | - | 设置多选框选中状态颜色。 | +| selectedColor | [ResourceColor](ts-types.md#resourcecolor8) | - | 设置多选框选中状态颜色。 | ## 事件 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-checkboxgroup.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-checkboxgroup.md index dfcd6ae75ee000c5c3cd2af2741850fa688006f7..218afeda49fc2a840d4d26e9491d2b121ebe8bc2 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-checkboxgroup.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-checkboxgroup.md @@ -31,7 +31,7 @@ CheckboxGroup( group?: string ) | 名称 | 参数类型 | 默认值 | 描述 | | ------------- | ----- | ----- | ---------------- | | selectAll | boolean | false | 设置是否全选。 | -| selectedColor | [ResourceColor](../../ui/ts-types.md) | - | 设置被选中或部分选中状态的颜色。 | +| selectedColor | [ResourceColor](ts-types.md#resourcecolor8) | - | 设置被选中或部分选中状态的颜色。 | ## 事件 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-divider.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-divider.md index 9573a6e885b63c1b5a54002f6f336be4ad516163..dc170aba22056f7a8f723b88c5a1852354a0d81c 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-divider.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-divider.md @@ -20,12 +20,12 @@ Divider() ## 属性 -| 名称 | 参数类型 | 默认值 | 描述 | -| ----------- | ---------------------------------------- | ----------------- | ---------------------------------------- | -| vertical | boolean | false | 使用水平分割线还是垂直分割线,false: 水平分割线, true:垂直分割线。 | -| color | [ResourceColor](../../ui/ts-types.md) | - | 设置分割线颜色。 | -| strokeWidth | [Length](../../ui/ts-types.md) | 1 | 设置分割线宽度。 | -| lineCap | [LineCapStyle](ts-appendix-enums.md#linecapstyle枚举说明) | LineCapStyle.Butt | 设置分割线条的端点样式。 | +| 名称 | 参数类型 | 默认值 | 描述 | +| ----------- | --------------------------------------------------------- | ----------------- | ------------------------------------------------------------ | +| vertical | boolean | false | 使用水平分割线还是垂直分割线,false: 水平分割线, true:垂直分割线。 | +| color | [ResourceColor](ts-types.md#resourcecolor8) | - | 设置分割线颜色。 | +| strokeWidth | [Length](ts-types.md#length) | 1 | 设置分割线宽度。 | +| lineCap | [LineCapStyle](ts-appendix-enums.md#linecapstyle枚举说明) | LineCapStyle.Butt | 设置分割线条的端点样式。 | ## 事件 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-image.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-image.md index a2efcfc057fee112e9d96fa4e15d3aedd71baf4a..4ace65a700bfc582bd1dcee9f24348fe2ed43e69 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-image.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-image.md @@ -33,15 +33,15 @@ Image(src: string | PixelMap | Resource) **参数:** -| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | -| ---- | ---------------------------------------- | ---- | ---- | ---------------------------------------- | -| src | string\| [PixelMap](../apis/js-apis-image.md#pixelmap7)\| [Resource](../../ui/ts-types.md#resource类型) | 是 | - | 图片的数据源,支持本地图片和网络图片。
当使用相对路径引用图片资源时,例如`Image("common/test.jpg")`,不支持该Image组件被跨包/跨模块调用,建议使用`$r`方式来管理需全局使用的图片资源。
\- 支持的图片格式包括png、jpg、bmp、svg和gif。
\- 支持`Base64`字符串。格式`data:image/[png\|jpeg\|bmp\|webp];base64,[base64 data]`, 其中`[base64 data]`为`Base64`字符串数据。
\- 支持`dataability://`路径前缀的字符串,用于访问通过data ability提供的图片路径。 | +| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | +| ------ | ------------------------------------------------------------ | ---- | ------ | ------------------------------------------------------------ | +| src | string\| [PixelMap](../apis/js-apis-image.md#pixelmap7)\| [Resource](ts-types.md#resource) | 是 | - | 图片的数据源,支持本地图片和网络图片。
当使用相对路径引用图片资源时,例如`Image("common/test.jpg")`,不支持该Image组件被跨包/跨模块调用,建议使用`$r`方式来管理需全局使用的图片资源。
\- 支持的图片格式包括png、jpg、bmp、svg和gif。
\- 支持`Base64`字符串。格式`data:image/[png\|jpeg\|bmp\|webp];base64,[base64 data]`, 其中`[base64 data]`为`Base64`字符串数据。
\- 支持`dataability://`路径前缀的字符串,用于访问通过data ability提供的图片路径。 | ## 属性 | 名称 | 参数类型 | 默认值 | 描述 | | --------------------- | ------------------------------------------------------- | -------- | ------------------------------------------------------------ | -| alt | string \| [Resource](../../ui/ts-types.md#resource类型) | - | 加载时显示的占位图。支持本地图片和网络路径。 | +| alt | string \| [Resource](ts-types.md#resource) | - | 加载时显示的占位图。支持本地图片和网络路径。 | | objectFit | [ImageFit](ts-appendix-enums.md#imagefit) | Cover | 设置图片的缩放类型。 | | objectRepeat | [ImageRepeat](ts-appendix-enums.md#imagerepeat枚举说明) | NoRepeat | 设置图片的重复样式。
>  **说明:**
> - svg类型图源不支持该属性。 | | interpolation | ImageInterpolation | None | 设置图片的插值效果,即减轻低清晰度图片在放大显示的时候出现的锯齿问题,仅针对图片放大插值。
>  **说明:**
> - svg类型图源不支持该属性。
> - PixelMap资源不支持该属性。 | @@ -49,7 +49,7 @@ Image(src: string | PixelMap | Resource) | sourceSize | {
width: number,
height: number
} | - | 设置图片解码尺寸,将原始图片解码成指定尺寸的图片,number类型单位为px。
>  **说明:**
> - PixelMap资源不支持该属性。 | | matchTextDirection | boolean | false | 设置图片是否跟随系统语言方向,在RTL语言环境下显示镜像翻转显示效果。 | | fitOriginalSize | boolean | true | 图片组件尺寸未设置时,其显示尺寸是否跟随图源尺寸。 | -| fillColor | [ResourceColor](../../ui/ts-types.md) | - | 仅对svg图源生效,设置后会替换svg图片的fill颜色。 | +| fillColor | [ResourceColor](ts-types.md#resourcecolor8) | - | 仅对svg图源生效,设置后会替换svg图片的fill颜色。 | | autoResize | boolean | true | 是否需要在图片解码过程中对图源做resize操作,该操作会根据显示区域的尺寸决定用于绘制的图源尺寸,有利于减少内存占用。 | | syncLoad8+ | boolean | false | 设置是否同步加载图片,默认是异步加载。同步加载时阻塞UI线程,不会显示占位图。 | diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-loadingprogress.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-loadingprogress.md index a9de525c51a98599f6c4c2b23be43b996e11532e..c0b5ffe4c0de075b6c081c20d378a916a0c95c04 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-loadingprogress.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-loadingprogress.md @@ -27,7 +27,7 @@ LoadingProgress() | 名称 | 参数类型 | 默认值 | 描述 | | ----- | ----- | ---- | ----------- | -| color | [ResourceColor](../../ui/ts-types.md) | - | 设置加载进度条前景色。 | +| color | [ResourceColor](ts-types.md#resourcecolor8) | - | 设置加载进度条前景色。 | ## 示例 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-navigation.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-navigation.md index 2081f0b2f1a57fd5c8abecc35452132dfdc0c6d2..d2478d5c598daadc3cf85afd41a4c866d3698f9b 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-navigation.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-navigation.md @@ -28,11 +28,11 @@ Navigation() | 名称 | 参数类型 | 默认值 | 描述 | | -------------- | ---------------------------------------- | ------------------------ | ---------------------------------------- | -| title | string \| [CustomBuilder](../../ui/ts-types.md)8+ | - | 页面标题。 | +| title | string \| [CustomBuilder](ts-types.md#custombuilder8)8+ | - | 页面标题。 | | subtitle | string | - | 页面副标题。 | -| menus | Array8+ | - | 页面右上角菜单。 | +| menus | Array8+ | - | 页面右上角菜单。 | | titleMode | NavigationTitleMode | NavigationTitleMode.Free | 页面标题栏显示模式。 | -| toolBar | {
items:Array<Object> }
\| [CustomBuilder](../../ui/ts-types.md)8+ | - | 设置工具栏内容。
items: 工具栏所有项。 | +| toolBar | {
items:Array<Object> }
\| [CustomBuilder](ts-types.md#custombuilder8)8+ | - | 设置工具栏内容。
items: 工具栏所有项。 | | hideToolBar | boolean | false | 设置隐藏/显示工具栏:
true: 隐藏工具栏。
false: 显示工具栏。 | | hideTitleBar | boolean | false | 隐藏标题栏。 | | hideBackButton | boolean | false | 隐藏返回键。 | diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-progress.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-progress.md index 5a607c7e2df4b088b452466a9a704d79aee28bef..c0947c870208178884c7e23bef3d211119ed457c 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-progress.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-progress.md @@ -43,11 +43,11 @@ Progress(options: {value: number, total?: number, type?: ProgressType}) ## 属性 -| 名称 | 参数类型 | 默认值 | 描述 | -| ------------------ | ---------------------------------------- | ---- | ---------------------------------------- | -| value | number | - | 设置当前进度值。 | -| color | [ResourceColor](../../ui/ts-types.md) | - | 设置进度条前景色。 | -| style8+ | {
strokeWidth?: Length,
scaleCount?: number,
scaleWidth?: Length
} | - | 定义组件的样式。
strokeWidth: 设置进度条宽度。
scaleCount: 设置环形进度条总刻度数。
scaleWidth: 设置环形进度条刻度粗细。
刻度粗细大于进度条宽度时,刻度粗细为系统默认粗细。 | +| 名称 | 参数类型 | 默认值 | 描述 | +| ------------------ | ------------------------------------------------------------ | ------ | ------------------------------------------------------------ | +| value | number | - | 设置当前进度值。 | +| color | [ResourceColor](ts-types.md#resourcecolor8) | - | 设置进度条前景色。 | +| style8+ | {
strokeWidth?: Length,
scaleCount?: number,
scaleWidth?: Length
} | - | 定义组件的样式。
strokeWidth: 设置进度条宽度。
scaleCount: 设置环形进度条总刻度数。
scaleWidth: 设置环形进度条刻度粗细。
刻度粗细大于进度条宽度时,刻度粗细为系统默认粗细。 | ## 示例 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-qrcode.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-qrcode.md index e565fb099fab407ab8506cc3565f1f89900c853c..7671f705990e8e9473be32b141bb07beb8c040e0 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-qrcode.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-qrcode.md @@ -31,7 +31,7 @@ QRCode(value: string) | 名称 | 参数类型 | 默认值 | 描述 | | ----- | ----- | ----- | -------- | -| color | [ResourceColor](../../ui/ts-types.md) | Black | 设置二维码颜色。 | +| color | [ResourceColor](ts-types.md#resourcecolor8) | Black | 设置二维码颜色。 | ## 事件 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-search.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-search.md index b5ccc7d1c63600338268721494c74eb1aef3cb6a..4d9b96410154f29809ab05d9f98b9b65b576667f 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-search.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-search.md @@ -29,12 +29,12 @@ Search(options?: { value?: string; placeholder?: string; icon?: string; controll ## 属性 -| 名称 | 参数类型 | 默认值 | 描述 | -| ---------------- | ------------------------------------- | ---- | --------------------- | -| searchButton | string | 无 | 搜索框末尾搜索按钮文本值,默认无搜索按钮。 | -| placeholderColor | [ResourceColor](../../ui/ts-types.md) | - | 设置placeholder颜色。 | -| placeholderFont | [Font](../../ui/ts-types.md) | - | 设置placeholder文本样式。 | -| textFont | [Font](../../ui/ts-types.md) | - | 设置搜索框内文本样式。 | +| 名称 | 参数类型 | 默认值 | 描述 | +| ---------------- | ------------------------------------------- | ------ | ------------------------------------------ | +| searchButton | string | 无 | 搜索框末尾搜索按钮文本值,默认无搜索按钮。 | +| placeholderColor | [ResourceColor](ts-types.md#resourcecolor8) | - | 设置placeholder颜色。 | +| placeholderFont | [Font](ts-types.md#font) | - | 设置placeholder文本样式。 | +| textFont | [Font](ts-types.md#font) | - | 设置搜索框内文本样式。 | ## 事件 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-select.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-select.md index ace3f6f67777921c5289e61b598d16f341199f3a..b08b3470182ed4ba532e961be9fdb27ff434d769 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-select.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-select.md @@ -21,23 +21,23 @@ Select(options: Array\) **SelectOption对象说明:** | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | | ----- | ----------------------------------- | ---- | ---- | ------- | -| value | [ResourceStr](../../ui/ts-types.md) | 是 | - | 下拉选项内容。 | -| icon | [ResourceStr](../../ui/ts-types.md) | 否 | - | 下拉选项图片。 | +| value | [ResourceStr](ts-types.md#resourcestr8) | 是 | - | 下拉选项内容。 | +| icon | [ResourceStr](ts-types.md#resourcestr8) | 否 | - | 下拉选项图片。 | ## 属性 -| 名称 | 参数类型 | 默认值 | 描述 | -| ----------------------- | ------------------------------------- | ---- | ------------------------ | -| selected | number | - | 设置下拉菜单初始选择项的索引,第一项的索引为0。 | -| value | string | - | 设置下拉按钮本身的文本显示。 | -| font | [Font](../../ui/ts-types.md) | - | 设置下拉按钮本身的文本样式: | -| fontColor | [ResourceColor](../../ui/ts-types.md) | - | 设置下拉按钮本身的文本颜色。 | -| selectedOptionBgColor | [ResourceColor](../../ui/ts-types.md) | - | 设置下拉菜单选中项的背景色。 | -| selectedOptionFont | [Font](../../ui/ts-types.md) | - | 设置下拉菜单选中项的文本样式: | -| selectedOptionFontColor | [ResourceColor](../../ui/ts-types.md) | - | 设置下拉菜单选中项的文本颜色。 | -| optionBgColor | [ResourceColor](../../ui/ts-types.md) | - | 设置下拉菜单项的背景色。 | -| optionFont | [Font](../../ui/ts-types.md) | - | 设置下拉菜单项的文本样式: | -| optionFontColor | [ResourceColor](../../ui/ts-types.md) | - | 设置下拉菜单项的文本颜色。 | +| 名称 | 参数类型 | 默认值 | 描述 | +| ----------------------- | ------------------------------------------- | ------ | ----------------------------------------------- | +| selected | number | - | 设置下拉菜单初始选择项的索引,第一项的索引为0。 | +| value | string | - | 设置下拉按钮本身的文本显示。 | +| font | [Font](ts-types.md#font) | - | 设置下拉按钮本身的文本样式: | +| fontColor | [ResourceColor](ts-types.md#resourcecolor8) | - | 设置下拉按钮本身的文本颜色。 | +| selectedOptionBgColor | [ResourceColor](ts-types.md#resourcecolor8) | - | 设置下拉菜单选中项的背景色。 | +| selectedOptionFont | [Font](ts-types.md#font) | - | 设置下拉菜单选中项的文本样式: | +| selectedOptionFontColor | [ResourceColor](ts-types.md#resourcecolor8) | - | 设置下拉菜单选中项的文本颜色。 | +| optionBgColor | [ResourceColor](ts-types.md#resourcecolor8) | - | 设置下拉菜单项的背景色。 | +| optionFont | [Font](../../ui/ts-types.md) | - | 设置下拉菜单项的文本样式: | +| optionFontColor | [ResourceColor](ts-types.md#resourcecolor8) | - | 设置下拉菜单项的文本颜色。 | ## 事件 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-slider.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-slider.md index 79e1c449516d16e54bd8580166715c5df1e1ccb2..ffc60da4276ad5f7686d0175ebf69934cdbcb0cb 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-slider.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-slider.md @@ -46,12 +46,12 @@ Slider(options:{value?: number, min?: number, max?: number, step?: number, style | 名称 | 参数类型 | 默认值 | 描述 | | ------------- | ------- | ----- | ----------------- | -| blockColor | [ResourceColor](../../ui/ts-types.md) | - | 设置滑块的颜色。 | -| trackColor | [ResourceColor](../../ui/ts-types.md) | - | 设置滑轨的背景颜色。 | -| selectedColor | [ResourceColor](../../ui/ts-types.md) | - | 设置滑轨的已滑动颜色。 | +| blockColor | [ResourceColor](ts-types.md#resourcecolor8) | - | 设置滑块的颜色。 | +| trackColor | [ResourceColor](ts-types.md#resourcecolor8) | - | 设置滑轨的背景颜色。 | +| selectedColor | [ResourceColor](ts-types.md#resourcecolor8) | - | 设置滑轨的已滑动颜色。 | | showSteps | boolean | false | 设置当前是否显示步长刻度值。 | | showTips | boolean | false | 设置滑动时是否显示气泡提示百分比。 | -| trackThickness | [Length](../../ui/ts-types.md) | - | 设置滑轨的粗细。 | +| trackThickness | [Length](ts-types.md#length) | - | 设置滑轨的粗细。 | ## 事件 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-span.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-span.md index 061f5eb7d00473f588896e370ba65317753cc6bf..e9622fb146a2479e8bcf225fd394d55d9fac2827 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-span.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-span.md @@ -25,7 +25,7 @@ Span(content: ResourceStr) | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | | ------- | ------ | ---- | ---- | ----- | -| content | [ResourceStr](../../ui/ts-types.md) | 是 | - | 文本内容。 | +| content | [ResourceStr](ts-types.md#resourcestr8) | 是 | - | 文本内容。 | ## 属性 @@ -33,8 +33,8 @@ Span(content: ResourceStr) | 名称 | 参数类型 | 默认值 | 描述 | | ---------- | ---------------------------------------- | ---------------------------------------- | -------------- | -| decoration | {
type: [TextDecorationType](ts-appendix-enums.md#textdecorationtype枚举说明),
color?: [ResourceColor](../../ui/ts-types.md)
} | {
type: TextDecorationType.None
color:Color.Black
} | 设置文本装饰线样式及其颜色。 | -| letterSpacing | [Length](../../ui/ts-types.md) | - | 设置文本字符间距。 | +| decoration | {
type: [TextDecorationType](ts-appendix-enums.md#textdecorationtype枚举说明),
color?: [ResourceColor](ts-types.md#resourcecolor8)
} | {
type: TextDecorationType.None
color:Color.Black
} | 设置文本装饰线样式及其颜色。 | +| letterSpacing | [Length](ts-types.md#length) | - | 设置文本字符间距。 | | textCase | [TextCase](ts-appendix-enums.md#textcase枚举说明) | Normal | 设置文本大小写。 | diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-text.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-text.md index f28f86b9db876c6cc9764b75c993a8136ed2fb57..dd5a76bfaec12a36d0008512432ba5bd132be6d7 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-text.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-text.md @@ -25,7 +25,7 @@ Text(content?: ResourceStr) | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | | ------- | ------ | ---- | ---- | ---------------------------------------- | -| content | [ResourceStr](../../ui/ts-types.md) | 否 | '' | 文本内容。包含子组件Span时不生效,显示Span内容,并且此时text组件的样式不生效。 | +| content | [ResourceStr](ts-types.md#resourcestr8) | 否 | '' | 文本内容。包含子组件Span时不生效,显示Span内容,并且此时text组件的样式不生效。 | ## 属性 @@ -34,12 +34,12 @@ Text(content?: ResourceStr) | textAlign | [TextAlign](ts-appendix-enums.md#textalign) | TextAlign.Start | 设置多行文本的文本对齐方式。 | | textOverflow | {overflow: [TextOverflow](ts-appendix-enums.md#textoverflow)} | {overflow: TextOverflow.Clip} | 设置文本超长时的显示方式。
**说明:**
文本截断是按字截断。例如,英文以单词为最小单位进行截断,若需要以字母为单位进行截断,可在字母间添加零宽空格:\u200B。 | | maxLines | number | Infinity | 设置文本的最大行数。 | -| lineHeight | string \| number \| [Resource](../../ui/ts-types.md) | - | 设置文本的文本行高,设置值不大于0时,不限制文本行高,自适应字体大小,Length为number类型时单位为fp。 | -| decoration | {
type: [TextDecorationType](ts-appendix-enums.md#textdecorationtype),
color?: [ResourceColor](../../ui/ts-types.md)
} | {
type: TextDecorationType.None,
color:Color.Black
} | 设置文本装饰线样式及其颜色。 | -| baselineOffset | [Length](../../ui/ts-types.md) | - | 设置文本基线的偏移量。 | -| letterSpacing | [Length](../../ui/ts-types.md) | - | 设置文本字符间距。 | -| minFontSize | number \| string \| [Resource](../../ui/ts-types.md) | - | 设置文本最小显示字号。 | -| maxFontSize | number \| string \| [Resource](../../ui/ts-types.md) | - | 设置文本最大显示字号。 | +| lineHeight | string \| number \| [Resource](ts-types.md#resource) | - | 设置文本的文本行高,设置值不大于0时,不限制文本行高,自适应字体大小,Length为number类型时单位为fp。 | +| decoration | {
type: [TextDecorationType](ts-appendix-enums.md#textdecorationtype),
color?: [ResourceColor](ts-types.md#resourcecolor8)
} | {
type: TextDecorationType.None,
color:Color.Black
} | 设置文本装饰线样式及其颜色。 | +| baselineOffset | [Length](ts-types.md#length) | - | 设置文本基线的偏移量。 | +| letterSpacing | [Length](ts-types.md#length) | - | 设置文本字符间距。 | +| minFontSize | number \| string \| [Resource](ts-types.md#resource) | - | 设置文本最小显示字号。 | +| maxFontSize | number \| string \| [Resource](ts-types.md#resource) | - | 设置文本最大显示字号。 | | textCase | [TextCase](ts-appendix-enums.md#textcase) | TextCase.Normal | 设置文本大小写。 | diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textarea.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textarea.md index 93e8e6b9fe1ce67cc39e017dda68516e624c1154..3d592169c74fbe68436a04923d6740c9b4163190 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textarea.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textarea.md @@ -25,21 +25,21 @@ TextArea(value?:{placeholder?: ResourceStr, text?: ResourceStr, controller?: Tex | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | | ----------------------- | ---------------------------------------- | ---- | ---- | -------------- | -| placeholder | [ResourceStr](../../ui/ts-types.md) | 否 | - | 无输入时的提示文本。 | -| text | [ResourceStr](../../ui/ts-types.md) | 否 | - | 设置输入框当前的文本内容。 | +| placeholder | [ResourceStr](ts-types.md#resourcestr8) | 否 | - | 无输入时的提示文本。 | +| text | [ResourceStr](ts-types.md#resourcestr8) | 否 | - | 设置输入框当前的文本内容。 | | controller8+ | [TextAreaController](#textareacontroller8) | 否 | - | 设置TextArea控制器。 | ## 属性 除支持通用属性外,还支持以下属性: -| 名称 | 参数类型 | 默认值 | 描述 | -| ------------------------ | ---------------------------------------- | ----- | ---------------------------------------- | -| placeholderColor | [ResourceColor](../../ui/ts-types.md) | - | 设置placeholder文本颜色。 | -| placeholderFont | {
size?: number,
weight?:number \| [FontWeight](ts-universal-attributes-text-style.md),
family?: string,
style?: [FontStyle](ts-universal-attributes-text-style.md)
} | - | 设置placeholder文本样式:
- size: 设置文本尺寸,Length为number类型时,使用fp单位。
- weight: 设置文本的字体粗细,number类型取值[100, 900],取值间隔为100,默认为400,取值越大,字体越粗。
- family: 设置文本的字体列表。使用多个字体,使用','进行分割,优先级按顺序生效,例如:'Arial, sans-serif'。
- style: 设置文本的字体样式。 | -| textAlign | [TextAlign](ts-appendix-enums.md#textalign) | Start | 设置文本水平对齐方式。 | -| caretColor | [ResourceColor](../../ui/ts-types.md) | - | 设置输入框光标颜色。 | -| inputFilter8+ | {
value: [ResourceStr](../../ui/ts-types.md)8+,
error?: (value: string) => void
} | - | 通过正则表达式设置输入过滤器。满足表达式的输入允许显示,不满足的输入被忽略。仅支持单个字符匹配,不支持字符串匹配。例如:^(?=.\*\d)(?=.\*[a-z])(?=.\*[A-Z]).{8,10}$,不支持过滤8到10位的强密码。
- value:设置正则表达式。
- error:正则匹配失败时,返回被忽略的内容。 | +| 名称 | 参数类型 | 默认值 | 描述 | +| ------------------------ | ------------------------------------------------------------ | ------ | ------------------------------------------------------------ | +| placeholderColor | [ResourceColor](ts-types.md#resourcecolor8) | - | 设置placeholder文本颜色。 | +| placeholderFont | {
size?: number,
weight?:number \| [FontWeight](ts-universal-attributes-text-style.md),
family?: string,
style?: [FontStyle](ts-universal-attributes-text-style.md)
} | - | 设置placeholder文本样式:
- size: 设置文本尺寸,Length为number类型时,使用fp单位。
- weight: 设置文本的字体粗细,number类型取值[100, 900],取值间隔为100,默认为400,取值越大,字体越粗。
- family: 设置文本的字体列表。使用多个字体,使用','进行分割,优先级按顺序生效,例如:'Arial, sans-serif'。
- style: 设置文本的字体样式。 | +| textAlign | [TextAlign](ts-appendix-enums.md#textalign) | Start | 设置文本水平对齐方式。 | +| caretColor | [ResourceColor](ts-types.md#resourcecolor8) | - | 设置输入框光标颜色。 | +| inputFilter8+ | {
value: [ResourceStr](ts-types.md#resourcestr8)8+,
error?: (value: string) => void
} | - | 通过正则表达式设置输入过滤器。满足表达式的输入允许显示,不满足的输入被忽略。仅支持单个字符匹配,不支持字符串匹配。例如:^(?=.\*\d)(?=.\*[a-z])(?=.\*[A-Z]).{8,10}$,不支持过滤8到10位的强密码。
- value:设置正则表达式。
- error:正则匹配失败时,返回被忽略的内容。 | ## 事件 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textclock.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textclock.md index 3edc447401258eecff860fc77315db48ef7a250f..eb6d626447062499f886c054f30cb79ae5b1c89b 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textclock.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textclock.md @@ -20,10 +20,10 @@ TextClock(options?: {timeZoneOffset?: number, controller?: TextClockController}) **参数:** -| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | -| -------------- | ---------------------------------------- | ---- | ----- | ---------------------------------------- | -| timeZoneOffset | number | 否 | 时区偏移量 | 设置时区偏移量。取值范围为[-14, 12],表示东十二区到西十二区,其中负值表示东时区,正值表示西时区,比如东八区为-8;对横跨国际日界线的国家或地区,用-13(UTC+13)和-14(UTC+14)来保证整个国家或者区域处在相同的时间。 | -| controller | [TextClockController](#TextClockController) | 否 | null | 绑定一个控制器,用来控制文本时钟的状态。 | +| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | +| -------------- | ------------------------------------------- | ---- | ---------- | ------------------------------------------------------------ | +| timeZoneOffset | number | 否 | 时区偏移量 | 设置时区偏移量。取值范围为[-14, 12],表示东十二区到西十二区,其中负值表示东时区,正值表示西时区,比如东八区为-8;对横跨国际日界线的国家或地区,用-13(UTC+13)和-14(UTC+14)来保证整个国家或者区域处在相同的时间。 | +| controller | [TextClockController](#textclockcontroller) | 否 | null | 绑定一个控制器,用来控制文本时钟的状态。 | ## 属性 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textinput.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textinput.md index 7db34fc148ccd56874a15ff2de16389bccc22c4a..df999bed501868d5529e6e625be09bbbb173ba50 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textinput.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textinput.md @@ -25,8 +25,8 @@ TextInput(value?:{placeholder?: ResourceStr, text?: ResourceStr, controller?: Te | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | | ----------------------- | ---------------------------------------- | ---- | ---- | --------------- | -| placeholder | [ResourceStr](../../ui/ts-types.md) | 否 | - | 无输入时的提示文本。 | -| text | [ResourceStr](../../ui/ts-types.md) | 否 | - | 设置输入框当前的文本内容。 | +| placeholder | [ResourceStr](ts-types.md#resourcestr8) | 否 | - | 无输入时的提示文本。 | +| text | [ResourceStr](ts-types.md#resourcestr8) | 否 | - | 设置输入框当前的文本内容。 | | controller8+ | [TextInputController](#textinputcontroller8) | 否 | - | 设置TextInput控制器。 | ## 属性 @@ -36,12 +36,12 @@ TextInput(value?:{placeholder?: ResourceStr, text?: ResourceStr, controller?: Te | 名称 | 参数类型 | 默认值 | 描述 | | ----------------------------- | ------------------------------------------------------------ | ----------------- | ------------------------------------------------------------ | | type | InputType | InputType.Normal | 设置输入框类型。 | -| placeholderColor | [ResourceColor](../../ui/ts-types.md) | - | 设置placeholder颜色。 | +| placeholderColor | [ResourceColor](ts-types.md#resourcecolor8) | - | 设置placeholder颜色。 | | placeholderFont | {
size?: Length,
weight?: number\|[FontWeight](ts-universal-attributes-text-style.md),
family?: string,
style?: [FontStyle](ts-universal-attributes-text-style.md)
} | - | 设置placeholder文本样式:
- size: 设置文本尺寸,Length为number类型时,使用fp单位。
- weight: 设置文本的字体粗细,number类型取值[100, 900],取值间隔为100,默认为400,取值越大,字体越粗。
- family: 设置文本的字体列表。使用多个字体,使用','进行分割,优先级按顺序生效。例如:'Arial, sans-serif'。
- style: 设置文本的字体样式。 | | enterKeyType | EnterKeyType | EnterKeyType.Done | 设置输入法回车键类型。 | -| caretColor | [ResourceColor](../../ui/ts-types.md) | - | 设置输入框光标颜色。 | +| caretColor | [ResourceColor](ts-types.md#resourcecolor8) | - | 设置输入框光标颜色。 | | maxLength | number | - | 设置文本的最大输入字符数。 | -| inputFilter8+ | {
value: [ResourceStr](../../ui/ts-types.md)8+,
error?: (value: string) => void
} | - | 正则表达式,满足表达式的输入允许显示,不满足正则表达式的输入被忽略。仅支持单个字符匹配,不支持字符串匹配。例如:^(?=.\*\d)(?=.\*[a-z])(?=.\*[A-Z]).{8,10}$,8到10位的强密码不支持过滤。
- value:设置正则表达式。
- error:正则匹配失败时,返回被忽略的内容。 | +| inputFilter8+ | {
value: [ResourceStr](ts-types.md#resourcestr8)8+,
error?: (value: string) => void
} | - | 正则表达式,满足表达式的输入允许显示,不满足正则表达式的输入被忽略。仅支持单个字符匹配,不支持字符串匹配。例如:^(?=.\*\d)(?=.\*[a-z])(?=.\*[A-Z]).{8,10}$,8到10位的强密码不支持过滤。
- value:设置正则表达式。
- error:正则匹配失败时,返回被忽略的内容。 | | showPasswordIcon9+ | boolean | true | 密码输入模式时,密码框末尾的图标是否显示。 | ## EnterKeyType枚举说明 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-toggle.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-toggle.md index 475cda01224628fe385fc4f3238f1e5c4ccf3605..f6b4f232cb84b048338a93c9037165ce4a4a9555 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-toggle.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-toggle.md @@ -38,8 +38,8 @@ Toggle(options: { type: ToggleType, isOn?: boolean }) | 名称 | 参数 | 默认值 | 参数描述 | | ---------------- | ----- | ---- | ---------------------------------------- | -| selectedColor | [ResourceColor](../../ui/ts-types.md) | - | 设置组件打开状态的背景颜色。 | -| switchPointColor | [ResourceColor](../../ui/ts-types.md) | - | 设置Switch类型的圆形滑块颜色。
> **说明:**
> 仅对type为ToggleType.Switch生效。 | +| selectedColor | [ResourceColor](ts-types.md#resourcecolor8) | - | 设置组件打开状态的背景颜色。 | +| switchPointColor | [ResourceColor](ts-types.md#resourcecolor8) | - | 设置Switch类型的圆形滑块颜色。
> **说明:**
> 仅对type为ToggleType.Switch生效。 | ## 事件 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-web.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-web.md index eb331041393d732aa2231f7a493abad35bb7e8f7..e0122915b40321563a6249b7ea4ea2a53d2d6f6b 100755 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-web.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-web.md @@ -20,12 +20,13 @@ Web(options: { src: ResourceStr, controller: WebController }) 表1 options参数说明 **参数:** -| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | -| ---------- | ------------------------------- | ---- | ---- | ------- | -| src | [ResourceStr](../../ui/ts-types.md) | 是 | - | 网页资源地址。 | -| controller | [WebController](#webcontroller) | 否 | - | 控制器。 | +| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | +| ---------- | --------------------------------------- | ---- | ------ | -------------- | +| src | [ResourceStr](ts-types.md#resourcestr8) | 是 | - | 网页资源地址。 | +| controller | [WebController](#webcontroller) | 否 | - | 控制器。 | **示例:** + ```ts // xxx.ets @Entry @@ -217,6 +218,7 @@ mixedMode(mixedMode: MixedMode) | mixedMode | [MixedMode](#mixedmode枚举说明) | 是 | None | 要设置的混合内容。 | **示例:** + ```ts // xxx.ets @Entry @@ -1667,7 +1669,7 @@ runJavaScript(options: { script: string, callback?: (result: string) => void }) **参数:** | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | | -------- | ------------------------ | ---- | ---- | ---------------------------------------- | -| script | string | 是 | - | JavaScript脚本。 | +| script | string | 是 | - | JavaScript脚本。 | | callback | (result: string) => void | 否 | - | 回调执行JavaScript脚本结果。JavaScript脚本若执行失败或无返回值时,返回null。 | **示例:** @@ -1823,3 +1825,15 @@ clearHistory(): void | None | 加载资源使用cache,如果cache中无该资源则从网络中获取。 | | Online | 加载资源不使用cache,全部从网络中获取。 | | Only | 只从cache中加载资源。 | + + ## HitTestType枚举说明 + +| 名称 | 描述 | +| ------------- | ----------------------------------------- | +| EditText | 可编辑的区域。 | +| Email | 电子邮件地址。 | +| HttpAnchor | 超链接,其src为http。 | +| HttpAnchorImg | 带有超链接的图片,其中超链接的src为http。 | +| Img | HTML::img标签。 | +| Map | 地理地址。 | +| Unknown | 未知内容。 | \ No newline at end of file diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-xcomponent.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-xcomponent.md index fd40b14efd933baddde4928caad98a2611459a6e..22b04a4777bd6c1013f56f734e3780208482f562 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-xcomponent.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-xcomponent.md @@ -20,12 +20,12 @@ **参数:** -| 名称 | 参数类型 | 必填 | 描述 | -| ----------- | ---------------------------------------- | ---- | ---------------------------------------- | -| id | string | 是 | 组件的唯一标识,支持最大的字符串长度128。 | -| type | string | 是 | 用于指定XComponent组件类型,可选值为:
-surface:组件内容单独送显,直接合成到屏幕。
-component:组件内容与其他组件合成后统一送显。 | -| libraryname | string | 否 | 应用Native层编译输出动态库名称。 | -| controller | [XComponentController](#XComponentController) | 否 | 给组件绑定一个控制器,通过控制器调用组件方法。 | +| 名称 | 参数类型 | 必填 | 描述 | +| ----------- | --------------------------------------------- | ---- | ------------------------------------------------------------ | +| id | string | 是 | 组件的唯一标识,支持最大的字符串长度128。 | +| type | string | 是 | 用于指定XComponent组件类型,可选值为:
-surface:组件内容单独送显,直接合成到屏幕。
-component:组件内容与其他组件合成后统一送显。 | +| libraryname | string | 否 | 应用Native层编译输出动态库名称。 | +| controller | [XComponentController](#xcomponentcontroller) | 否 | 给组件绑定一个控制器,通过控制器调用组件方法。 | ## 事件 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-methods-action-sheet.md b/zh-cn/application-dev/reference/arkui-ts/ts-methods-action-sheet.md index e5e4e723fb00b7a44c4656b23b4125e39edaf8df..47141fdcea02499ed47fd6ad052d96a899beed2b 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-methods-action-sheet.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-methods-action-sheet.md @@ -21,10 +21,10 @@ show(options: { paramObject1}) - paramObject1参数 | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | | -------- | -------- | -------- | -------- | -------- | - | title | string \| [Resource](../../ui/ts-types.md#resource类型) | 否 | 无标题 | 弹窗标题。 | - | message | string \| [Resource](../../ui/ts-types.md#resource类型) | 是 | - | 弹窗内容。 | + | title | string \| [Resource](ts-types.md#resource) | 否 | 无标题 | 弹窗标题。 | + | message | string \| [Resource](ts-types.md#resource) | 是 | - | 弹窗内容。 | | autoCancel | boolean | 否 | true | 点击遮障层时,是否关闭弹窗。 | - | confirm | {
value: string \| [Resource](../../ui/ts-types.md#resource类型),
action: () => void
} | 否 | - | 确认按钮的文本内容和点击回调。
value:按钮文本内容。
action: 按钮选中时的回调。 | + | confirm | {
value: string \| [Resource](ts-types.md#resource),
action: () => void
} | 否 | - | 确认按钮的文本内容和点击回调。
value:按钮文本内容。
action: 按钮选中时的回调。 | | cancel | () => void | 否 | - | 点击遮障层关闭dialog时的回调。 | | alignment | [DialogAlignment](ts-methods-custom-dialog-box.md) | 否 | DialogAlignment.Default | 弹窗在竖直方向上的对齐方式。 | | offset | {
dx: Length,
dy: Length
} | 否 | {
dx: 0,
dy: 0
} | 弹窗相对alignment所在位置的偏移量。 | @@ -32,11 +32,11 @@ show(options: { paramObject1}) - SheetInfo接口说明 - | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | - | ------ | ------------------------------------------------------------ | ---- | ------ | ----------------- | - | title | string \| [Resource](../../ui/ts-types.md#resource类型) | 是 | - | sheet文本。 | - | icon | string \| [Resource](../../ui/ts-types.md#resource类型) | 否 | 无 | sheet图标。 | - | action | ()=>void | 是 | - | sheet选中的回调。 | + | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | + | ------ | ---------------------------------------------------- | ---- | ------ | ----------------- | + | title | string \| [Resource](ts-types.md#resource) | 是 | - | sheet文本。 | + | icon | string \| [Resource](ts-types.md#resource) | 否 | 无 | sheet图标。 | + | action | ()=>void | 是 | - | sheet选中的回调。 | ## 示例 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-methods-alert-dialog-box.md b/zh-cn/application-dev/reference/arkui-ts/ts-methods-alert-dialog-box.md index 57162b87f0ffa886dff0c4cb184ebc7dfac05844..342e19c4d2bc9fe3c820f0f1784520cb69abc5e4 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-methods-alert-dialog-box.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-methods-alert-dialog-box.md @@ -16,26 +16,26 @@ - paramObject1参数 | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | | -------- | -------- | -------- | -------- | -------- | - | title | string \| [Resource](../../ui/ts-types.md#resource类型) | 否 | - | 弹窗标题。 | - | message | string \| [Resource](../../ui/ts-types.md#resource类型) | 是 | - | 弹窗内容。 | + | title | string \| [Resource](ts-types.md#resource) | 否 | - | 弹窗标题。 | + | message | string \| [Resource](ts-types.md#resource) | 是 | - | 弹窗内容。 | | autoCancel | boolean | 否 | true | 点击遮障层时,是否关闭弹窗。 | - | confirm | {
value: string \| [Resource](../../ui/ts-types.md#resource类型),
fontColor?: Color \| number \| string \| [Resource](../../ui/ts-types.md#resource类型),
backgroundColor?: Color \| number \| string \| [Resource](../../ui/ts-types.md#resource类型),
action: () => void
} | 否 | - | 确认按钮的文本内容、文本色、按钮背景色和点击回调。 | + | confirm | {
value: string \| [Resource](ts-types.md#resource),
fontColor?: Color \| number \| string \| [Resource](ts-types.md#resource),
backgroundColor?: Color \| number \| string \| [Resource](ts-types.md#resource),
action: () => void
} | 否 | - | 确认按钮的文本内容、文本色、按钮背景色和点击回调。 | | cancel | () => void | 否 | - | 点击遮障层关闭dialog时的回调。 | | alignment | [DialogAlignment](ts-methods-custom-dialog-box.md) | 否 | DialogAlignment.Default | 弹窗在竖直方向上的对齐方式。 | - | offset | {
dx: Length \| [Resource](../../ui/ts-types.md#resource类型),
dy: Length  \| [Resource](../../ui/ts-types.md#resource类型)
} | 否 | - | 弹窗相对alignment所在位置的偏移量。 | + | offset | {
dx: Length \| [Resource](ts-types.md#resource),
dy: Length  \| [Resource](ts-types.md#resource)
} | 否 | - | 弹窗相对alignment所在位置的偏移量。 | | gridCount | number | 否 | - | 弹窗容器宽度所占用栅格数。 | - paramObject2参数 | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | | -------- | -------- | -------- | -------- | -------- | - | title | string \|& [Resource](../../ui/ts-types.md#resource类型) | 否 | - | 弹窗标题。 | - | message | string \|& [Resource](../../ui/ts-types.md#resource类型) | 是 | - | 弹窗内容。 | + | title | string \|& [Resource](ts-types.md#resource) | 否 | - | 弹窗标题。 | + | message | string \|& [Resource](ts-types.md#resource) | 是 | - | 弹窗内容。 | | autoCancel | boolean | 否 | true | 点击遮障层时,是否关闭弹窗。 | - | primaryButton | {
value: string \| [Resource](../../ui/ts-types.md#resource类型),
fontColor?: Color \| number \| string \| [Resource](../../ui/ts-types.md#resource类型),
backgroundColor?: Color \| number \| string \| [Resource](../../ui/ts-types.md#resource类型),
action: () => void;
} | 否 | - | 按钮的文本内容、文本色、按钮背景色和点击回调。 | - | secondaryButton | {
value: string \| [Resource](../../ui/ts-types.md#resource类型),
fontColor?: Color \| number \| string \| [Resource](../../ui/ts-types.md#resource类型),
backgroundColor?: Color \| number \| string \| [Resource](../../ui/ts-types.md#resource类型),
action: () => void;
} | 否 | - | 按钮的文本内容、文本色、按钮背景色和点击回调。 | + | primaryButton | {
value: string \| [Resource](ts-types.md#resource),
fontColor?: Color \| number \| string \| [Resource](ts-types.md#resource),
backgroundColor?: Color \| number \| string \| [Resource](ts-types.md#resource),
action: () => void;
} | 否 | - | 按钮的文本内容、文本色、按钮背景色和点击回调。 | + | secondaryButton | {
value: string \| [Resource](ts-types.md#resource),
fontColor?: Color \| number \| string \| [Resource](ts-types.md#resource),
backgroundColor?: Color \| number \| string \| [Resource](ts-types.md#resource),
action: () => void;
} | 否 | - | 按钮的文本内容、文本色、按钮背景色和点击回调。 | | cancel | () => void | 否 | - | 点击遮障层关闭dialog时的回调。 | | alignment | [DialogAlignment](ts-methods-custom-dialog-box.md) | 否 | DialogAlignment.Default | 弹窗在竖直方向上的对齐方式。 | - | offset | {
dx: Length \| [Resource](../../ui/ts-types.md#resource类型),
dy: Length  \| [Resource](../../ui/ts-types.md#resource类型)
} | 否 | - | 弹窗相对alignment所在位置的偏移量。 | + | offset | {
dx: Length \| [Resource](ts-types.md#resource),
dy: Length  \| [Resource](ts-types.md#resource)
} | 否 | - | 弹窗相对alignment所在位置的偏移量。 | | gridCount | number | 否 | - | 弹窗容器宽度所占用栅格数。 | diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-methods-custom-dialog-box.md b/zh-cn/application-dev/reference/arkui-ts/ts-methods-custom-dialog-box.md index b3e05efe18bc0e3de3b81f99cdf5761d90baebfc..686f317d1d934599671dbf22bf18ae5cae139340 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-methods-custom-dialog-box.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-methods-custom-dialog-box.md @@ -19,7 +19,7 @@ CustomDialogController(value:{builder: CustomDialog, cancel?: () => void, aut | cancel | () => void | 否 | - | 点击遮障层退出时的回调。 | | autoCancel | boolean | 否 | true | 是否允许点击遮障层退出。 | | alignment | DialogAlignment | 否 | DialogAlignment.Default | 弹窗在竖直方向上的对齐方式。 | - | offset | {
dx: Length \| [Resource](../../ui/ts-types.md#resource类型),
dy: Length  \| [Resource](../../ui/ts-types.md#resource类型)
} | 否 | - | 弹窗相对alignment所在位置的偏移量。 | + | offset | {
dx: Length \| [Resource](ts-types.md#resource),
dy: Length  \| [Resource](ts-types.md#resource)
} | 否 | - | 弹窗相对alignment所在位置的偏移量。 | | customStyle | boolean | 否 | false | 弹窗容器样式是否自定义。 | | gridCount8+ | number | 否 | - | 弹窗宽度占栅格宽度的个数。 | diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-popup.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-popup.md index 7948a22fbfd1c72bd2059360d569f0f973421a5e..4d81ce020ef1e3f91d4ea69fcdc5907966711673 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-popup.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-popup.md @@ -29,15 +29,15 @@ ## CustomPopupOptions8+类型接口说明 -| 名称 | 类型 | 必填 | 默认值 | 描述 | -| ------------- | ---------------------------------------- | ---- | ---------------- | ------------------------------ | -| builder | () => any | 是 | - | 提示气泡内容的构造器。 | -| placement | [Placement](ts-appendix-enums.md#placement8) | 否 | Placement.Bottom | 气泡组件优先显示的位置,当前位置显示不下时,会自动调整位置。 | -| maskColor | [Color](../../ui/ts-types.md#颜色类型) | 否 | - | 提示气泡遮障层的颜色。 | -| popupColor | [Color](../../ui/ts-types.md#颜色类型) | 否 | - | 提示气泡的颜色。 | -| enableArrow | boolean | 否 | true | 是否显示箭头,只有上、下方向的气泡会显示箭头。 | -| autoCancel | boolean | 否 | true | 页面有操作时,是否自动关闭气泡 | -| onStateChange | (isVisible: boolean) => void | 否 | - | 弹窗状态变化事件回调,参数为弹窗当前的显示状态。 | +| 名称 | 类型 | 必填 | 默认值 | 描述 | +| ------------- | ---------------------------------------------- | ---- | ---------------- | ------------------------------------------------------------ | +| builder | () => any | 是 | - | 提示气泡内容的构造器。 | +| placement | [Placement](ts-appendix-enums.md#placement8) | 否 | Placement.Bottom | 气泡组件优先显示的位置,当前位置显示不下时,会自动调整位置。 | +| maskColor | [Color](ts-appendix-enums.md#color) | 否 | - | 提示气泡遮障层的颜色。 | +| popupColor | [Color](ts-appendix-enums.md#color) | 否 | - | 提示气泡的颜色。 | +| enableArrow | boolean | 否 | true | 是否显示箭头,只有上、下方向的气泡会显示箭头。 | +| autoCancel | boolean | 否 | true | 页面有操作时,是否自动关闭气泡 | +| onStateChange | (isVisible: boolean) => void | 否 | - | 弹窗状态变化事件回调,参数为弹窗当前的显示状态。 | ## 示例