1 Star 0 Fork 4K

Feng Lin/interface_sdk-js

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
@ohos.arkui.advanced.DownloadFileButton.d.ets 6.52 KB
一键复制 编辑 原始数据 按行查看 历史
田岚清 提交于 11个月前 . 添加下载icon控件
/*
* 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
*/
/**
* Enum for DownloadIconStyle
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
export declare enum DownloadIconStyle {
/**
* FULL_FILLED type.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
FULL_FILLED = 1,
/**
* LINES type.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
LINES = 2
}
/**
* Enum for DownloadDescription
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
export declare enum DownloadDescription {
/**
* Description is DOWNLOAD.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
DOWNLOAD = 1,
/**
* Description is DOWNLOAD_FILE.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
DOWNLOAD_FILE = 2,
/**
* Description is SAVE.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
SAVE = 3,
/**
* Description is SAVE_IMAGE.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
SAVE_IMAGE = 4,
/**
* Description is SAVE_FILE.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
SAVE_FILE = 5,
/**
* Description is DOWNLOAD_AND_SHARE.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
DOWNLOAD_AND_SHARE = 6,
/**
* Description is RECEIVE.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
RECEIVE = 7,
/**
* Description is CONTINUE_TO_RECEIVE.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
CONTINUE_TO_RECEIVE = 8
}
/**
* Enum for DownloadDescription
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
export declare enum DownloadLayoutDirection {
/**
* Layout direction is HORIZONTAL.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
HORIZONTAL = 0,
/**
* Layout direction is VERTICAL.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
VERTICAL = 1
}
/**
* Defines the download content options.
*
* @interface DownloadContentOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
export interface DownloadContentOptions {
/**
* DownloadFileButton icon Style.
*
* @type { ?DownloadIconStyle }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
icon?: DownloadIconStyle;
/**
* DownloadFileButton description.
*
* @type { ?DownloadDescription }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
text?: DownloadDescription;
}
/**
* Defines the DownloadFileButton style option.
*
* @interface DownloadStyleOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
export interface DownloadStyleOptions {
/**
* Icon size.
*
* @type { ?Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
iconSize?: Dimension;
/**
* Layout direction.
*
* @type { ?DownloadLayoutDirection }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
layoutDirection?: DownloadLayoutDirection;
/**
* Font size.
*
* @type { ?Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
fontSize?: Dimension;
/**
* Font Style.
*
* @type { ?FontStyle }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
fontStyle?: FontStyle;
/**
* Font weight.
*
* @type { ?(number | FontWeight | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
fontWeight?: number | FontWeight | string;
/**
* Font family.
*
* @type { ?(string | Resource) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
fontFamily?: string | Resource;
/**
* Font color.
*
* @type { ?ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
fontColor?: ResourceColor;
/**
* Icon color.
*
* @type { ?ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
iconColor?: ResourceColor;
/**
* Text and Icon space.
*
* @type { ?Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
textIconSpace?: Dimension;
}
/**
* Declare Component DownloadFileButton
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
@Component
export declare struct DownloadFileButton {
/**
* Set DownloadFileButton Content.
*
* @type { DownloadContentOptions }.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
@State contentOptions: DownloadContentOptions;
/**
* Set DownloadFileButton Style.
*
* @type { DownloadStyleOptions }.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
@State styleOptions: DownloadStyleOptions;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lffl8796/interface_sdk-js.git
git@gitee.com:lffl8796/interface_sdk-js.git
lffl8796
interface_sdk-js
interface_sdk-js
master

搜索帮助