this.$alert
时间: 2023-09-02 09:12:35 浏览: 130
this.$alert是一个Vue.js框架中的方法,用于显示一个警告框。在引用[1]中的代码示例中,当点击确定按钮时,会触发一个回调函数,回调函数中使用了this.$router.go(0)来刷新当前页面。而在引用中的代码示例中,当点击确定按钮时,会触发一个回调函数,回调函数中使用了window.location.href来跳转到指定的页面。引用中的代码示例中,当登录成功后,会执行一个alert函数,显示错误信息。所以,this.$alert是用于显示警告框,并在确定按钮点击时执行相应的操作。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [【vue】this.$alert、this.$confirm的简单使用](https://blog.csdn.net/ChaoChao66666/article/details/131206870)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [踩坑分享( 8 )- Vue使用this.$alert()报错:Uncaught (in promise) TypeError: this.$alert is not a ...](https://blog.csdn.net/qq_61672548/article/details/125021697)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [解决vue.js this.$router.push无效的问题](https://download.csdn.net/download/weixin_38702339/13588275)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文