Просмотр исходного кода

Merge branch 'dev' of http://192.168.0.115:3000/bill/traffic-laser into dev

jinx 2 лет назад
Родитель
Сommit
0bf7732c9f
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      src/views/photos/index.vue

+ 3 - 2
src/views/photos/index.vue

@@ -76,6 +76,7 @@ import { useConfirm } from "@/hook";
 import UiInput from "@/components/base/components/input/index.vue";
 import { api, downloadImage, uploadImage } from "@/store/sync";
 import { formatDate, getId, imageToBlob } from "@/utils";
+import { genUseLoading } from "@/hook";
 
 const sortPhotos = computed(() => [...photos.value].reverse());
 const active = ref<PhotoRaw>();
@@ -104,7 +105,7 @@ const menus = [
     key: "share",
     icon: "share",
     text: "分享",
-    onClick: async () => {
+    onClick: genUseLoading(async () => {
       // 如果没下载过相册则下载,通过文件名判断
       if (!active.value.url.includes("img_")) {
         const filename = `img_${formatDate(new Date(), "yyyyMMddhhmmss")}_${
@@ -119,7 +120,7 @@ const menus = [
       }
 
       api.shareImage(active.value.url);
-    },
+    }),
   },
 ];