sync working code, and import type-doc
This commit is contained in:
22
lib/ui/icon.d.ts
vendored
22
lib/ui/icon.d.ts
vendored
@ -1,3 +1,25 @@
|
||||
/**
|
||||
* 创建矢量图标元素
|
||||
* @param type 样式分类,可以是 ['`fa-light`', '`fa-regular`', '`fa-solid`'] 其中之一
|
||||
* @param id 图标 id
|
||||
* @param style 样式表对象
|
||||
*/
|
||||
export function createIcon(type: string, id: string, style?: { [key: string]: string }): SVGSVGElement
|
||||
/**
|
||||
* 修改矢量图标
|
||||
* @param svg 矢量图标元素
|
||||
* @param type 样式分类,见 { @link createIcon } 第一个参数
|
||||
* @param id 图标 id,见 { @link createIcon } 第二个参数
|
||||
*/
|
||||
export function changeIcon(svg: SVGSVGElement, type: string, id: string): SVGSVGElement
|
||||
/**
|
||||
* 解析容器元素内符合条件的子元素为矢量图标元素
|
||||
* @param container 容器元素
|
||||
* @example
|
||||
* ```
|
||||
* <svg data-id="user" data-type="fa-solid"></svg>
|
||||
* ```
|
||||
* - `data-id`: 见 { @link createIcon } 第二个参数
|
||||
* - `data-type`: 见 { @link createIcon } 第一个参数
|
||||
*/
|
||||
export function resolveIcon(container: HTMLElement): HTMLElement
|
Reference in New Issue
Block a user