mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-21 01:02:59 +08:00
fix(components): [upload] onPreview
not work when picture
list type (#9448)
This commit is contained in:
parent
ec311634f9
commit
eed57636e0
@ -33,15 +33,12 @@
|
||||
alt=""
|
||||
/>
|
||||
<div
|
||||
v-if="
|
||||
listType !== 'picture' &&
|
||||
(file.status === 'uploading' || listType !== 'picture-card')
|
||||
"
|
||||
v-if="file.status === 'uploading' || listType !== 'picture-card'"
|
||||
:class="nsUpload.be('list', 'item-info')"
|
||||
>
|
||||
<a
|
||||
:class="nsUpload.be('list', 'item-name')"
|
||||
@click.prevent="handleClick(file)"
|
||||
@click.prevent="handlePreview(file)"
|
||||
>
|
||||
<el-icon :class="nsIcon.m('document')"><Document /></el-icon>
|
||||
<span :class="nsUpload.be('list', 'item-file-name')">
|
||||
@ -128,7 +125,7 @@ defineOptions({
|
||||
name: 'ElUploadList',
|
||||
})
|
||||
|
||||
const props = defineProps(uploadListProps)
|
||||
defineProps(uploadListProps)
|
||||
const emit = defineEmits(uploadListEmits)
|
||||
|
||||
const { t } = useLocale()
|
||||
@ -138,10 +135,6 @@ const nsList = useNamespace('list')
|
||||
|
||||
const focusing = ref(false)
|
||||
|
||||
const handleClick = (file: UploadFile) => {
|
||||
props.handlePreview(file)
|
||||
}
|
||||
|
||||
const handleRemove = (file: UploadFile) => {
|
||||
emit('remove', file)
|
||||
}
|
||||
|
@ -440,6 +440,8 @@
|
||||
box-sizing: border-box;
|
||||
margin-top: 10px;
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.#{bem('icon', '' ,'check')},
|
||||
.#{bem('icon', '' ,'circle-check')} {
|
||||
|
Loading…
Reference in New Issue
Block a user