- html部分代码
<v-form
ref="uploadFileForm"
v-model="uploadFormValid">
<v-file-input
v-model="fileInfo"
required
:rules="[v => !!v || '文件必选']"
show-size accept=".xls,.xlsx"
@change="uploadFile"
:disabled="loading.uploadIsLoading"
:loading="loading.uploadIsLoading"
label="点击选择文件,文件格后缀为:.xls、.xlsx"></v-file-input>