Skip to content

Commit c6baf45

Browse files
author
xuqingkai
committed
fix: 🐛 修复ActionSheet禁用和加载状态时仍有点击效果的问题
Closes: #379
1 parent 0c38e98 commit c6baf45

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/uni_modules/wot-design-uni/components/wd-action-sheet/index.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
}
4343
}
4444

45-
:deep(.wd-action-sheet__popup){
45+
:deep(.wd-action-sheet__popup) {
4646
border-radius: $-action-sheet-radius $-action-sheet-radius 0 0;
4747
}
4848

@@ -78,12 +78,13 @@
7878
display: none;
7979
}
8080

81-
&:active {
81+
&:not(&--disabled):not(&--loading):active {
8282
background: $-action-sheet-active-color;
8383
}
8484

8585
@include m(disabled) {
8686
color: $-action-sheet-disabled-color;
87+
cursor: not-allowed;
8788
}
8889

8990
@include m(loading) {

src/uni_modules/wot-design-uni/components/wd-action-sheet/wd-action-sheet.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ function computedValue() {
101101
102102
function select(rowIndex: number, type: 'action' | 'panels', colIndex?: number) {
103103
if (type === 'action') {
104+
if (props.actions[rowIndex].disabled || props.actions[rowIndex].loading) {
105+
return
106+
}
104107
emit('select', {
105108
item: props.actions[rowIndex],
106109
index: rowIndex

0 commit comments

Comments
 (0)