emacroh5lib 1.0.11 → 1.0.12

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.11",
3
+ "version": "1.0.12",
4
4
  "description": "EMacro前端组件库",
5
5
  "main": "dist/emacroh5lib.min.js",
6
6
  "scripts": {
@@ -210,10 +210,12 @@ export default {
210
210
 
211
211
  if (this.name.trim() !== '' && this.isStorage) {
212
212
  let info = JSON.parse(localStorage.getItem("DragResizeView_Info_" + this.name))
213
- this.x = info.left
214
- this.y = info.top
215
- this.w = info.width
216
- this.h = info.height
213
+ if (info !== null) {
214
+ this.x = info.left
215
+ this.y = info.top
216
+ this.w = info.width
217
+ this.h = info.height
218
+ }
217
219
  }
218
220
 
219
221
  this.left = this.x;
@@ -709,7 +711,7 @@ export default {
709
711
  throw "unspecified name"
710
712
  }
711
713
 
712
- localStorage.setItem("DragResizeView_Info_" + this.name, JSON.stringify(this.rect))
714
+ localStorage.setItem("DragResizeView_Info_" + this.name, JSON.stringify(this.rect))
713
715
  }
714
716
 
715
717
  },