Skip to content

Commit 7bb81e9

Browse files
committed
fix(dialog): 修复关闭dialog后还可以点击里面按钮
1 parent 85b37de commit 7bb81e9

File tree

5 files changed

+3
-71
lines changed

5 files changed

+3
-71
lines changed

src/dialog/__test__/__snapshots__/index.test.js.snap

Lines changed: 0 additions & 58 deletions
This file was deleted.

src/dialog/dialog.wxml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030
<view wx:if="{{content}}" class="{{classPrefix}}__body">
3131
<text class="{{classPrefix}}__body-text">{{content}}</text>
3232
</view>
33-
<slot name="content" />
33+
<view capture-catch:touchstart="{{visible ? null : true}}">
34+
<slot name="content" />
35+
</view>
3436
</view>
3537
<slot name="middle" />
3638
<view

src/mixins/transition.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ export default function transition() {
2626
transitionDurations: 300,
2727
className: '',
2828
realVisible: false,
29-
maskZindex: -1,
3029
},
3130

3231
created() {
@@ -88,7 +87,6 @@ export default function transition() {
8887
this.status = 'leaving';
8988
this.setData({
9089
transitionClass: `${prefix}-${name}-leave ${prefix}-${name}-leave-active`,
91-
maskZindex: 99999,
9290
});
9391
clearTimeout(this.transitionT);
9492
setTimeout(() => {
@@ -122,7 +120,6 @@ export default function transition() {
122120
this.leaved();
123121
this.setData({
124122
realVisible: false,
125-
maskZindex: -1,
126123
});
127124
}
128125
},

src/popup/popup.less

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,6 @@
3030
color: @popup-close-btn-color;
3131
}
3232

33-
&__mask {
34-
position: absolute;
35-
top: 0;
36-
left: 0;
37-
bottom: 0;
38-
right: 0;
39-
background-color: transparent;
40-
}
4133
&--top {
4234
top: 0;
4335
left: 0;

src/popup/popup.wxml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
<slot name="close-btn" class="{{classPrefix}}-slot" />
2121
</view>
2222
</view>
23-
<view class="{{classPrefix}}__mask" style="z-index:{{maskZindex}};"></view>
2423
</view>
2524

2625
<t-overlay

0 commit comments

Comments
 (0)