code refactor

This commit is contained in:
MaysWind
2025-01-15 23:15:42 +08:00
parent dc4310c301
commit 922c338387
11 changed files with 65 additions and 64 deletions
+4 -4
View File
@@ -57,15 +57,15 @@ function open(titleOrText: string, textOrOptions?: string | Record<string, unkno
} else if (isString(textOrOptions)) { // second parameter is text
if (!options) {
titleContent.value = tt(titleOrText);
textContent.value = tt(textOrOptions as string);
textContent.value = tt(textOrOptions);
} else {
titleContent.value = tt(titleOrText, options);
textContent.value = tt(textOrOptions as string, options);
textContent.value = tt(textOrOptions, options);
}
}
if (options && isString(options.color)) {
finalColor.value = (options.color as string) || 'primary';
if (options && isString(options['color'])) {
finalColor.value = (options['color'] as string) || 'primary';
}
return new Promise((resolve, reject) => {