zxlie 7 years ago
parent
commit
bbb80dde62
2 changed files with 6 additions and 7 deletions
  1. 0 0
      v2.0/apps/image-base64/index.html
  2. 6 7
      v2.0/apps/image-base64/index.js

File diff suppressed because it is too large
+ 0 - 0
v2.0/apps/image-base64/index.html


+ 6 - 7
v2.0/apps/image-base64/index.js

@@ -60,13 +60,12 @@ new Vue({
 
         _getDataUri: function (file) {
             let reader = new FileReader();
-            let that = this;
-            reader.onload = function (evt) {
-                that.resultContent = evt.target.result;
-                that.previewSrc = evt.target.result;
-                that.$refs.panelBox.style.backgroundImage = 'none';
-                that.sizeOri = that._sizeFormat(file.size);
-                that.sizeBase = that._sizeFormat(evt.target.result.length);
+            reader.onload = (evt) => {
+                this.resultContent = evt.target.result;
+                this.previewSrc = evt.target.result;
+                this.$refs.panelBox.style.backgroundImage = 'none';
+                this.sizeOri = this._sizeFormat(file.size);
+                this.sizeBase = this._sizeFormat(evt.target.result.length);
             };
             reader.readAsDataURL(file);
         },

Some files were not shown because too many files changed in this diff