import { AllowedComponentProps, VNodeProps } from '../common' import type { Shape } from '../../types/common' declare type IconType = 'font' | 'image' | 'svg' | 'custom' declare type IconSize = 'xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | string | number declare type RotateDirection = 'clockwise' | 'counterclockwise' declare interface IconProps { /** 图标名称或标识 */ name?: string /** 图标类型 */ type?: IconType /** 图标大小 */ size?: IconSize /** 图标颜色(仅对字体图标和SVG有效) */ color?: string /** 旋转角度(0-360) */ rotate?: number /** 旋转方向 */ rotateDirection?: RotateDirection /** 是否旋转动画 */ spin?: boolean /** 旋转动画速度(秒) */ spinSpeed?: number /** 是否禁用 */ disabled?: boolean /** 点击时的波纹效果 */ ripple?: boolean /** 波纹颜色 */ rippleColor?: string /** 自定义类名 */ customClass?: string /** 自定义样式 */ customStyle?: Record /** 图片模式(仅type='image'时有效) */ imageMode?: 'scaleToFill' | 'aspectFit' | 'aspectFill' | 'widthFix' | 'heightFix' | 'top' | 'bottom' | 'center' | 'left' | 'right' | 'top left' | 'top right' | 'bottom left' | 'bottom right' /** 图片地址(仅type='image'时有效) */ src?: string /** 是否懒加载图片(仅type='image'时有效) */ lazyLoad?: boolean /** 是否长按显示菜单(仅type='image'时有效) */ showMenuByLongpress?: boolean /** SVG内容(仅type='svg'时有效) */ svgContent?: string /** 使用SVG内容而不是内置图标(仅type='svg'时有效) */ useSvgContent?: boolean, /** 形状 **/ shape?: Shape } declare interface IconExpose { /** 重新加载图标 */ reload: () => void /** 获取图标状态 */ getStatus: () => { isLoaded: boolean loadError: boolean type: IconType name: string } } declare interface IconEmits { /** 点击事件 */ (e: 'click', event: MouseEvent): void /** 图片加载成功 */ (e: 'load', event: any): void /** 图片加载失败 */ (e: 'error', event: any): void } declare interface IconSlots { default?: () => any } declare interface _Icon { new(): { $props: AllowedComponentProps & VNodeProps & IconProps $emit: IconEmits $slots: IconSlots } & IconExpose } export declare const Icon: _Icon export default Icon export type { IconType, IconSize, RotateDirection, IconProps, IconExpose, IconEmits, IconSlots }