How to use the element-ui.Message function in element-ui

To help you get started, we’ve selected a few element-ui 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 d2-projects / d2-admin / src / plugin / axios / index.js View on Github external
function errorLog (error) {
  // 添加到日志
  store.dispatch('d2admin/log/push', {
    message: '数据请求异常',
    type: 'danger',
    meta: {
      error
    }
  })
  // 打印到控制台
  if (process.env.NODE_ENV === 'development') {
    util.log.danger('>>>>>> Error >>>>>>')
    console.log(error)
  }
  // 显示提示
  Message({
    message: error.message,
    type: 'error',
    duration: 5 * 1000
  })
}
github yuboon / Aooms / aooms-rbac-webmgr / src / plugin / axios / index.js View on Github external
function errorLog (err) {
  // 添加到日志
  store.dispatch('d2admin/log/add', {
    type: 'error',
    err,
    info: '数据请求异常'
  })
  // 打印到控制台
  if (process.env.NODE_ENV === 'development') {
    util.log.danger('>>>>>> Error >>>>>>')
    console.log(err)
  }
  // 显示提示
  Message({
    message: err.message,
    type: 'error',
    duration: 5 * 1000
  })
}
github d2-projects / d2-admin-start-kit / src / plugin / axios / index.js View on Github external
function errorLog (err) {
  // 添加到日志
  store.dispatch('d2admin/log/add', {
    type: 'error',
    err,
    info: '数据请求异常'
  })
  // 打印到控制台
  if (process.env.NODE_ENV === 'development') {
    util.log.danger('>>>>>> Error >>>>>>')
    console.log(err)
  }
  // 显示提示
  Message({
    message: err.message,
    type: 'error',
    duration: 5 * 1000
  })
}
github Qsnh / goa / static / backend / src / plugin / axios / index.js View on Github external
function errorLog (err) {
  // 添加到日志
  store.dispatch('d2admin/log/add', {
    type: 'error',
    err,
    info: '数据请求异常'
  })
  // 打印到控制台
  if (process.env.NODE_ENV === 'development') {
    util.log.danger('>>>>>> Error >>>>>>')
    console.log(err)
  }
  // 显示提示
  Message({
    message: err.message,
    type: 'error',
    duration: 5 * 1000
  })
}
github BUPT-HJM / vue-blog / client / src / modules / admin / app.js View on Github external
Vue.prototype.$message.error = (err) => { // 重新定义默认参数
    var options = {
        message: err,
        duration: 500,
        type: 'error',
    };
    return Message(options);
};
github d2-projects / d2-admin-cms-go / src / api / service.js View on Github external
function errorLog (error) {
  store.dispatch('d2admin/log/push', {
    message: '数据请求异常',
    type: 'danger',
    meta: {
      error
    }
  })
  if (env.NODE_ENV === 'development') {
    utils.log.danger('>>>>>> Error >>>>>>')
    console.error(error)
  }
  Message({
    message: error.message,
    type: 'error',
    duration: 5 * 1000
  })
}
github liuweijw / Vue2-Admin / src / utils / request.js View on Github external
export function message(text, type) {
  Message({
    message: text,
    type: type,
    duration: 5 * 1000
  })
}
github missxiaolin / vue-admin / src / view / login / login.vue View on Github external
login(this.loginForm).then(response => {
            let userData = response.data
            if (userData.code == ERR_OK) {
              setToken(userData.data.token)
              this.$router.push({ path: '/' })
              this.loading = false
            } else {
              Message(userData.message)
            }
          })
        } else {
github l-hammer / v-track / docs / tracks / action.js View on Github external
export default function trackAction(evt, addtional = {}) {
  const data = {
    evt,
    ...addtional,
    action_time: format(Date.now())
  };

  if (evt === "1") {
    Message("统计UVPV埋点");
  }
  if (evt === "2") {
    Message({
      message: "统计页面停留时间埋点",
      customClass: "message-offset"
    });
  }
  Notification.success({
    title: "上报数据如下:",
    dangerouslyUseHTMLString: true,
    message: createFragment(data),
    customClass: "notification__large",
    position: evt === "1" || evt === "2" ? "top-left" : "top-right"
  });
}