element ui的无法关掉的提示弹框

使用element的$alert组件的属性把X去掉和确定按钮和取消按钮去掉;

import { MessageBox  } from 'element-ui';
MessageBox.alert('AI功能已到期或暂未开启', '友情提示', {
    showClose: false,
    showCancelButton: false,
    showConfirmButton: false
});

如果在router的路由守卫里使用的话,要加一个定时器,等页面渲染完成之后再调取;

import { MessageBox  } from 'element-ui';
router.afterEach((to, from) => {
  setTimeout(()=> {
    MessageBox.alert('AI功能已到期或暂未开启', '友情提示', {
      showClose: false,
      showCancelButton: false,
      showConfirmButton: false
    });
  }, 500);
});

 

相关推荐

  1. vue elementUI message提示封装

    2024-05-13 18:06:05       58 阅读
  2. uniapp各种常用提示

    2024-05-13 18:06:05       33 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-05-13 18:06:05       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-05-13 18:06:05       106 阅读
  3. 在Django里面运行非项目文件

    2024-05-13 18:06:05       87 阅读
  4. Python语言-面向对象

    2024-05-13 18:06:05       96 阅读

热门阅读

  1. 神经网络有哪些算法

    2024-05-13 18:06:05       29 阅读
  2. 安卓CoordinatorLayout研究

    2024-05-13 18:06:05       33 阅读
  3. 支付分账能实现哪些功能?

    2024-05-13 18:06:05       33 阅读
  4. RoundTrip测试RTT时延

    2024-05-13 18:06:05       31 阅读