dhjy123
    getActionData (file) {
      const __this = this
      var reader = new FileReader()// 新建一个FileReader
      reader.readAsText(file, \'UTF-8\')// 读取文件
      reader.onload = function (evt) { // 读取完文件之后会回来这里
        var fileString = evt.target.result // 读取文件内容
        const jsonObj = JSON.parse(fileString)
        __this.actData[file.uid] = jsonObj.animations
        console.log(\'fileString..\', jsonObj, jsonObj.animations, Object.keys(jsonObj.animations))
      }
    },

 

分类:

技术点:

相关文章: