Home  >  Q&A  >  body text

javascript - Failed to call methods in methods in vue

var vmm=new Vue({

el:"#rrapp",
data:{
    beian:{},
    zongshu:{}
},
created:function(){
    this.getbfb();//调用此方法出错 调试到这里直接停止
       .........
       .........        

},
methods:{
    getbfb: function(){
        var str="12.34";
        var regex=/^\d+\.\d+$/;
        var b=regex.test(str);
        if(b==true){
            alert("是");
        }else{
            alert("不是");
        }
    }
}

});

Error message

window.alert = function(msg, callback) {

layer.open({//说此方法没有定义
      offset: '400px'
        ,content:msg
      });

}

迷茫迷茫2683 days ago747

reply all(2)I'll reply

  • 三叔

    三叔2017-06-15 09:23:08

    What is the error message?

    reply
    0
  • 过去多啦不再A梦

    过去多啦不再A梦2017-06-15 09:23:08

    Obviously your page did not introduce layer

    reply
    0
  • Cancelreply