/**
* @license
* Copyright 厦门乾元盛世科技有限公司 All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file.
*/
import { ElementRef, Renderer } from '@angular/core';
import { SimpleChanges, OnChanges, OnDestroy } from '@angular/core';
export declare class Button implements OnChanges, OnDestroy {
private _renderer;
private _elementRef;
/** 样式前缀 */
prefixCls: string;
/**
* 设置按钮类型,可选值为 `primary` `dashed` `danger`,或者不设
* 按钮类型,取值:default、primary、warn等。默认为default。
* 自定义的颜色名称与色值,可以定义在 工程根目录/src/theme/variables.scss 文件中的 $colors 对象。
*/
type: string;
/**
* 设置 `button` 原生的 `type` 值,可选值请参考 [HTML 标准](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type)
* 可选值为`submit`, `button`, `reset`,默认取值为`button`。
*/
htmlType: string;
/**
* 设置按钮的图标类型。例如:search、download等。
* 当需要在 Button 内嵌入 Icon 时,可以设置 icon 属性,或者直接在 Button 内使用 Icon 组件。
* 如果想控制 Icon 具体的位置,只能直接使用 Icon 组件,而非 icon 属性。
*/
icon: string;
/** 设置按钮形状,可选值为 `circle` 或者不设。可选值为`circle`, `circle-outline'`。 */
shape: string;
/** 设置按钮大小。可选值为`large`, `small`, `default`,默认取值为`default`。 */
size: string;
/** 设置按钮载入状态。默认为false。 */
loading: boolean | {
delay?: number;
};
/** 禁用样式 */
disabled: boolean;
/** 幽灵属性,使按钮背景透明 */
ghost: boolean;
/** 用户CSS样式 */
class: string;
private clicked;
private timeout;
private delayTimeout;
constructor(_renderer: Renderer, _elementRef: ElementRef);
/**
* 最终样式
*/
readonly classes: string;
readonly sizeCls: string;
readonly iconType: string;
ngOnChanges(changes: SimpleChanges): void;
ngOnDestroy(): void;
handleClick(e: MouseEvent): void;
handleMouseUp(e: MouseEvent): void;
}