mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-11-27 01:11:35 +00:00
!14406 useEffect 接口变更
Merge pull request !14406 from happy/wxl_useEffect
This commit is contained in:
commit
bacb548238
41
api/@internal/component/ets/common.d.ts
vendored
41
api/@internal/component/ets/common.d.ts
vendored
@ -4771,6 +4771,33 @@ declare interface ItemDragInfo {
|
||||
y: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum of using the effects template mode.
|
||||
*
|
||||
* @enum { number }
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @atomicservice
|
||||
* @since 14
|
||||
*/
|
||||
declare enum EffectType {
|
||||
/**
|
||||
* Define use the effects template defined by the parent effectComponent.
|
||||
*
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @atomicservice
|
||||
* @since 14
|
||||
*/
|
||||
DEFAULT = 0,
|
||||
/**
|
||||
* Define use the effects template defined by the window.
|
||||
*
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @atomicservice
|
||||
* @since 14
|
||||
*/
|
||||
WINDOW_EFFECT = 1,
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the drag status before drag action.
|
||||
*
|
||||
@ -17647,6 +17674,20 @@ declare class CommonMethod<T> {
|
||||
*/
|
||||
useShadowBatching(value: boolean): T;
|
||||
|
||||
/**
|
||||
* Sets whether the component should apply the effects template defined by the parent effectComponent or window.
|
||||
* If multiple parent effectComponents are found, the nearest one will be used.
|
||||
* If no parent effectComponent is found, this method has no effect.
|
||||
*
|
||||
* @param { boolean } useEffect - true means the component should apply the effects template defined by the parent effectComponent or window.
|
||||
* @param { EffectType } effectType - the effect type of the effects template, defined by the parent effectComponent or window.
|
||||
* @returns { T } return the component attribute.
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @atomicservice
|
||||
* @since 14
|
||||
*/
|
||||
useEffect(useEffect: boolean, effectType: EffectType): T;
|
||||
|
||||
/**
|
||||
* Sets whether the component should apply the effects template defined by the parent effectComponent.
|
||||
* If multiple parent effectComponents are found, the nearest one will be used.
|
||||
|
Loading…
Reference in New Issue
Block a user