@taole/dev-helper 0.1.11 → 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.
@@ -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;
@@ -160,6 +165,14 @@
160
165
  }, 5000);
161
166
  }
162
167
  });
168
+ this._openAppTag.addEventListener('launch', (e) => {
169
+ this._log('open-diandian: wx-open-launch-app launch', e);
170
+ this.dispatchEvent(new CustomEvent('launch', {
171
+ detail: e.detail, // 如需透传微信事件数据
172
+ bubbles: true,
173
+ composed: true,
174
+ }));
175
+ });
163
176
  } else {
164
177
  this._updateTagAttr();
165
178
  }
@@ -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;
@@ -155,6 +160,14 @@ function defineTag() {
155
160
  }, 5000);
156
161
  }
157
162
  });
163
+ this._openAppTag.addEventListener('launch', (e) => {
164
+ this._log('open-diandian: wx-open-launch-app launch', e);
165
+ this.dispatchEvent(new CustomEvent('launch', {
166
+ detail: e.detail, // 如需透传微信事件数据
167
+ bubbles: true,
168
+ composed: true,
169
+ }));
170
+ });
158
171
  } else {
159
172
  this._updateTagAttr();
160
173
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taole/dev-helper",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "npx -y rimraf dist && rollup -c",