未验证 提交 af444f99 编写于 作者: O openharmony_ci 提交者: Gitee

!16114 backgroundBlurStyle扩充接口的新文档

Merge pull request !16114 from hehongyang9/dev
......@@ -513,3 +513,32 @@
| Block | 自身节点响应触摸事件的命中测试,但阻止被该节点屏蔽的子节点和其他节点的命中测试。 |
| Transparent | 自身节点和子节点响应触摸事件的命中测试,并允许对被该节点屏蔽的其他节点进行命中测试。 |
| None | 自身节点不会响应触摸事件的命中测试,但子节点会对触摸事件进行命中测试。 |
## BlurStyle<sup>9+</sup>
该接口支持在ArkTS卡片中使用。
| 名称 | 描述 |
| ------- | ---------- |
| Thin | 轻薄材质模糊。 |
| Regular | 普通厚度材质模糊。 |
| Thick | 厚材质模糊。 |
| BackgroundThin | 近距景深模糊。 |
| BackgroundRegular | 中距景深模糊。 |
| BackgroundThick | 远距景深模糊。 |
| BackgroundUltraThick | 超远距景深模糊。 |
## ThemeColorMode<sup>10+</sup>
| 名称 | 描述 |
| ------- | ---------- |
| System | 跟随系统深浅色模式。 |
| Light | 固定使用浅色模式。 |
| Dark | 固定使用深色模式。 |
## AdaptiveColor<sup>10+</sup>
| 名称 | 描述 |
| ------- | ----------- |
| Default | 不使用取色模糊。使用默认的颜色作为蒙版颜色。 |
| Average | 使用取色模糊。将取色区域的颜色平均值作为蒙版颜色。 |
......@@ -10,19 +10,16 @@
## 属性
| 名称 | 参数类型 | 描述 |
| 名称 | 参数 | 描述 |
| -------------------- | ----------------------- | ------------------------ |
| backgroundBlurStyle | [BlurStyle](#blurstyle) | 为当前组件提供一种在背景和内容之间的模糊能力,入参为模糊材质。<br/>该接口支持在ArkTS卡片中使用。 |
| backgroundBlurStyle | value:[BlurStyle](ts-appendix-enums.md#blurstyle9),<br/>options<sup>10+</sup>?:[BackgroundBlurStyleOptions](#backgroundblurstyleoptions10对象说明) | 为当前组件提供一种在背景和内容之间的模糊能力。<br/>value: 背景模糊样式。模糊样式中封装了模糊半径、蒙版颜色、蒙版透明度、饱和度四个参数。<br/>options: 可选参数,背景模糊选项。<br/>该接口支持在ArkTS卡片中使用。 |
## BackgroundBlurStyleOptions<sup>10+</sup>对象说明
## BlurStyle
该接口支持在ArkTS卡片中使用。
| 名称 | 描述 |
| ------- | ---------- |
| Thin | 轻薄材质。 |
| Regular | 普通厚度材质。 |
| Thick | 厚材质。 |
| 名称 | 参数类型 | 必填 | 描述 |
| ----------- | ------| ------ | ------ |
| colorMode<sup>10+</sup> | [ThemeColorMode](ts-appendix-enums.md#themecolormode10) | 否 | 背景模糊效果使用的深浅色模式。<br/>默认值:ThemeColorMode.System |
| adaptiveColor<sup>10+</sup> | [AdaptiveColor](ts-appendix-enums.md#adaptivecolor10) | 否 | 背景模糊效果使用的取色模式。<br/>默认值:AdaptiveColor.Default |
## 示例
......@@ -30,16 +27,16 @@
// xxx.ets
@Entry
@Component
struct Index {
struct BackgroundBlurStyleDemo {
build() {
Column() {
Row() {
Text("Thin Material")
}
.width(350)
.height(300)
.backgroundBlurStyle(BlurStyle.Thin)
.position({ x: "15%", y: "30%" })
.width('50%')
.height('50%')
.backgroundBlurStyle(BlurStyle.Thin, { colorMode: ThemeColorMode.Light, adaptiveColor: AdaptiveColor.Default })
.position({ x: '15%', y: '30%' })
}
.height('100%')
.width('100%')
......@@ -48,4 +45,4 @@ struct Index {
}
}
```
![zh-cn_image_background_blur_style](figures/zh-cn_image_background_blur_style.png)
\ No newline at end of file
![zh-cn_image_background_blur_style](figures/zh-cn_image_background_blur_style.png)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册