mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-16 09:58:13 +08:00
🌱 初步尝试改造 confirm,回调没写好 #34
This commit is contained in:
30
src/types/Component/Confirm.d.ts
vendored
Normal file
30
src/types/Component/Confirm.d.ts
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* @file types Component Confirm.d.ts
|
||||
* @description Component Confirm 类型声明文件
|
||||
* @author BTMuli <bt-muli@outlook.com>
|
||||
* @since Alpha v0.2.3
|
||||
*/
|
||||
|
||||
declare namespace TGApp.Component.Confirm {
|
||||
/**
|
||||
* @description Confirm 参数
|
||||
* @interface Params
|
||||
* @since Alpha v0.2.3
|
||||
* @property {string} title 标题
|
||||
* @property {string} text 文本
|
||||
* @property {string} mode 模式 // normal: 正常(默认),input: 输入框
|
||||
* @property {boolean} otcancel 点击外部取消 // true: 取消(默认),false: 不取消
|
||||
* @property {function} onConfirm 确认回调
|
||||
* @property {function} onCancel 取消回调
|
||||
* @property {function} onInput 输入回调
|
||||
* @return Params
|
||||
*/
|
||||
export interface Params {
|
||||
title: string;
|
||||
text?: string;
|
||||
mode?: "confirm" | "input";
|
||||
otcancel?: boolean;
|
||||
onConfirm?: (value?: string | boolean) => void;
|
||||
onCancel?: () => void;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user