How to use the ant-design-vue.notification.error function in ant-design-vue

To help you get started, we’ve selected a few ant-design-vue examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zhangdaiscott / jeecg-boot / ant-design-vue-jeecg / src / utils / request.js View on Github external
Vue.ls.remove(ACCESS_TOKEN)
                window.location.reload()
              })
            }
          })
          // update-end- --- author:scott ------ date:20190225 ---- for:Token失效采用弹框模式,不直接跳转----
        }
        break
      case 404:
          notification.error({ message: '系统提示', description:'很抱歉,资源未找到!',duration: 4})
        break
      case 504:
        notification.error({ message: '系统提示', description: '网络超时'})
        break
      case 401:
        notification.error({ message: '系统提示', description:'未授权,请重新登录',duration: 4})
        if (token) {
          store.dispatch('Logout').then(() => {
            setTimeout(() => {
              window.location.reload()
            }, 1500)
          })
        }
        break
      default:
        notification.error({
          message: '系统提示',
          description: data.message,
          duration: 4
        })
        break
    }
github zhangdaiscott / jeecg-boot / ant-design-vue-jeecg / src / utils / request.js View on Github external
mask: false,
            onOk: () => {
              store.dispatch('Logout').then(() => {
                Vue.ls.remove(ACCESS_TOKEN)
                window.location.reload()
              })
            }
          })
          // update-end- --- author:scott ------ date:20190225 ---- for:Token失效采用弹框模式,不直接跳转----
        }
        break
      case 404:
          notification.error({ message: '系统提示', description:'很抱歉,资源未找到!',duration: 4})
        break
      case 504:
        notification.error({ message: '系统提示', description: '网络超时'})
        break
      case 401:
        notification.error({ message: '系统提示', description:'未授权,请重新登录',duration: 4})
        if (token) {
          store.dispatch('Logout').then(() => {
            setTimeout(() => {
              window.location.reload()
            }, 1500)
          })
        }
        break
      default:
        notification.error({
          message: '系统提示',
          description: data.message,
          duration: 4
github pycook / cmdb / cmdb-ui / src / views / cmdb / ci / modules / CiDetail.vue View on Github external
.catch(e => {
          console.log(e)
          notification.error({
            message: e.response.data.message
          })
        })
    }
github pycook / cmdb / ui / src / views / cmdb / modeling / preference_relation / index.vue View on Github external
}).catch(e => {
            notification.error({ message: e.reponse.data.message })
          })
        }
github dotnetcore / WTM / demo / WalkingTec.Mvvm.Next / ClientApp / packages / www-vue / src / global.config.ts View on Github external
Request.Error = (error) => {
    if (error.status === 400 || lodash.get(error, 'request.url', '').indexOf('CheckLogin')) {
        return
    }
    notification.error({
        key: 'RequestError' + error.status,
        description: error.name,
        message: error.message
    })
}
/**
github pycook / cmdb / ui / src / views / cmdb / ci / modules / CreateInstanceForm.vue View on Github external
.catch(e => {
              notification.error({
                message: e.response.data.message
              })
            })
        } else {
github pycook / cmdb / cmdb-ui / src / views / cmdb / ci / modules / CreateInstanceForm.vue View on Github external
.catch(e => {
              notification.error({
                message: e.response.data.message
              })
            })
        } else {
github pycook / cmdb / cmdb-ui / src / views / cmdb / modeling / preference_relation / index.vue View on Github external
}).catch(e => {
            notification.error({ message: e.reponse.data.message })
          })
        }
github yupaits / docs-manage / docs-client / docs-ui / src / api.js View on Github external
}, error => {
  if (error.response) {
    //带状态码的错误信息
    notification.error({
      message: '错误',
      description: error.response.status + ' - ' + error.response.statusText + ': ' + error.response.data.message,
      duration: 3
    });
    return Promise.reject(error.response);
  } else {
    //无状态码的错误信息
    notification.error({
      message: '错误',
      description: error.toString(),
      duration: 3
    });
    return Promise.reject(error.response);
  }
});
github pycook / cmdb / cmdb-ui / src / views / cmdb / preference / index.vue View on Github external
.catch(e => {
          notification.error({
            message: e.response.data.message
          })
        })
    },