Version
1.7.3
Environment
vue: 2.x, browser: chrome: 92.0.4515.159
Reproduction link
https://github.com/vueComponent/ant-design-vue/issues?q=onOk
Steps to reproduce
const _this = this
this.$confirm({
okButtonProps: {
props: {
loading: _this.confirmLoading
}
},
onOk() {
_this.confirmLoading = true
setTimeout(() => { _this.confirmLoading=false }, 3000)
}
})
What is expected?
点击Confirm框的确定按钮时,确定按钮的loading更新为true,然后3秒后更新为false
What is actually happening?
确定按钮的loading属性一直为false
我不清楚是我使用方式的问题,还是程序的问题,我想要在Modal.confirm中,在onOK回调函数里控制ok按钮的loading状态要怎么做呢?