this.$confirm 确认按钮禁用
时间: 2023-08-25 18:10:11 浏览: 379
vue实现在一个方法执行完后执行另一个方法的示例
要禁用this.$confirm的确认按钮,你可以在options参数中设置confirmButton的disabled属性为true。具体代码如下:
```javascript
this.$confirm('进行企业实名认证后才可开通短信服务!', '提示', {
confirmButtonText: '前往认证',
type: 'warning',
center: true,
showCancelButton: false,
showClose: false,
closeOnClickModal: false,
confirmButton: {
disabled: true // 禁用确认按钮
}
})
```
这样设置后,确认按钮将会被禁用,用户将无法点击确认按钮。
#### 引用[.reference_title]
- *1* *2* [element中this.$confirm的用法,element-ui MessageBox 弹框怎么隐藏右上角的关闭按钮呢?element-ui ...](https://blog.csdn.net/migexiaoliang/article/details/124265227)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [$confirm then()中无法使用await](https://blog.csdn.net/hlox521/article/details/106075491)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文