!11616 ContainerSpanAttribute添加attributeModifier属性

Merge pull request !11616 from wjn/container_span
This commit is contained in:
openharmony_ci 2024-06-11 07:36:07 +00:00 committed by Gitee
commit 3bf80446a7
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 65 additions and 0 deletions

View File

@ -92,6 +92,18 @@ declare class ContainerSpanAttribute {
* @since 12
*/
textBackgroundStyle(style: TextBackgroundStyle): ContainerSpanAttribute;
/**
* Sets the attribute modifier.
*
* @param { AttributeModifier<ContainerSpanAttribute> } modifier - The instance of contain span modifier.
* @returns { ContainerSpanAttribute } the attribute of the ContainerSpanAttribute.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
attributeModifier(modifier: AttributeModifier<ContainerSpanAttribute>): ContainerSpanAttribute;
}
/**

View File

@ -587,3 +587,13 @@ export { WaterFlowModifier } from './arkui/WaterFlowModifier';
* @since 12
*/
export { AttributeUpdater } from './arkui/AttributeUpdater';
/**
* Export ContainerSpanModifier, which is used to expose applyNormalAttribute function.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
export { ContainerSpanModifier } from './arkui/ContainerSpanModifier';

43
api/arkui/ContainerSpanModifier.d.ts vendored Normal file
View File

@ -0,0 +1,43 @@
/*
* Copyright (c) 2024 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
*/
/**
* Defines ContainerSpan modifier, the base class for quick use modifier ability
*
* @extends ContainerSpanAttribute
* @implements AttributeModifier
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
export declare class ContainerSpanModifier extends ContainerSpanAttribute implements AttributeModifier<ContainerSpanAttribute> {
/**
* Defines the normal update attribute function.
*
* @param { ContainerSpanAttribute } containerSpanAttribute - The instance of ContainerSpanAttribute
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
applyNormalAttribute?(containerSpanAttribute: ContainerSpanAttribute): void;
}