From 91754e8db6ca6cf3c18c2308da8b9ed361dee267 Mon Sep 17 00:00:00 2001 From: HelloCrease Date: Tue, 13 Sep 2022 19:34:22 +0800 Subject: [PATCH] update docs Signed-off-by: HelloCrease --- .../js-components-custom-event-parameter.md | 2 +- .../arkui-ts/ts-basic-components-image.md | 44 +++++++------------ .../arkui-ts/ts-media-components-video.md | 16 ++----- .../ts-universal-attributes-enable.md | 16 +++---- .../js-service-widget-ui/Readme-CN.md | 1 - 5 files changed, 27 insertions(+), 52 deletions(-) diff --git a/zh-cn/application-dev/reference/arkui-js/js-components-custom-event-parameter.md b/zh-cn/application-dev/reference/arkui-js/js-components-custom-event-parameter.md index d889622c56..ba98fb2c28 100644 --- a/zh-cn/application-dev/reference/arkui-js/js-components-custom-event-parameter.md +++ b/zh-cn/application-dev/reference/arkui-js/js-components-custom-event-parameter.md @@ -7,7 +7,7 @@
点击这里查看隐藏文本 - hello world + hello world
``` 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 aa9037ff77..9e743bd4a7 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 @@ -6,19 +6,9 @@ > 该组件从API Version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 -## 权限说明 +## 需要权限 -使用网络图片时,需要在config.json(FA模型)或者module.json5(Stage模型)对应的"abilities"中添加网络使用权限ohos.permission.INTERNET。 - -``` -"abilities": [ - { - ... - "permissions": ["ohos.permission.INTERNET"], - ... - } -] -``` +使用网络图片时,需要申请权限ohos.permission.INTERNET。具体申请方式请参考[权限申请声明](../../security/accesstoken-guidelines.md)。 ## 子组件 @@ -42,21 +32,21 @@ Image(src: string | PixelMap | Resource) 除支持[通用属性](ts-universal-attributes-size.md)外,还支持以下属性: -| 名称 | 参数类型 | 默认值 | 描述 | -| --------------------- | ------------------------------------------------------- | ------------------------ | ------------------------------------------------------------ | -| alt | string \| [Resource](../../ui/ts-types.md#resource类型) | - | 加载时显示的占位图,支持本地图片和网络图片。 | -| objectFit | [ImageFit](ts-appendix-enums.md#imagefit) | ImageFit.Cover | 设置图片的缩放类型。 | -| objectRepeat | [ImageRepeat](ts-appendix-enums.md#imagerepeat) | NoRepeat | 设置图片的重复样式。
> **说明:**
> - svg类型图源不支持该属性。 | -| interpolation | [ImageInterpolation](#imageinterpolation) | ImageInterpolation.None | 设置图片的插值效果,即减轻低清晰度图片在放大显示的时候出现的锯齿问题,仅针对图片放大插值。
> **说明:**
> - svg类型图源不支持该属性。
> - PixelMap资源不支持该属性。 | -| renderMode | [ImageRenderMode](#imagerendermode) | ImageRenderMode.Original | 设置图片渲染的模式。
> **说明:**
> - svg类型图源不支持该属性。 | -| sourceSize | {
width: number,
height: number
} | - | 设置图片裁剪尺寸,将原始图片解码成pixelMap,指定尺寸的图片,单位为px。
> **说明:**
> PixelMap资源不支持该属性。 | -| matchTextDirection | boolean | false | 设置图片是否跟随系统语言方向,在RTL语言环境下显示镜像翻转显示效果。 | -| fitOriginalSize | boolean | true | 图片组件尺寸未设置时,其显示尺寸是否跟随图源尺寸。 | -| fillColor | [ResourceColor](../../ui/ts-types.md#resourcecolor8) | - | 仅对svg图源生效,设置后会替换svg图片的fill颜色。 | -| autoResize | boolean | true | 是否需要在图片解码过程中对图源做resize操作,该操作会根据显示区域的尺寸决定用于绘制的图源尺寸,有利于减少内存占用。 | -| syncLoad8+ | boolean | false | 设置是否同步加载图片,默认是异步加载。同步加载时阻塞UI线程,不会显示占位图。 | -| copyOption9+ | [CopyOptions](ts-appendix-enums.md#copyoptions9) | CopyOptions.None | 设置图片是否可复制(SVG图片不支持复制)。
当设置copyOption为非CopyOptions.None时,支持快捷组合键'CTRL+C'进行复制。 | -| colorFilter9+ | [ColorFilter](../../ui/ts-types.md#colorfilter9) | - | 给图像设置颜色滤镜效果。 | +| 名称 | 参数类型 | 默认值 | 描述 | +| ------------------------ | ---------------------------------------- | ------------------------ | ---------------------------------------- | +| alt | string \| [Resource](../../ui/ts-types.md#resource类型) | - | 加载时显示的占位图,支持本地图片和网络图片。 | +| objectFit | [ImageFit](ts-appendix-enums.md#imagefit) | ImageFit.Cover | 设置图片的缩放类型。 | +| objectRepeat | [ImageRepeat](ts-appendix-enums.md#imagerepeat) | NoRepeat | 设置图片的重复样式。
> **说明:**
> - svg类型图源不支持该属性。 | +| interpolation | [ImageInterpolation](#imageinterpolation) | ImageInterpolation.None | 设置图片的插值效果,即减轻低清晰度图片在放大显示的时候出现的锯齿问题,仅针对图片放大插值。
> **说明:**
> - svg类型图源不支持该属性。
> - PixelMap资源不支持该属性。 | +| renderMode | [ImageRenderMode](#imagerendermode) | ImageRenderMode.Original | 设置图片渲染的模式。
> **说明:**
> - svg类型图源不支持该属性。 | +| sourceSize | {
width: number,
height: number
} | - | 设置图片裁剪尺寸,将原始图片解码成pixelMap,指定尺寸的图片,单位为px。
> **说明:**
> PixelMap资源不支持该属性。 | +| matchTextDirection | boolean | false | 设置图片是否跟随系统语言方向,在RTL语言环境下显示镜像翻转显示效果。 | +| fitOriginalSize | boolean | true | 图片组件尺寸未设置时,其显示尺寸是否跟随图源尺寸。 | +| fillColor | [ResourceColor](../../ui/ts-types.md#resourcecolor8) | - | 仅对svg图源生效,设置后会替换svg图片的fill颜色。 | +| autoResize | boolean | true | 是否需要在图片解码过程中对图源做resize操作,该操作会根据显示区域的尺寸决定用于绘制的图源尺寸,有利于减少内存占用。 | +| syncLoad8+ | boolean | false | 设置是否同步加载图片,默认是异步加载。同步加载时阻塞UI线程,不会显示占位图。 | +| copyOption9+ | [CopyOptions](ts-appendix-enums.md#copyoptions9) | CopyOptions.None | 设置图片是否可复制(SVG图片不支持复制)。
当设置copyOption为非CopyOptions.None时,支持快捷组合键'CTRL+C'进行复制。 | +| colorFilter9+ | [ColorFilter](../../ui/ts-types.md#colorfilter9) | - | 给图像设置颜色滤镜效果。 | > **说明:** > 使用快捷组合键对Image组件复制的前提是,该组件必须处于获焦状态。将Image组件的属性focusable设置为true,即可使用TAB键将焦点切换到Image组件上,再将Image组件的focusOnTouch属性设置为true,即可实现点击获焦。 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-media-components-video.md b/zh-cn/application-dev/reference/arkui-ts/ts-media-components-video.md index 8051856620..39aa70ee22 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-media-components-video.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-media-components-video.md @@ -7,17 +7,7 @@ ## 权限列表 -使用网络视频时,需要在config或者module.json对应的"abilities"中添加网络使用权限ohos.permission.INTERNET。 - -```js -"abilities":[ - { - ... - "permissions": ["ohos.permission.INTERNET"], - ... - } -] -``` +使用网络视频时,需要申请权限ohos.permission.INTERNET。具体申请方式请参考[权限申请声明](../../security/accesstoken-guidelines.md)。 ## 子组件 @@ -121,8 +111,8 @@ requestFullscreen(value: boolean) 请求全屏播放。 - 参数 - | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | - | ----- | ------ | ---- | ----- | ------- | + | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | + | ----- | ------- | ---- | ----- | ------- | | value | boolean | 是 | false | 是否全屏播放。 | ### exitFullscreen diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-enable.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-enable.md index f8d01f547a..ef6ba77e07 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-enable.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-enable.md @@ -1,22 +1,18 @@ # 禁用控制 -可交互状态下组件响应点击事件。 +组件是否可交互,可交互状态下响应[通用事件](ts-universal-events-click.md)。 > **说明:** -> 从API Version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 - - -## 权限列表 - -无 +> +> 从API Version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 ## 属性 -| 名称 | 参数类型 | 默认值 | 描述 | -| -------- | -------- | -------- | -------- | -| enabled | boolean | true | 值为true表示组件可用,可响应点击等操作;值为false时,不响应点击等操作。 | +| 名称 | 参数类型 | 描述 | +| ------- | ------- | ---------------------------------------- | +| enabled | boolean | 值为true表示组件可交互,响应点击等操作。
值为false表示组件不可交互,不响应点击等操作。
默认值:true | ## 示例 diff --git a/zh-cn/application-dev/reference/js-service-widget-ui/Readme-CN.md b/zh-cn/application-dev/reference/js-service-widget-ui/Readme-CN.md index e300f5795c..57c3e074bd 100644 --- a/zh-cn/application-dev/reference/js-service-widget-ui/Readme-CN.md +++ b/zh-cn/application-dev/reference/js-service-widget-ui/Readme-CN.md @@ -2,7 +2,6 @@ - JS服务卡片UI框架说明 - [文件组织](js-service-widget-file.md) - - [配置文件](js-service-widget-config-file.md) - 语法 - [HML语法参考](js-service-widget-syntax-hml.md) - [CSS语法参考](js-service-widget-syntax-css.md) -- GitLab