el-upload上传列表实现 展开 收起
时间:2022-04-11 14:45
# el-upload上传列表实现 展开 收起 |
---|
#### 无图言*,所以先上最终效果图(想参考代码的可以直接滑到最后) |
``` |
这个按钮的整体思路是,只有上传图片大于1张才显示; 默认显示当前上传的文件数量-1;每当点击之后,切换状态. |
<div v-show="item.accessory.length > 1" class="more" @click="more(item)"> |
{{ item.textFlg ? ‘收起‘ : +${item.accessory.length - 1} }} |
``` |
样式: |
```css |
.more { |
margin: 0 0 0 110px; |
cursor: pointer; |
width: 45px; |
height: 20px; |
background: #ebeef5; |
text-align: center; |
border-radius: 5px; |
position: absolute; |
bottom: 12px; |
right: 5px; |
} |
``` |
如果能帮到你,是我最大的荣幸! |