|
@ -2,6 +2,7 @@ |
|
|
import { getPhoto, savePhoto } from 'apis/home' |
|
|
import { getPhoto, savePhoto } from 'apis/home' |
|
|
import { getOreList } from 'apis/ore' |
|
|
import { getOreList } from 'apis/ore' |
|
|
import { FtMessage } from 'libs/message' |
|
|
import { FtMessage } from 'libs/message' |
|
|
|
|
|
import { ImageViewer as TImageViewer } from 'tdesign-mobile-vue' |
|
|
import { onMounted, ref } from 'vue' |
|
|
import { onMounted, ref } from 'vue' |
|
|
|
|
|
|
|
|
const props = defineProps({ |
|
|
const props = defineProps({ |
|
@ -71,6 +72,16 @@ const mousedownHandle = async (e: Event) => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const activeTube = ref(Array.from({ length: 16 }).fill(false)) |
|
|
const activeTube = ref(Array.from({ length: 16 }).fill(false)) |
|
|
|
|
|
|
|
|
|
|
|
const previewVisible = ref(false) |
|
|
|
|
|
const photos = ref<string[]>([]) |
|
|
|
|
|
const previewHandle = () => { |
|
|
|
|
|
if (!form.value.url) { |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
photos.value = [form.value.url] |
|
|
|
|
|
previewVisible.value = true |
|
|
|
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<template> |
|
|
<template> |
|
@ -83,11 +94,8 @@ const activeTube = ref(Array.from({ length: 16 }).fill(false)) |
|
|
</div> |
|
|
</div> |
|
|
<el-image |
|
|
<el-image |
|
|
:src="form.url" |
|
|
:src="form.url" |
|
|
:zoom-rate="1.2" |
|
|
|
|
|
:max-scale="7" |
|
|
|
|
|
:min-scale="0.2" |
|
|
|
|
|
:preview-src-list="[form.url]" |
|
|
|
|
|
fit="contain" |
|
|
fit="contain" |
|
|
|
|
|
@click="previewHandle" |
|
|
> |
|
|
> |
|
|
<template #error> |
|
|
<template #error> |
|
|
<div class="image-slot"> |
|
|
<div class="image-slot"> |
|
@ -110,6 +118,7 @@ const activeTube = ref(Array.from({ length: 16 }).fill(false)) |
|
|
</el-input> |
|
|
</el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
|
|
|
<TImageViewer v-model:images="photos" v-model:visible="previewVisible" /> |
|
|
</FtDialog> |
|
|
</FtDialog> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|