🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
## **全局提示组件** 框架内已经简易化一些常用的提示弹窗,可以全局调用而不需要每次都初始化一次组件,用法如下: ### loading example ```javascript this.$store.commit("SET_LOADING",true) ``` | 参数| 说明 | | --- | --- | | show | true为显示,false为隐藏 | <br> ### 吐司example ```javascript this.$store.commit("SET_TOAST",{ txt:"吐司提示示例", show:true, type:"warn" }) ``` | 参数| 说明 | | --- | --- | | txt | 吐司提示内容 | | show | 吐司显示/隐藏 | | type | 吐司提示显示icon,参考cube-ui toast | <br> ### 错误弹窗example ```javascript this.$store.commit("SET_ERR_DIALOG",{ txt:"弹窗提示内容", show:true, icon:"warn" }) ``` | 参数| 说明 | | --- | --- | | txt | 吐司提示内容 | | show | 吐司显示/隐藏 | | icon | 弹窗提示icon,参考cube-ui icons |