mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-12 09:18:14 +08:00
✏️ 修正 Input Res
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file component func confirm.ts
|
||||
* @description 封装自定义 confirm 组件,通过函数调用的方式,简化 confirm 的使用
|
||||
* @since Beta v0.3.3
|
||||
* @since Beta v0.3.4
|
||||
*/
|
||||
|
||||
import { h, render } from "vue";
|
||||
@@ -36,7 +36,7 @@ const renderBox = (props: TGApp.Component.Confirm.Params): VNode => {
|
||||
let confirmInstance: VNode;
|
||||
|
||||
async function showConfirm(props: TGApp.Component.Confirm.ParamsConfirm): Promise<boolean>;
|
||||
async function showConfirm(props: TGApp.Component.Confirm.ParamsInput): Promise<string>;
|
||||
async function showConfirm(props: TGApp.Component.Confirm.ParamsInput): Promise<string | false>;
|
||||
async function showConfirm(props: TGApp.Component.Confirm.Params): Promise<string | boolean>;
|
||||
async function showConfirm(props: TGApp.Component.Confirm.Params): Promise<string | boolean> {
|
||||
if (confirmInstance !== undefined) {
|
||||
|
||||
@@ -480,6 +480,13 @@ async function tryShowReset(): Promise<void> {
|
||||
text: "请联系开发者获取",
|
||||
mode: "input",
|
||||
});
|
||||
if (res === false) {
|
||||
showSnackbar({
|
||||
color: "grey",
|
||||
text: "已取消",
|
||||
});
|
||||
return;
|
||||
}
|
||||
const time = getBuildTime();
|
||||
const code = time.startsWith("dev.") ? "dev" : time;
|
||||
if (res === code) {
|
||||
|
||||
Reference in New Issue
Block a user