@tarojs/taro-h5 3.5.8 → 3.5.9
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/index.esm.js
CHANGED
|
@@ -3736,8 +3736,8 @@ class ActionSheet {
|
|
|
3736
3736
|
this.el.style.opacity = '0';
|
|
3737
3737
|
this.el.style.transition = 'opacity 0.2s linear';
|
|
3738
3738
|
// mask
|
|
3739
|
-
|
|
3740
|
-
mask.setAttribute('style', inlineStyle(maskStyle));
|
|
3739
|
+
this.mask = document.createElement('div');
|
|
3740
|
+
this.mask.setAttribute('style', inlineStyle(maskStyle));
|
|
3741
3741
|
// actionSheet
|
|
3742
3742
|
this.actionSheet = document.createElement('div');
|
|
3743
3743
|
this.actionSheet.setAttribute('style', inlineStyle(actionSheetStyle));
|
|
@@ -3767,14 +3767,14 @@ class ActionSheet {
|
|
|
3767
3767
|
this.cells.forEach(item => this.menu.appendChild(item));
|
|
3768
3768
|
this.actionSheet.appendChild(this.menu);
|
|
3769
3769
|
this.actionSheet.appendChild(this.cancel);
|
|
3770
|
-
this.el.appendChild(mask);
|
|
3770
|
+
this.el.appendChild(this.mask);
|
|
3771
3771
|
this.el.appendChild(this.actionSheet);
|
|
3772
3772
|
// callbacks
|
|
3773
3773
|
const cb = () => {
|
|
3774
3774
|
this.hide();
|
|
3775
3775
|
resolve('cancel');
|
|
3776
3776
|
};
|
|
3777
|
-
mask.onclick = cb;
|
|
3777
|
+
this.mask.onclick = cb;
|
|
3778
3778
|
this.cancel.onclick = cb;
|
|
3779
3779
|
// show immediately
|
|
3780
3780
|
document.body.appendChild(this.el);
|
|
@@ -3828,6 +3828,13 @@ class ActionSheet {
|
|
|
3828
3828
|
}
|
|
3829
3829
|
this.cells.splice(itemListLen);
|
|
3830
3830
|
}
|
|
3831
|
+
// callbacks
|
|
3832
|
+
const cb = () => {
|
|
3833
|
+
this.hide();
|
|
3834
|
+
resolve('cancel');
|
|
3835
|
+
};
|
|
3836
|
+
this.mask.onclick = cb;
|
|
3837
|
+
this.cancel.onclick = cb;
|
|
3831
3838
|
// show
|
|
3832
3839
|
this.el.style.display = 'block';
|
|
3833
3840
|
setTimeout(() => {
|