emacroh5lib 1.0.33 → 1.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "emacroh5lib",
3
- "version": "1.0.33",
3
+ "version": "1.0.36",
4
4
  "description": "EMacro前端组件库",
5
5
  "main": "dist/emacroh5lib.min.js",
6
6
  "scripts": {
@@ -91,8 +91,8 @@
91
91
  },
92
92
  loadComplete: {
93
93
  type: Function,
94
- default: (on, event) => {
95
- console.log("loadComplete", on, event);
94
+ default: function () {
95
+ console.log("loadComplete");
96
96
  }
97
97
  }
98
98
  },
@@ -162,13 +162,11 @@
162
162
  };
163
163
 
164
164
  resolve(event);
165
- $this.loadComplete("onload", event)
166
165
  imageObject.onload = null
167
166
  };
168
167
 
169
168
  imageObject.onerror = function (event) {
170
169
  resolve(event);
171
- $this.loadComplete("onerror", event)
172
170
  imageObject.onerror = null
173
171
  };
174
172
 
@@ -186,8 +184,10 @@
186
184
  // })
187
185
 
188
186
  Promise.race(promises).then((data) => {
189
- this.image = this.$refs["duoViewerImage"];
190
- this.initDrag();
187
+ $this.image = $this.$refs["duoViewerImage"];
188
+ console.log("$this.image", $this.image);
189
+ $this.initDrag();
190
+ $this.loadComplete()
191
191
  const { width, height } = $this.listDataCache[index];
192
192
  $this.setStyleByName($this.image, "width", width);
193
193
  $this.setStyleByName($this.image, "height", height);