把名称和后台来的json数据约定起来,可以达到的效果就是可以将东西统一化,减少差异,提升模块等的通用性,此后就可以实现具体不同模块内容可以自动或拷贝赋值的方式 2016.7.18 refactor string formatter code: String.prototype.format = function () { var that = this; var params = arguments; function applychange(arrayorobject) { for (var…
downLoadFile (url, name) { this.xhr = new XMLHttpRequest() this.xhr.open('GET', url, true) this.xhr.responseType = 'blob' var vmThis = this this.xhr.onload = () => { ) { ) { let file = this.xhr.response let fileName = name if ('msSaveOrOpenBlob' in n…