封装 element-ui 右下角弹窗
        
 alertMessage(text, cla) {
  let arr = {
    'success': '成功',
    'error': '失败'
  };
  let texts = arr[cla];
  this.$notify({
    title: texts,
    message: text,
    type: cla,
    positon: 'bottom-right',
    duration: 2500
  })
}
// 使用
this.alertMessage('请求成功!', 'error')
 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
在线编辑  (opens new window)
  上次更新: 2021/11/14, 07:48:46