fix: 修复创建云服务账号json格式文件判断

This commit is contained in:
Michael Bai
2021-10-28 13:05:44 +08:00
committed by Jiangjie.Bai
parent 1cd8de8cbc
commit 44edc1e712

View File

@@ -26,6 +26,10 @@ export default {
if (e.target.files.length === 0) { if (e.target.files.length === 0) {
return return
} }
const file_name = e.target.files[0].name
if (file_name.substr(-5) !== '.json') {
return
}
const vm = this const vm = this
const reader = new FileReader() const reader = new FileReader()
reader.onload = function() { reader.onload = function() {