|
@@ -25,7 +25,9 @@
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
import { onMounted, ref, getCurrentInstance } from 'vue'
|
|
|
+// #ifdef H5
|
|
|
import heic2any from 'heic2any'
|
|
|
+// #endif
|
|
|
|
|
|
const props = defineProps({
|
|
|
item: Object,
|
|
@@ -66,14 +68,12 @@ const preImg = (imgList: any[], index: number) => {
|
|
|
urls: arr
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+// #ifdef H5
|
|
|
const errorImage = async (item: any, index: number) => {
|
|
|
- // #ifdef H5
|
|
|
await handleImage(item, index)
|
|
|
-
|
|
|
- // #endif
|
|
|
}
|
|
|
const instance = getCurrentInstance()
|
|
|
-
|
|
|
const imgValue = ref('')
|
|
|
const handleImage = async (item: any, index: number) => {
|
|
|
let url = item.path
|
|
@@ -114,6 +114,7 @@ const isHeicFile = (file: any) => {
|
|
|
reader.readAsArrayBuffer(file)
|
|
|
})
|
|
|
}
|
|
|
+// #endif
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|