简体   繁体   English

v-file-input 在我上传文件时显示 2 个名称

[英]v-file-input shows 2 name when I upload a file

I am using nuxt and recently I have found something.我正在使用 nuxt,最近我发现了一些东西。 Pattern now现在模式

Upper is the uploaded file name, and the below is the name of the target file.上为上传文件名,下为目标文件名。 I am gonna eliminate the below and replace it with the upper.我要把下面的去掉,用上面的代替。 Which means: Pattern expected这意味着:预期的模式

Actually what I really want here is how to change my filename in input tag when I uploaded it.实际上,我真正想要的是在上传文件时如何更改输入标签中的文件名。

Try this code below :试试下面的代码:

<v-file-input @change="submitFile" ref="file" v-model="file" ></v-file-input>

Just Remove your label , it will work according to what you want.只需删除您的标签,它将根据您的需要工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM