forked from opentiny/tiny-vue
fix(file-upload): [file-upload] Fix the hidden feature bug in props.isHidden (#1614)
This commit is contained in:
parent
5b5ffcb8d2
commit
d4c2e6d1e5
|
@ -286,9 +286,4 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// tiny 新增
|
|
||||||
&.is-hidden {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,11 +87,10 @@ export default defineComponent({
|
||||||
const operateSlot = this.slots.operate && this.slots.operate()
|
const operateSlot = this.slots.operate && this.slots.operate()
|
||||||
const tipSlot = this.slots.tip && this.slots.tip()
|
const tipSlot = this.slots.tip && this.slots.tip()
|
||||||
|
|
||||||
const hidden = isHidden && fileList.length >= limit
|
const uploadStyle = isHidden && fileList.length >= limit ? { display: 'none' } : null
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div class={['tiny-upload', `tiny-upload--${listType}`, disabled ? 'is-disabled' : '']} style={uploadStyle}>
|
||||||
class={['tiny-upload', `tiny-upload--${listType}`, disabled ? 'is-disabled' : '', hidden ? 'is-hidden' : '']}>
|
|
||||||
<div
|
<div
|
||||||
class="tiny-upload-btn"
|
class="tiny-upload-btn"
|
||||||
onClick={($event) => handleClick($event, type)}
|
onClick={($event) => handleClick($event, type)}
|
||||||
|
|
Loading…
Reference in New Issue