Skip to content

Commit

Permalink
fix: popover外部控制状态时的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
rayhomie committed May 11, 2024
1 parent 48c4a11 commit 1c0b7ba
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion compiled/alipay/src/Popover/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ Component(
return;
}
const value = !this.getValue();
this.update(value);
if (!this.isControlled()) {
this.update(value);
}
triggerEvent(this, 'visibleChange', value, e);
},
},
Expand Down
4 changes: 3 additions & 1 deletion compiled/wechat/src/Popover/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ Component(PopoverDefaultProps, {
},
onVisibleChange: function (e) {
var value = !this.getValue();
this.update(value);
if (!this.isControlled()) {
this.update(value);
}
triggerEvent(this, 'visibleChange', value, e);
},
}, {
Expand Down
4 changes: 3 additions & 1 deletion src/Popover/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ Component(
}
/// #endif
const value = !this.getValue();
this.update(value);
if (!this.isControlled()) {
this.update(value);
}
triggerEvent(this, 'visibleChange', value, e);
},
},
Expand Down

0 comments on commit 1c0b7ba

Please sign in to comment.