let _this = this
let file = _this.$refs.vExampleFile.files[0]
console.log(file);
let fileName = file.name
var index = fileName.lastIndexOf('.');
console.log(fileName.substring(index));
let _this = this
let file = _this.$refs.vExampleFile.files[0]
console.log(file);
let fileName = file.name
var index = fileName.lastIndexOf('.');
console.log(fileName.substring(index));
本文标题:input上传文件获取后缀(扩展名)
本文链接:https://www.haomeiwen.com/subject/ksexnktx.html
网友评论