From 37c9cabf73cceeec2b9f1db19eefeef12b31b36c Mon Sep 17 00:00:00 2001 From: AXYChen Date: Sun, 17 Aug 2025 15:42:21 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8D=E5=AE=89=E5=85=A8=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E5=BC=BA=E5=9F=BA=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: AXYChen Change-Id: Iab8926359731e3bc3e8212272997382889670757 --- api/arkui/component/pasteButton.d.ets | 44 +++++----- api/arkui/component/saveButton.d.ets | 49 ++++++----- api/arkui/component/securityComponent.d.ets | 93 +++++++++------------ 3 files changed, 84 insertions(+), 102 deletions(-) diff --git a/api/arkui/component/pasteButton.d.ets b/api/arkui/component/pasteButton.d.ets index cc40d57a6d..003cd0ff3a 100644 --- a/api/arkui/component/pasteButton.d.ets +++ b/api/arkui/component/pasteButton.d.ets @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024-2025 Huawei Device Co., Ltd. + * 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 @@ -18,45 +18,39 @@ * @arkts 1.2 */ +import { ButtonType } from "./button"; +import { ClickEvent, AttributeModifier, CommonMethod } from "./common"; +import { SecurityComponentMethod } from "./securityComponent"; +import { BusinessError } from "../../@ohos.base"; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; -// WARNING! THIS FILE IS AUTO-GENERATED, DO NOT MAKE CHANGES, THEY WILL BE LOST ON NEXT GENERATION! - -import { memo, ComponentBuilder, __memo_context_type, __memo_id_type } from './../stateManagement/runtime' -import { ButtonType } from './button' -import { ClickEvent } from './common' -import { SecurityComponentMethod, SecurityComponentLayoutDirection } from './securityComponent' -import { Dimension, Position, Edges, LocalizedEdges, ResourceColor, Padding, Length, SizeOptions, ConstraintSizeOptions } from './units' -import { FontStyle, FontWeight, BorderStyle } from './enums' -import { Resource } from './../../../api/global/resource' -export enum PasteIconStyle { +export declare enum PasteIconStyle { LINES = 0 } -export enum PasteDescription { + +export declare enum PasteDescription { PASTE = 0 } -export interface PasteButtonOptions { + +export declare interface PasteButtonOptions { icon?: PasteIconStyle; text?: PasteDescription; buttonType?: ButtonType; } -export enum PasteButtonOnClickResult { + +export declare enum PasteButtonOnClickResult { SUCCESS = 0, TEMPORARY_AUTHORIZATION_FAILED = 1 } -export interface PasteButtonInterface { - invoke(): PasteButtonAttribute; +export type PasteButtonCallback = (event: ClickEvent, result: PasteButtonOnClickResult, error?: BusinessError) => void; + +export declare interface PasteButtonAttribute extends SecurityComponentMethod { + onClick(event: PasteButtonCallback | undefined): this; } -export type Callback_ClickEvent_PasteButtonOnClickResult_Void = (event: ClickEvent, - result: PasteButtonOnClickResult) => void; -export interface PasteButtonAttribute extends SecurityComponentMethod { - @memo - onClick(value: ((event: ClickEvent,result: PasteButtonOnClickResult) => void)): this; -} + @memo @ComponentBuilder export declare function PasteButton( - options?: PasteButtonOptions | undefined, - @memo - content_?: () => void, + options?: PasteButtonOptions ): PasteButtonAttribute diff --git a/api/arkui/component/saveButton.d.ets b/api/arkui/component/saveButton.d.ets index 0189578297..aa70bdebe5 100644 --- a/api/arkui/component/saveButton.d.ets +++ b/api/arkui/component/saveButton.d.ets @@ -18,22 +18,20 @@ * @arkts 1.2 */ +import { ButtonType } from "./button"; +import { ClickEvent, AttributeModifier, CommonMethod } from "./common"; +import { SecurityComponentMethod } from "./securityComponent"; +import { BusinessError } from "../../@ohos.base"; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; +import { Resource, Dimension, BorderRadiuses, SizeOptions } from "./units"; -// WARNING! THIS FILE IS AUTO-GENERATED, DO NOT MAKE CHANGES, THEY WILL BE LOST ON NEXT GENERATION! - -import { memo, ComponentBuilder, __memo_context_type, __memo_id_type } from './../stateManagement/runtime' -import { ButtonType } from './button' -import { ClickEvent } from './common' -import { SecurityComponentMethod, SecurityComponentLayoutDirection } from './securityComponent' -import { Dimension, Position, Edges, LocalizedEdges, ResourceColor, Padding, Length, SizeOptions, ConstraintSizeOptions } from './units' -import { FontStyle, FontWeight, BorderStyle } from './enums' -import { Resource } from './../../../api/global/resource' -export enum SaveIconStyle { +export declare enum SaveIconStyle { FULL_FILLED = 0, LINES = 1, PICTURE = 2 } -export enum SaveDescription { + +export declare enum SaveDescription { DOWNLOAD = 0, DOWNLOAD_FILE = 1, SAVE = 2, @@ -45,31 +43,32 @@ export enum SaveDescription { SAVE_TO_GALLERY = 8, EXPORT_TO_GALLERY = 9, QUICK_SAVE_TO_GALLERY = 10, - RESAVE_TO_GALLERY = 11 + RESAVE_TO_GALLERY = 11, + SAVE_ALL = 12 } -export interface SaveButtonOptions { +export declare interface SaveButtonOptions { icon?: SaveIconStyle; text?: SaveDescription; buttonType?: ButtonType; } -export enum SaveButtonOnClickResult { +export declare enum SaveButtonOnClickResult { SUCCESS = 0, TEMPORARY_AUTHORIZATION_FAILED = 1 } -export interface SaveButtonInterface { - invoke(): SaveButtonAttribute; +export type SaveButtonCallback = (event: ClickEvent, result: SaveButtonOnClickResult, error?: BusinessError) => void; + +export declare interface SaveButtonAttribute extends SecurityComponentMethod { + onClick(event: SaveButtonCallback | undefined): this; + setIcon(icon: Resource | undefined): this; + setText(text: string | Resource | undefined): this; + iconSize(size: Dimension | SizeOptions | undefined): this; + iconBorderRadius(radius: Dimension | BorderRadiuses | undefined): this; + stateEffect(enabled: boolean | undefined): this; } -export type Callback_ClickEvent_SaveButtonOnClickResult_Void = (event: ClickEvent, - result: SaveButtonOnClickResult) => void; -export interface SaveButtonAttribute extends SecurityComponentMethod { - @memo - onClick(value: ((event: ClickEvent,result: SaveButtonOnClickResult) => void)): this; -} + @memo @ComponentBuilder export declare function SaveButton( - options?: SaveButtonOptions | undefined, - @memo - content_?: () => void, + options?: SaveButtonOptions, ): SaveButtonAttribute diff --git a/api/arkui/component/securityComponent.d.ets b/api/arkui/component/securityComponent.d.ets index 14acb144b6..968c8fbe0e 100644 --- a/api/arkui/component/securityComponent.d.ets +++ b/api/arkui/component/securityComponent.d.ets @@ -21,59 +21,48 @@ // WARNING! THIS FILE IS AUTO-GENERATED, DO NOT MAKE CHANGES, THEY WILL BE LOST ON NEXT GENERATION! -import { memo, ComponentBuilder, __memo_context_type, __memo_id_type } from './../stateManagement/runtime' -import { Dimension, Position, Edges, LocalizedEdges, ResourceColor, Padding, Length, SizeOptions, ConstraintSizeOptions } from './units' -import { FontStyle, FontWeight, BorderStyle } from './enums' -import { Resource } from './../../../api/global/resource' -export enum SecurityComponentLayoutDirection { +import { Dimension, Position, Edges, LocalizedEdges, ResourceColor, Padding, Length, SizeOptions, ConstraintSizeOptions, BorderRadiuses } from './units' +import { FontStyle, FontWeight, BorderStyle, TextHeightAdaptivePolicy, Axis, Alignment } from './enums' +import { ChainStyle, LocalizedAlignRuleOptions, AlignRuleOption, AttributeModifier, CommonMethod } from './common' +import { Resource } from '../../global/resource'; +import { memo, ComponentBuilder } from './../stateManagement/runtime' +export declare enum SecurityComponentLayoutDirection { HORIZONTAL = 0, VERTICAL = 1 } -export interface SecurityComponentMethod { - @memo - iconSize(value: Dimension): this; - @memo - layoutDirection(value: SecurityComponentLayoutDirection): this; - @memo - position(value: Position): this; - @memo - markAnchor(value: Position): this; - @memo - offset(value: Position | Edges | LocalizedEdges): this; - @memo - fontSize(value: Dimension): this; - @memo - fontStyle(value: FontStyle): this; - @memo - fontWeight(value: number | FontWeight | string): this; - @memo - fontFamily(value: string | Resource): this; - @memo - fontColor(value: ResourceColor): this; - @memo - iconColor(value: ResourceColor): this; - @memo - backgroundColor(value: ResourceColor): this; - @memo - borderStyle(value: BorderStyle): this; - @memo - borderWidth(value: Dimension): this; - @memo - borderColor(value: ResourceColor): this; - @memo - borderRadius(value: Dimension): this; - @memo - padding(value: Padding | Dimension): this; - @memo - textIconSpace(value: Dimension): this; - @memo - key(value: string): this; - @memo - width(value: Length): this; - @memo - height(value: Length): this; - @memo - size(value: SizeOptions): this; - @memo - constraintSize(value: ConstraintSizeOptions): this; +export declare interface SecurityComponentMethod { + iconSize(value: Dimension | undefined): this; + layoutDirection(value: SecurityComponentLayoutDirection | undefined): this; + position(value: Position | undefined): this; + markAnchor(value: Position | undefined): this; + offset(value: Position | Edges | LocalizedEdges | undefined): this; + fontSize(value: Dimension | undefined): this; + fontStyle(value: FontStyle | undefined): this; + fontWeight(value: int | FontWeight | string | Resource | undefined): this; + fontFamily(value: string | Resource | undefined): this; + fontColor(value: ResourceColor | undefined): this; + iconColor(value: ResourceColor | undefined): this; + backgroundColor(value: ResourceColor | undefined): this; + borderStyle(value: BorderStyle | undefined): this; + borderWidth(value: Dimension | undefined): this; + borderColor(value: ResourceColor | undefined): this; + borderRadius(radius: Dimension | BorderRadiuses | undefined): this; + padding(value: Padding | Dimension | undefined): this; + textIconSpace(value: Dimension | undefined): this; + key(value: string | undefined): this; + width(value: Length | undefined): this; + height(value: Length | undefined): this; + size(value: SizeOptions | undefined): this; + constraintSize(value: ConstraintSizeOptions | undefined): this; + align(alignType: Alignment | undefined): this; + alignRules(alignRule: AlignRuleOption | LocalizedAlignRuleOptions | undefined): this; + id(description: string | undefined): this; + chainMode(direction: Axis | undefined, style: ChainStyle | undefined): this; + minFontScale(scale: double | Resource | undefined): this; + maxFontScale(scale: double | Resource | undefined): this; + maxLines(line: int | Resource | undefined): this; + minFontSize(minSize: double | string | Resource | undefined): this; + maxFontSize(maxSize: double | string | Resource | undefined): this; + heightAdaptivePolicy(policy: TextHeightAdaptivePolicy | undefined): this; + enabled(respond: boolean | undefined): this; } -- Gitee