How to use the element-ui.Message.error 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 eyebluecn / blog-front / src / backyard / comment / widget / CommentTextarea.vue View on Github external
createComment() {
        let that = this
        if (!this.comment.content) {
          Message.error('评论内容不能为空')
        } else {
          this.comment.name = this.user.username
          this.comment.email = this.user.email
          this.comment.httpCreate(function (response) {
            that.$emit('success')
          })
        }
      }
    }
github lmxdawn / vue-admin-html / src / role.js View on Github external
store.dispatch("fedLogout").then(() => {
                        Message.error("验证失败,请重新登录");
                        let redirect = to.fullPath;
                        store.dispatch("loginOut").then(() => {
                            next({
                                path: "/login",
                                query: { redirect: redirect }
                            });
                        });
                    });
                });
github labulaka521 / crocodile / web / src / views / hostgroup / index.vue View on Github external
changehostgroup(this.hostgroup).then(resp => {
              if (resp.code === 0) {
                Message.success(`修改主机组 ${name} 成功`);
                this.getallhostgroup();
                this.is_change = false;
              } else {
                Message.error(`修改主机组 ${name} 失败: ${resp.msg}`);
              }
            });
          }
github linguowei / myblog / admin / src / component / ArticleLabel.vue View on Github external
respone => {
                Message.error('请求数据出错,请重新刷新页面')
            }
        )
github mojowork / admin-lite / src / utils / request.js View on Github external
*  500: '服务器发生错误,请检查服务器',
        *  502: '网关错误',
        *  503: '服务不可用,服务器暂时过载或维护',
        *  504: '网关超时'
        *
        */
       var result;
        try {
          result = JSON.parse(response);
        } catch (error) {
          result = response;
        }

        if (result.code < 0 ) {
          if (result.code == -2 || result.code == -10) {
            Message.error({
              message: result.msg
            });
            Promise.reject(result);
          }else{
            Promise.reject(result);
          }
        } else {
          if (result.code == 2) {
            Message.success({
              message: result.msg
            });
          } else if (result.code == 3) {
            Message.warning({
              message: result.msg
            });
          } else if (result.code == 4) {
github rsl140 / FE-demo / view / src / permission.js View on Github external
store.dispatch('FedLogOut').then(() => {
            Message.error(err || 'Verification failed, please login again')
            next({ path: '/' })
          })
        })
github labulaka521 / crocodile / web / src / views / user / index.vue View on Github external
admindeleteuser({ id: id }).then((resp) => {
        if (resp.code === 0) {
          Message.success(`删除用户 ${this.user.name} 成功`);
          this.startgetallusers();
          this.is_create = false;
        } else {
          Message.error(`删除用户 ${name} 失败: ${resp.msg}`);
        }
      });
    },