vue-upload-component 手机端无法多选

vue-upload-component 手机端无法多选

向大神们求救,为什么我手机端还是不能一次选择多个文件啊
<template>
<div class="file-upload-container">

<ul>

<li v-for="file in fileList" :key="file.id">

<span>{{file.name}}</span> -

<span>{{file.size}}</span> -

<span v-if="file.error">{{file.error}}</span>

<span v-else-if="file.success">success</span>

<span v-else-if="file.active">active</span>

<span v-else-if="!!file.error">{{file.error}}</span>

<span v-else></span>

</li>

</ul>

<file-upload-vue class="btn btn-primary"

:post-action="postAction"

extensions="gif,jpg,jpeg,png,webp"

accept="image/png,image/gif,image/jpeg,image/webp"

multiple

:thread="10"

v-model="fileList"

@input-filter="inputFilter"

@input-file="inputFile" ref="upload">

<i class="fa fa-plus"></i>

select files

</file-upload-vue>

<button type="button" class="btn btn-success" v-if="!upload || !upload.active" @click.prevent="upload.active = true">

<i class="fa fa-arrow-up" aria-hidden="true"></i>

Start Upload

</button>

<button type="button" class="btn btn-danger" v-else @click.prevent="upload.active = false">

<i class="fa fa-stop" aria-hidden="true"></i>

Stop Upload

</button>

</div>
</template>

<script>
import FileUploadVue from 'vue-upload-component'
export default {
name: 'fileUploadComponent',
components: {

FileUploadVue

},
data () {

return {

postAction: '',

fileList: [],

upload: {}

}

},
methods: {

inputFilter (newFile, oldFile, prevent) {

if (newFile && !oldFile) {

// 添加文件前

console.log(newFile)

}

},

inputFile (newFile, oldFile) {

if (newFile && !oldFile) {

// add

console.log('add', newFile)

}

if (newFile && oldFile) {

// update

console.log('update', newFile)

}

if (!newFile && oldFile) {

// remove

console.log('remove', oldFile)

}

}

}
}
</script>

<style scoped>

</style>

以上是 vue-upload-component 手机端无法多选 的全部内容, 来源链接: utcz.com/p/937295.html

回到顶部