bill 1 anno fa
parent
commit
e0a73e297e
2 ha cambiato i file con 6 aggiunte e 2 eliminazioni
  1. 2 1
      src/helper/message.ts
  2. 4 1
      src/view/case/draw/slider.vue

+ 2 - 1
src/helper/message.ts

@@ -2,9 +2,10 @@ import { InfoFilled, SuccessFilled } from "@element-plus/icons-vue";
 import { ElMessage, ElMessageBox } from "element-plus";
 import { markRaw } from "vue";
 
-export const confirm = (msg: string) =>
+export const confirm = (msg: string, okText = "确定") =>
   ElMessageBox.confirm(msg, "系统提示", {
     type: "warning",
+    confirmButtonText: okText,
     // icon: markRaw(InfoFilled),
   });
 export const alert = (msg: string) =>

+ 4 - 1
src/view/case/draw/slider.vue

@@ -112,7 +112,10 @@ const cover = reactive(
 );
 
 const coverUploadHandler = async () => {
-  if (props.existsBgImage && (await confirm("重新上传将替换当前图体,确定要上传吗?"))) {
+  if (
+    props.existsBgImage &&
+    (await confirm("重新上传将替换当前图体,确定要上传吗?", "继续上传"))
+  ) {
     // await cover.upload(file)
   }
   const input = document