From 88f0dcca2348abc2e125402535773d9a662f253c Mon Sep 17 00:00:00 2001 From: hehongyang3 Date: Mon, 18 Aug 2025 16:08:53 +0800 Subject: [PATCH] particle modifier Signed-off-by: hehongyang3 Change-Id: I8d3cdf863bb94064222e01f9f8b8241bb405b7d6 --- api/@ohos.arkui.modifier.static.d.ets | 7 +++++ api/arkui/ParticleModifier.static.d.ets | 36 +++++++++++++++++++++++ api/arkui/component/particle.static.d.ets | 10 +++---- 3 files changed, 48 insertions(+), 5 deletions(-) create mode 100644 api/arkui/ParticleModifier.static.d.ets diff --git a/api/@ohos.arkui.modifier.static.d.ets b/api/@ohos.arkui.modifier.static.d.ets index 3a55e021d7..5af697a772 100644 --- a/api/@ohos.arkui.modifier.static.d.ets +++ b/api/@ohos.arkui.modifier.static.d.ets @@ -331,3 +331,10 @@ export { HyperlinkModifier } from './arkui/HyperlinkModifier'; * @since 20 */ export { MarqueeModifier } from './arkui/MarqueeModifier'; + +/** + * Export ParticleModifier, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export { ParticleModifier } from './arkui/ParticleModifier'; diff --git a/api/arkui/ParticleModifier.static.d.ets b/api/arkui/ParticleModifier.static.d.ets new file mode 100644 index 0000000000..e2365faf7c --- /dev/null +++ b/api/arkui/ParticleModifier.static.d.ets @@ -0,0 +1,36 @@ +'use static' +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit ArkUI + * @arkts 1.2 + */ + + +import { AttributeModifier } from './component/common'; +import { ParticleAttribute } from './component/particle'; + + +/** + * Defines Particle Modifier + * + * @implements { ParticleAttribute, AttributeModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare class ParticleModifier implements ParticleAttribute, AttributeModifier {} diff --git a/api/arkui/component/particle.static.d.ets b/api/arkui/component/particle.static.d.ets index 67008aeef2..556c54dec1 100644 --- a/api/arkui/component/particle.static.d.ets +++ b/api/arkui/component/particle.static.d.ets @@ -705,21 +705,21 @@ export declare interface ParticleAttribute extends CommonMethod { /** * Particle disturbance Field. * - * @param { Array } fields - particle disturbance Field params. + * @param { Array | undefined } fields - particle disturbance Field params. * @returns { ParticleAttribute } Returns the particle attribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - disturbanceFields(fields: Array | undefined): this; + default disturbanceFields(fields: Array | undefined): this; /** * Add particle animation component properties. * - * @param { Array } value - The emitter property. + * @param { Array | undefined } value - The emitter property. * @returns { ParticleAttribute } Returns the particle attribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - emitter(value: Array | undefined): this; + default emitter(value: Array | undefined): this; /** * Add particle attribute modifier. @@ -730,7 +730,7 @@ export declare interface ParticleAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; + default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; } /** * Defines particle disturbance Field params. -- Gitee