mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-12 09:18:14 +08:00
♻️ showConfirm重构
This commit is contained in:
58
src/types/Component/Confirm.d.ts
vendored
58
src/types/Component/Confirm.d.ts
vendored
@@ -1,58 +0,0 @@
|
||||
/**
|
||||
* @file types Component Confirm.d.ts
|
||||
* @description Component Confirm 类型声明文件
|
||||
* @since Beta v0.3.4
|
||||
*/
|
||||
|
||||
declare namespace TGApp.Component.Confirm {
|
||||
/**
|
||||
* @description Confirm 参数
|
||||
* @interface ParamsBase
|
||||
* @since Beta v0.3.3
|
||||
* @property {string} title 标题
|
||||
* @property {string} text 文本
|
||||
* @property {string} mode 模式 // normal: 正常(默认),input: 输入框
|
||||
* @property {boolean} otcancel 点击外部取消 // true: 取消(默认),false: 不取消
|
||||
* @return ParamsBase
|
||||
*/
|
||||
interface ParamsBase {
|
||||
title: string;
|
||||
text?: string;
|
||||
mode?: "confirm" | "input";
|
||||
otcancel?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Confirm 参数- confirm mode
|
||||
* @interface ParamsConfirm
|
||||
* @since Beta v0.3.3
|
||||
* @extends ParamsBase
|
||||
* @property {"confirm"|undefined} mode
|
||||
* @return ParamsConfirm
|
||||
*/
|
||||
interface ParamsConfirm extends ParamsBase {
|
||||
mode?: "confirm";
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Confirm 参数 - input mode
|
||||
* @interface ParamsInput
|
||||
* @since Beta v0.4.5
|
||||
* @extends ParamsBase
|
||||
* @property {"input"} mode
|
||||
* @property {string} input 可选的配置默认输入值
|
||||
* @return ParamsInput
|
||||
*/
|
||||
interface ParamsInput extends ParamsBase {
|
||||
mode: "input";
|
||||
input?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Confirm 参数
|
||||
* @since Beta v0.3.3
|
||||
* @type Params
|
||||
* @return Params
|
||||
*/
|
||||
type Params = ParamsConfirm | ParamsInput;
|
||||
}
|
||||
23
src/types/Component/Snackbar.d.ts
vendored
23
src/types/Component/Snackbar.d.ts
vendored
@@ -1,23 +0,0 @@
|
||||
/**
|
||||
* @file types Component Snackbar.d.ts
|
||||
* @description Component Snackbar 类型声明文件
|
||||
* @since Beta v0.6.3
|
||||
*/
|
||||
|
||||
declare namespace TGApp.Component.Snackbar {
|
||||
/**
|
||||
* @description Snackbar 参数
|
||||
* @interface Params
|
||||
* @since Beta v0.6.3
|
||||
* @property {string} text 文本
|
||||
* @property {string} color 颜色
|
||||
* @property {number} timeout 超时时间
|
||||
* @property {boolean} show 是否显示
|
||||
* @return Params
|
||||
*/
|
||||
interface Params {
|
||||
text: string;
|
||||
color: string;
|
||||
timeout: number;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user