@taole/dev-helper 0.1.27 → 0.1.28
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/dist/open-diandian.umd.js +16 -1
- package/open-diandian/index.js +16 -1
- package/package.json +1 -1
|
@@ -362,7 +362,22 @@
|
|
|
362
362
|
});
|
|
363
363
|
}
|
|
364
364
|
_wakeupOpenInstall() {
|
|
365
|
-
if (this._openInstall)
|
|
365
|
+
if (!this._openInstall) return;
|
|
366
|
+
const extinfo = this.getAttribute('extinfo');
|
|
367
|
+
let data;
|
|
368
|
+
if (extinfo) {
|
|
369
|
+
try {
|
|
370
|
+
const info = JSON.parse(extinfo);
|
|
371
|
+
if (info && typeof info === 'object' && !Array.isArray(info)) {
|
|
372
|
+
data = { ...resolveOpenInstallData(), ...info };
|
|
373
|
+
}
|
|
374
|
+
} catch (error) {
|
|
375
|
+
this._log('invalid OpenInstall extinfo', error);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
if (data) {
|
|
379
|
+
this._openInstall.wakeupOrInstall({ data });
|
|
380
|
+
} else {
|
|
366
381
|
this._openInstall.wakeupOrInstall();
|
|
367
382
|
}
|
|
368
383
|
}
|
package/open-diandian/index.js
CHANGED
|
@@ -357,7 +357,22 @@ function createOpenDiandianElementClass() {
|
|
|
357
357
|
});
|
|
358
358
|
}
|
|
359
359
|
_wakeupOpenInstall() {
|
|
360
|
-
if (this._openInstall)
|
|
360
|
+
if (!this._openInstall) return;
|
|
361
|
+
const extinfo = this.getAttribute('extinfo');
|
|
362
|
+
let data;
|
|
363
|
+
if (extinfo) {
|
|
364
|
+
try {
|
|
365
|
+
const info = JSON.parse(extinfo);
|
|
366
|
+
if (info && typeof info === 'object' && !Array.isArray(info)) {
|
|
367
|
+
data = { ...resolveOpenInstallData(), ...info };
|
|
368
|
+
}
|
|
369
|
+
} catch (error) {
|
|
370
|
+
this._log('invalid OpenInstall extinfo', error);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
if (data) {
|
|
374
|
+
this._openInstall.wakeupOrInstall({ data });
|
|
375
|
+
} else {
|
|
361
376
|
this._openInstall.wakeupOrInstall();
|
|
362
377
|
}
|
|
363
378
|
}
|