This commit is contained in:
2026-09-22 16:04:51 +08:00
parent b9e401af4f
commit 1726a18093
27 changed files with 2469 additions and 1835 deletions
+8 -6
View File
@@ -1,5 +1,4 @@
import React from 'react';
import PropTypes from 'prop-types';
/**
* 渲染一个 iconfont symbol 图标(依赖 Iconfont.init 注入的 SVG symbol 脚本)
@@ -7,18 +6,21 @@ import PropTypes from 'prop-types';
* @param {string} [props.className] 额外的 class 名
* @param {string} props.type 图标名,对应 svg symbol 的 id
* @param {Object} [props.style] 行内样式
* @param {number} [props.rotate] 旋转角度(deg)
* @param {boolean} [props.spin] 是否开启旋转动画
* @param {string} [props.twoToneColor] 双色图标的第二色
* @param {boolean} [props.compact] 是否紧凑模式(去除默认间距)
*/
declare function Iconfont({ className, type, style, rotate, spin, twoToneColor, compact, ...props }: {
className?: string;
type: string;
style?: any;
rotate?: number;
spin?: boolean;
twoToneColor?: string;
compact?: boolean;
}): React.JSX.Element;
declare namespace Iconfont {
export namespace propTypes {
let className: PropTypes.Requireable<string>;
let type: PropTypes.Validator<string>;
let style: PropTypes.Requireable<object>;
}
export { createScriptUrlElements as init };
}