This commit is contained in:
ln1778 2024-09-23 17:39:34 +08:00
parent e742aeae7b
commit 272814b9b4
1 changed files with 3 additions and 0 deletions

View File

@ -75,6 +75,7 @@
> >
<label for="uploadinput" class="uploadlabel" @click="onInputClick"> <label for="uploadinput" class="uploadlabel" @click="onInputClick">
<slot> <slot>
{{ imageList.length }} {{ limit }}
<i <i
class="el-icon-plus" class="el-icon-plus"
:style="{ fontSize: $attrs.width ? $attrs.width / 4 + 'px' : '25px' }" :style="{ fontSize: $attrs.width ? $attrs.width / 4 + 'px' : '25px' }"
@ -321,6 +322,8 @@ export default {
let that = this; let that = this;
try { try {
let uplist = []; let uplist = [];
console.log(this.limit, " this.limit", this.limit - this.imageList.length);
let files = [...e.target.files].slice(0, this.limit - this.imageList.length); let files = [...e.target.files].slice(0, this.limit - this.imageList.length);
const find = files.find((f, i) => { const find = files.find((f, i) => {
if (this.$attrs.accept) { if (this.$attrs.accept) {