icssoa 7 місяців тому
батько
коміт
ce6faa84d4
1 змінених файлів з 3 додано та 2 видалено
  1. 3 2
      uni_modules/cool-ui/hooks/ui.ts

+ 3 - 2
uni_modules/cool-ui/hooks/ui.ts

@@ -1,5 +1,6 @@
 import { router } from "@/cool";
 import type { ClConfirmAction, ClConfirmOptions, ClToastOptions } from "../types";
+import { t } from "@/locale";
 
 /**
  * UiInstance 类型定义
@@ -85,9 +86,9 @@ class Ui {
 	 * @param title 提示内容
 	 * @param mask 是否显示蒙层
 	 */
-	showLoading(title: string, mask: boolean | null = null): void {
+	showLoading(title: string | null = null, mask: boolean | null = null): void {
 		uni.showLoading({
-			title,
+			title: title ?? t("加载中"),
 			mask: mask ?? true
 		});
 	}