From 233f07eebb6a4212227d29c7b9b15adc06adf757 Mon Sep 17 00:00:00 2001 From: yuxiaofei9 Date: Wed, 13 Aug 2025 15:33:04 +0800 Subject: [PATCH] =?UTF-8?q?[feate]=E9=AB=98=E7=BA=A7=E7=BB=84=E4=BB=B6Grid?= =?UTF-8?q?ObjectSortComponent1.2=E8=AF=AD=E6=B3=95=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yuxiaofei9 --- ...anced.GridObjectSortComponent.static.d.ets | 214 ++++++++++++++++++ 1 file changed, 214 insertions(+) create mode 100644 api/@ohos.arkui.advanced.GridObjectSortComponent.static.d.ets diff --git a/api/@ohos.arkui.advanced.GridObjectSortComponent.static.d.ets b/api/@ohos.arkui.advanced.GridObjectSortComponent.static.d.ets new file mode 100644 index 0000000000..0968711534 --- /dev/null +++ b/api/@ohos.arkui.advanced.GridObjectSortComponent.static.d.ets @@ -0,0 +1,214 @@ +'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 { Resource, ResourceStr, ResourceColor, LocalizedMargin } from './arkui/component/units'; +import { PropRef } from './arkui/stateManagement/decorator'; +import { Component } from './arkui/component/customComponent'; +import { SymbolGlyphModifier } from './arkui/SymbolGlyphModifier'; +import { Builder } from './arkui/component/builder'; +/** + * Controls the style types of GridObjectSortComponent. + * + * @enum { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum GridObjectSortComponentType { + /** + * The GridObjectSortComponent image text type. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + IMAGE_TEXT = "image_text", + /** + * The GridObjectSortComponent text type. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + TEXT = "text" +} +/** + * Declaration of the GridObjectSortComponent item. + * + * @interface GridObjectSortComponentIteml + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface GridObjectSortComponentItem { + /** + * id of GridObjectSortComponent item. + * + * @type { number | string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + id: number | string; + /** + * GridObjectSortComponent item text. + * + * @type { ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + text: ResourceStr; + /** + * selected of GridObjectSortComponent item, true is show area, false is add area. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + selected: boolean; + /** + * order of GridObjectSortComponentItem, Used for sorting dataList. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + order: number; + /** + * image resource path of the GridObjectSortComponent item. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + url?: ResourceStr; + /** + * symbol of the GridObjectSortComponent item. + * + * @type { ?SymbolGlyphModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + symbolStyle?: SymbolGlyphModifier; +} +/** + * GridObjectSortComponentOptions of GridObjectSortComponent. + * + * @interface GridEditOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface GridObjectSortComponentOptions { + /** + * Configuration GridObjectSortComponent type. + * + * @type { ?GridObjectSortComponentType } + * @default GridObjectSortComponentType.TEXT + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + type?: GridObjectSortComponentType; + /** + * The size of the GridObjectSortComponent image. + * + * @type { ?(number | Resource) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + imageSize?: number | Resource; + /** + * The title displayed in the unedited state of the GridObjectSortComponent. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + normalTitle?: ResourceStr; + /** + * The title displayed in the GridObjectSortComponent edit state. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + editTitle?: ResourceStr; + /** + * Display Area Title, First subtitle of the GridObjectSortComponent. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + showAreaTitle?: ResourceStr; + /** + * Add Zone Title, second subtitle of the GridObjectSortComponent. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 20 + */ + addAreaTitle?: ResourceStr; +} +/** + * Declare struct GridObjectSortComponent. + * @struct { GridObjectSortComponent } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +@Component +export declare struct GridObjectSortComponent { + /** + * Component types and parameters of the GridObjectSortComponent. + * + * @type { GridObjectSortComponentOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef + options: GridObjectSortComponentOptions; + /** + * Data list of GridObjectSortComponent. + * + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + dataList: Array; + /** + * Callback when Obtain edited data. + * + * @type { function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onSave: (select: Array, unselect: Array) => void; + /** + * Cancel callback for saving data. + * + * @type { function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onCancel: () => void; + /** + * Build function of GridObjectSortComponent. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since20 + */ + @Builder build(): void; +} \ No newline at end of file -- Gitee