@taole/dev-helper 0.1.12 → 0.1.13
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.
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
this._clipboardTextTimer = null;
|
|
83
83
|
}
|
|
84
84
|
_log(...args) {
|
|
85
|
-
if (this._debug
|
|
85
|
+
if (this._debug) {
|
|
86
86
|
console.log('open-diandian:[' + this._id + ']', ...args);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
@@ -121,6 +121,11 @@
|
|
|
121
121
|
this._log('open-diandian: wx-open-launch-app appended');
|
|
122
122
|
// 监听打开app失败的情况,跳转fallback链接
|
|
123
123
|
this._openAppTag.addEventListener('error', (e) => {
|
|
124
|
+
this.dispatchEvent(new CustomEvent('error', {
|
|
125
|
+
detail: e.detail, // 如需透传微信事件数据
|
|
126
|
+
bubbles: true,
|
|
127
|
+
composed: true,
|
|
128
|
+
}));
|
|
124
129
|
if (this._isHarmony || this.getAttribute('scene') === 'link') {
|
|
125
130
|
this._showOpenInBrowserHint();
|
|
126
131
|
return;
|
package/open-diandian/index.js
CHANGED
|
@@ -77,7 +77,7 @@ function defineTag() {
|
|
|
77
77
|
this._clipboardTextTimer = null;
|
|
78
78
|
}
|
|
79
79
|
_log(...args) {
|
|
80
|
-
if (this._debug
|
|
80
|
+
if (this._debug) {
|
|
81
81
|
console.log('open-diandian:[' + this._id + ']', ...args);
|
|
82
82
|
}
|
|
83
83
|
}
|
|
@@ -116,6 +116,11 @@ function defineTag() {
|
|
|
116
116
|
this._log('open-diandian: wx-open-launch-app appended');
|
|
117
117
|
// 监听打开app失败的情况,跳转fallback链接
|
|
118
118
|
this._openAppTag.addEventListener('error', (e) => {
|
|
119
|
+
this.dispatchEvent(new CustomEvent('error', {
|
|
120
|
+
detail: e.detail, // 如需透传微信事件数据
|
|
121
|
+
bubbles: true,
|
|
122
|
+
composed: true,
|
|
123
|
+
}));
|
|
119
124
|
if (this._isHarmony || this.getAttribute('scene') === 'link') {
|
|
120
125
|
this._showOpenInBrowserHint();
|
|
121
126
|
return;
|