fix(file-upload): [file-upload] Fix the hidden feature bug in props.isHidden (#1614)

This commit is contained in:
chenxi-20 2024-05-09 17:32:04 +08:00 committed by GitHub
parent 5b5ffcb8d2
commit d4c2e6d1e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 8 deletions

View File

@ -286,9 +286,4 @@
position: relative;
z-index: 1;
}
// tiny 新增
&.is-hidden {
display: none;
}
}

View File

@ -87,11 +87,10 @@ export default defineComponent({
const operateSlot = this.slots.operate && this.slots.operate()
const tipSlot = this.slots.tip && this.slots.tip()
const hidden = isHidden && fileList.length >= limit
const uploadStyle = isHidden && fileList.length >= limit ? { display: 'none' } : null
return (
<div
class={['tiny-upload', `tiny-upload--${listType}`, disabled ? 'is-disabled' : '', hidden ? 'is-hidden' : '']}>
<div class={['tiny-upload', `tiny-upload--${listType}`, disabled ? 'is-disabled' : '']} style={uploadStyle}>
<div
class="tiny-upload-btn"
onClick={($event) => handleClick($event, type)}