更改下载图片名字

This commit is contained in:
李志鹏
2025-10-30 17:12:52 +08:00
parent 16b7b56932
commit a1a56050ce
3 changed files with 7 additions and 15 deletions

View File

@@ -4,15 +4,12 @@
import { DownloadImages } from '@/utils/tools'
const router = useRouter()
const query = computed(() => router.currentRoute.value.query)
const styleUrl = computed(() => query.value.styleUrl)
const styleUrl = computed(() => query.value.styleUrl as string)
onMounted(() => {})
const loading = ref(false)
const onDownload = () => {
DownloadImages([{
url: styleUrl.value,
name: 'lane-crawford.png'
}])
DownloadImages([{ url: styleUrl.value }])
}
const onEdit = () => {
console.log('edit')

View File

@@ -13,7 +13,7 @@
const router = useRouter()
const emit = defineEmits(['view-type'])
const query = computed(() => router.currentRoute.value.query)
const visitRecordId = computed(() => query.value.visitRecordId)
const visitRecordId = computed(() => query.value.visitRecordId)// 访问记录ID
import { useGenerateStore } from '@/stores'
const generateStore = useGenerateStore()
@@ -85,11 +85,7 @@
if (v.loading) return
v.loading = true
v.selected = false
const obj = {
url: v.tryOnUrl,
name: v.tryOnUrl.split('/').pop()
}
DownloadImages([obj], null, null, () => {
DownloadImages([{ url: v.tryOnUrl }], null, null, () => {
v.loading = false
v.downloaded = true
})
@@ -114,8 +110,7 @@
v.loading = true
downloadList.push({
index: i,
url: v.tryOnUrl,
name: v.tryOnUrl.split('/').pop()
url: v.tryOnUrl
})
}
})