@taole/dev-helper 0.1.26 → 0.1.27-beta
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 +10 -9
- package/open-diandian/index.js +10 -9
- package/package.json +1 -1
|
@@ -277,12 +277,17 @@
|
|
|
277
277
|
_handleAlinkClick(event) {
|
|
278
278
|
this._writeClickboard();
|
|
279
279
|
this._cancelLaunchFallback();
|
|
280
|
-
if (this.
|
|
281
|
-
|
|
282
|
-
if (this.
|
|
283
|
-
|
|
284
|
-
this.
|
|
280
|
+
if (this._useOpenInstall()) {
|
|
281
|
+
event.preventDefault();
|
|
282
|
+
if (this._alink_link !== this._alink_fallback) {
|
|
283
|
+
// 默认的 a 标签跳转发生在事件处理完成之后,先主动执行拉端。
|
|
284
|
+
this._openFallbackLink(this._alink.href);
|
|
285
285
|
}
|
|
286
|
+
// 在同一次点击中调用,尽可能保留 SDK 写剪贴板所需的用户激活状态。
|
|
287
|
+
this._wakeupOpenInstall();
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
if (this._alink_link === this._alink_fallback) {
|
|
286
291
|
return;
|
|
287
292
|
}
|
|
288
293
|
// 先使用原链接拉端,页面没有隐藏才执行兜底。
|
|
@@ -300,10 +305,6 @@
|
|
|
300
305
|
this._clickLink = false;
|
|
301
306
|
}
|
|
302
307
|
_openFallbackLink(href) {
|
|
303
|
-
if (this._useOpenInstall()) {
|
|
304
|
-
this._wakeupOpenInstall();
|
|
305
|
-
return;
|
|
306
|
-
}
|
|
307
308
|
const link = document.createElement('a');
|
|
308
309
|
link.href = href;
|
|
309
310
|
link.click();
|
package/open-diandian/index.js
CHANGED
|
@@ -272,12 +272,17 @@ function createOpenDiandianElementClass() {
|
|
|
272
272
|
_handleAlinkClick(event) {
|
|
273
273
|
this._writeClickboard();
|
|
274
274
|
this._cancelLaunchFallback();
|
|
275
|
-
if (this.
|
|
276
|
-
|
|
277
|
-
if (this.
|
|
278
|
-
|
|
279
|
-
this.
|
|
275
|
+
if (this._useOpenInstall()) {
|
|
276
|
+
event.preventDefault();
|
|
277
|
+
if (this._alink_link !== this._alink_fallback) {
|
|
278
|
+
// 默认的 a 标签跳转发生在事件处理完成之后,先主动执行拉端。
|
|
279
|
+
this._openFallbackLink(this._alink.href);
|
|
280
280
|
}
|
|
281
|
+
// 在同一次点击中调用,尽可能保留 SDK 写剪贴板所需的用户激活状态。
|
|
282
|
+
this._wakeupOpenInstall();
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
if (this._alink_link === this._alink_fallback) {
|
|
281
286
|
return;
|
|
282
287
|
}
|
|
283
288
|
// 先使用原链接拉端,页面没有隐藏才执行兜底。
|
|
@@ -295,10 +300,6 @@ function createOpenDiandianElementClass() {
|
|
|
295
300
|
this._clickLink = false;
|
|
296
301
|
}
|
|
297
302
|
_openFallbackLink(href) {
|
|
298
|
-
if (this._useOpenInstall()) {
|
|
299
|
-
this._wakeupOpenInstall();
|
|
300
|
-
return;
|
|
301
|
-
}
|
|
302
303
|
const link = document.createElement('a');
|
|
303
304
|
link.href = href;
|
|
304
305
|
link.click();
|