|
@@ -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);
|
|
|
- },
|
|
|
+ }),
|
|
|
},
|
|
|
];
|
|
|
|