Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
89681ccc
D
Docs
项目概览
OpenHarmony
/
Docs
大约 1 年 前同步成功
通知
159
Star
292
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
89681ccc
编写于
8月 28, 2023
作者:
O
openharmony_ci
提交者:
Gitee
8月 28, 2023
浏览文件
操作
浏览文件
下载
差异文件
!22959 添加EffectComponent接口文档
Merge pull request !22959 from yanjin/master
上级
c804cee5
6af133f7
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
120 addition
and
0 deletion
+120
-0
zh-cn/application-dev/reference/arkui-ts/Readme-CN.md
zh-cn/application-dev/reference/arkui-ts/Readme-CN.md
+2
-0
zh-cn/application-dev/reference/arkui-ts/figures/zh-cn_image_effectcomponent.png
...eference/arkui-ts/figures/zh-cn_image_effectcomponent.png
+0
-0
zh-cn/application-dev/reference/arkui-ts/ts-container-effectcomponent.md
...on-dev/reference/arkui-ts/ts-container-effectcomponent.md
+99
-0
zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-use-effect.md
.../reference/arkui-ts/ts-universal-attributes-use-effect.md
+19
-0
未找到文件。
zh-cn/application-dev/reference/arkui-ts/Readme-CN.md
浏览文件 @
89681ccc
...
@@ -52,6 +52,7 @@
...
@@ -52,6 +52,7 @@
-
[
文本通用
](
ts-universal-attributes-text-style.md
)
-
[
文本通用
](
ts-universal-attributes-text-style.md
)
-
[
拖拽控制
](
ts-universal-attributes-drag-drop.md
)
-
[
拖拽控制
](
ts-universal-attributes-drag-drop.md
)
-
[
安全区域
](
ts-universal-attributes-expand-safe-area.md
)
-
[
安全区域
](
ts-universal-attributes-expand-safe-area.md
)
-
[
特效绘制合并
](
ts-universal-attributes-use-effect.md
)
-
手势处理
-
手势处理
-
[
绑定手势方法
](
ts-gesture-settings.md
)
-
[
绑定手势方法
](
ts-gesture-settings.md
)
-
基础手势
-
基础手势
...
@@ -141,6 +142,7 @@
...
@@ -141,6 +142,7 @@
-
[
TabContent
](
ts-container-tabcontent.md
)
-
[
TabContent
](
ts-container-tabcontent.md
)
-
[
UIExtensionComponent
](
ts-container-ui-extension-component.md
)
-
[
UIExtensionComponent
](
ts-container-ui-extension-component.md
)
-
[
WaterFlow
](
ts-container-waterflow.md
)
-
[
WaterFlow
](
ts-container-waterflow.md
)
-
[
EffectComponent
](
ts-container-effectcomponent.md
)
-
媒体组件
-
媒体组件
-
[
Video
](
ts-media-components-video.md
)
-
[
Video
](
ts-media-components-video.md
)
-
绘制组件
-
绘制组件
...
...
zh-cn/application-dev/reference/arkui-ts/figures/zh-cn_image_effectcomponent.png
0 → 100644
浏览文件 @
89681ccc
361.0 KB
zh-cn/application-dev/reference/arkui-ts/ts-container-effectcomponent.md
0 → 100644
浏览文件 @
89681ccc
# EffectComponent
特效合并容器组件,用于子节点特效绘制的合并,实现特效的绘制性能优化。
> **说明:**
>
> - 该组件从API Version 10开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。
>
> - 该组件为系统接口。
>
> - 目前该组件仅支持子组件背景模糊效果的绘制合并优化。
>
> - 在对子组件的背景模糊特效进行绘制合并时,需要将子组件的backgroundBlurStyle(BlurStyle)属性替换成useEffect(true)。
## 子组件
可以包含子组件。
## 接口
EffectComponent()
创建特效绘制合并组件,用于对子组件背景模糊特效的绘制合并。
## 事件
不支持通用事件。
## 属性
支持通用属性,目前仅支持对backgroundBlurStyle属性做绘制合并优化。
## 示例
```
ts
//Index.ets
@
Entry
@
Component
struct
Index
{
build
()
{
Stack
()
{
Image
(
$r
(
"
app.media.example
"
))
.
autoResize
(
true
)
EffectComponent
()
{
Column
({
space
:
20
})
{
// 使用backgroundBlurStyle进行模糊绘制
Text
(
"
Normal text with backgroundBlurStyle
"
)
.
textAlign
(
TextAlign
.
Center
)
.
fontSize
(
16
)
.
fontWeight
(
FontWeight
.
Medium
)
.
backgroundBlurStyle
(
BlurStyle
.
Thick
)
.
borderRadius
(
16
)
.
width
(
'
90%
'
)
.
height
(
'
48
'
)
// 不进行模糊绘制
Text
(
"
Normal text without blur effect
"
)
.
textAlign
(
TextAlign
.
Center
)
.
fontSize
(
16
)
.
fontWeight
(
FontWeight
.
Medium
)
.
border
({
width
:
1
})
.
borderRadius
(
16
)
.
width
(
'
90%
'
)
.
height
(
'
48
'
)
// 使用useEffect进行模糊合并绘制,继承EffectComponent的模糊参数
Text
(
"
Normal text with useeffcet blur 1
"
)
.
textAlign
(
TextAlign
.
Center
)
.
useEffect
(
true
)
.
fontSize
(
16
)
.
fontWeight
(
FontWeight
.
Medium
)
.
borderRadius
(
16
)
.
width
(
'
90%
'
)
.
height
(
'
48
'
)
// 使用useEffect进行模糊合并绘制,继承EffectComponent的模糊参数
Text
(
"
Normal text with useeffcet blur 2
"
)
.
textAlign
(
TextAlign
.
Center
)
.
useEffect
(
true
)
.
fontSize
(
16
)
.
fontWeight
(
FontWeight
.
Medium
)
.
borderRadius
(
16
)
.
width
(
'
90%
'
)
.
height
(
'
48
'
)
}
.
width
(
'
100%
'
)
}
.
backgroundBlurStyle
(
BlurStyle
.
Thin
)
}
.
backgroundColor
(
Color
.
Black
)
.
width
(
'
100%
'
)
.
height
(
'
100%
'
)
}
}
```
![
zh-cn_image_effectcomponent
](
figures/zh-cn_image_effectcomponent.png
)
\ No newline at end of file
zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-use-effect.md
0 → 100644
浏览文件 @
89681ccc
# 特效绘制合并
用于对背景模糊等特效进行绘制合并。
> **说明:**
>
> 从API Version 10开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。
>
> 该接口为系统接口。
## 属性
| 名称 | 参数类型 | 参数描述 |
| -------- | -------- | -------- |
| useEffect | bool | 控制组件是否继承EffectComponent组件的特效属性参数,从而合并绘制特效。
<br/>
useEffect为true时子组件继承EffectComponent组件的特效属性参数。
<br/>
默认值:false|
## 示例
示例请参考
[
EffectComponent
](
ts-container-effectcomponent.md
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录