dowFile (item) {
const data = { translate: json[item] }
let blob = new Blob([JSON.stringify(data)], { type: 'text/plain' });
let file = new File([blob], `${item}.json`, { type: 'text/plain' });
let a = document.createElement('a');
let downUrl = window.URL.createObjectURL(file);
let filename = `${item}.json`;
a.href = downUrl;
a.download = filename;
a.click();
console.log(Object.keys(json).length)
delete json[item]
setTimeout(() => {
if (Object.keys(json).length > 0) {
this.dowFile(Object.keys(json)[0])
}
}, 200)
},
this.dowFile('vzh_rCN')//vzh_rCN是json里第一个语言的属性名,表示从第一个语言开始