Commit e1a430eb authored by nick zheng's avatar nick zheng

fix: 无法预览图片

parent c283d2a1
......@@ -35,6 +35,7 @@ const fileList = ref<UploadFileInfo[]>([])
const previewImageUrl = ref('')
const uploadPhotoRef = ref()
const imageRef = ref()
const showImage = false
watch(
() => props.fileArr,
......@@ -116,4 +117,13 @@ function handleRemove(options: { file: UploadFileInfo; fileList: UploadFileInfo[
@remove="handleRemove"
>
</NUpload>
<NImage
v-show="showImage"
ref="imageRef"
width="100"
:src="previewImageUrl"
:show-toolbar="false"
:preview-src="previewImageUrl"
/>
</template>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment