✏️ 修正 Input Res

This commit is contained in:
BTMuli
2023-10-26 13:23:54 +08:00
parent 84b98e4ade
commit f84c4b93ea
2 changed files with 9 additions and 2 deletions

View File

@@ -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) {

View File

@@ -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) {