sync working code, and import type-doc
This commit is contained in:
34
lib/ui/checkbox.d.ts
vendored
34
lib/ui/checkbox.d.ts
vendored
@ -1,18 +1,50 @@
|
||||
/**
|
||||
* 复选框选项
|
||||
*/
|
||||
interface CheckboxOptions {
|
||||
/** 样式类名 */
|
||||
className?: string;
|
||||
/** 是否可用 */
|
||||
enabled?: boolean;
|
||||
/** html 名称 */
|
||||
name?: string;
|
||||
/** 焦点索引 */
|
||||
tabIndex?: Number;
|
||||
/** 样式分类,可以是 ['`fa-light`', '`fa-regular`', '`fa-solid`'] 其中之一 */
|
||||
type?: string;
|
||||
/** 标签 */
|
||||
label?: string | HTMLElement;
|
||||
/** 是否已选中 */
|
||||
checked?: boolean;
|
||||
/** 图片高度 */
|
||||
imageHeight?: Number;
|
||||
/** 选中时显示的元素 */
|
||||
checkedNode?: HTMLElement;
|
||||
/** 未选中时显示的元素 */
|
||||
uncheckedNode?: HTMLElement;
|
||||
customerAttributes?: { [key: string]: string };
|
||||
/** 自定义 html 属性 */
|
||||
customAttributes?: { [key: string]: string };
|
||||
/**
|
||||
* 复选框选择状态改变时触发
|
||||
* @param this 当前复选框对应的 HtmlInput 元素
|
||||
* @param ev 选择事件对象
|
||||
*/
|
||||
onchange?: (this: HTMLInputElement, ev: Event) => any;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建一个单选框
|
||||
* @param opts 单选框参数
|
||||
*/
|
||||
export function createRadiobox(opts?: CheckboxOptions): HTMLElement
|
||||
/**
|
||||
* 创建一个复选框
|
||||
* @param opts 复选框参数
|
||||
*/
|
||||
export function createCheckbox(opts?: CheckboxOptions): HTMLElement
|
||||
/**
|
||||
* 解析容器元素内符合条件的子元素为复选框元素
|
||||
* @param container 容器元素
|
||||
* @param legacy 是否使用传统模式
|
||||
*/
|
||||
export function resolveCheckbox(container?: HTMLElement, legacy?: boolean): HTMLElement
|
Reference in New Issue
Block a user