add RichText component

Signed-off-by: yaoyuchi <yaoyuchi@huawei.com>
This commit is contained in:
yaoyuchi 2022-02-14 14:20:38 +08:00
parent 20d8ef0467
commit 2784cf423d
3 changed files with 67 additions and 0 deletions

View File

@ -80,6 +80,7 @@ ohos_copy("ets_component") {
"api/@internal/component/ets/rating.d.ts",
"api/@internal/component/ets/rect.d.ts",
"api/@internal/component/ets/refresh.d.ts",
"api/@internal/component/ets/rich_text.d.ts",
"api/@internal/component/ets/row.d.ts",
"api/@internal/component/ets/row_split.d.ts",
"api/@internal/component/ets/scroll.d.ts",

View File

@ -68,6 +68,7 @@
/// <reference path="./rating.d.ts" />
/// <reference path="./rect.d.ts" />
/// <reference path="./refresh.d.ts" />
/// <reference path="./rich_text.d.ts" />
/// <reference path="./row.d.ts" />
/// <reference path="./row_split.d.ts" />
/// <reference path="./scroll.d.ts" />

View File

@ -0,0 +1,65 @@
/*
* Copyright (c) 2021 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.
*/
/**
* Provides an interface for RichText component.
* @since 8
*/
interface RichTextInterface {
/**
* Set value.
* @since 8
*/
(content: string): RichTextAttribute;
}
/**
* Defines the RichText attribute functions.
* @since 8
*/
declare class RichTextAttribute extends CommonMethod<RichTextAttribute> {
/**
* Just use for genetate tsbundle
* @ignore ide should ignore this arrtibute
*/
create(content: string): RichTextAttribute;
/**
* Just use for genetate tsbundle
* @ignore ide should ignore this arrtibute
*/
pop(): RichTextAttribute;
/**
* Just use for genetate tsbundle
* @ignore ide should ignore this arrtibute
*/
debugLine(value: string): RichTextAttribute;
/**
* Triggered when the RichText loading starts.
* @since 8
*/
onStart(callback: () => void): RichTextAttribute;
/**
* Triggered when the RichText loading ends.
* @since 8
*/
onComplete(callback: () => void): RichTextAttribute;
}
declare const RichText: RichTextInterface;
declare const RichTextInstance: RichTextAttribute;