(二)notification提示信息

1:引用ant-design-vue/es/notification,前提是要先安装引用ant-design-vue
import notification from 'ant-design-vue/es/notification'
2:可以全局定义notification的属性
    notification.config({
    placement: 'bottomRight',
     bottom: 500,
     duration: 3,
     rtl: true,
    });
3:然后就可以用notification模块里面对应的方法提示了
 notification.error({
        message: 'Forbidden',
        description: data.message,
        placement:"topRight",//在右上角显示弹框
        style: {//自定义样式
          // width: '400px',
          //marginTop:'100px',
          //marginLeft:'-200px',
          width: '100%',
          marginTop:'50%',
          marginLeft:'-80%'
        },
       })
posted @ 2022-03-29 16:47  yingxianqi  阅读(559)  评论(0)    收藏  举报