{"action":"created","issue":{"url":"https://api.github.com/repos/vuejs/vue-cli/issues/57","repository_url":"https://api.github.com/repos/vuejs/vue-cli","labels_url":"https://api.github.com/repos/vuejs/vue-cli/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vue-cli/issues/57/comments","events_url":"https://api.github.com/repos/vuejs/vue-cli/issues/57/events","html_url":"https://github.com/vuejs/vue-cli/issues/57","id":139801096,"number":57,"title":"hi","user":{"login":"SallyOne","id":12112235,"avatar_url":"https://avatars.githubusercontent.com/u/12112235?v=3","gravatar_id":"","url":"https://api.github.com/users/SallyOne","html_url":"https://github.com/SallyOne","followers_url":"https://api.github.com/users/SallyOne/followers","following_url":"https://api.github.com/users/SallyOne/following{/other_user}","gists_url":"https://api.github.com/users/SallyOne/gists{/gist_id}","starred_url":"https://api.github.com/users/SallyOne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SallyOne/subscriptions","organizations_url":"https://api.github.com/users/SallyOne/orgs","repos_url":"https://api.github.com/users/SallyOne/repos","events_url":"https://api.github.com/users/SallyOne/events{/privacy}","received_events_url":"https://api.github.com/users/SallyOne/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-10T06:40:23Z","updated_at":"2016-03-10T06:52:29Z","closed_at":"2016-03-10T06:52:29Z","body":".vue file \r\n\r\nthis is code\r\n\r\n\r\n`<style>\r\n    .regist {\r\n        margin-top: 86px;\r\n        border: 1px solid lightgray;\r\n        border-radius: 4px;\r\n        padding: 20px;\r\n    }\r\n    .regist-login-link {\r\n        display: block;\r\n        margin-top: 10px;\r\n    }\r\n    .login-icon {\r\n        width: 100%;\r\n        background: url('https://dn-coding-net-production-static.qbox.me/5aad72f4-a78e-433a-815b-3a991794f4ba.jpg') no-repeat;\r\n        background-position: center center;\r\n        overflow: hidden;\r\n        overflow-y: hidden;\r\n        height: 100vh;\r\n    }\r\n</style>\r\n<template>\r\n    <div class=\"login-icon\">\r\n    \r\n    <div class=\"regist col-sm-4 col-sm-offset-4\">\r\n        <p class=\"regist-title\">用户登陆</p>\r\n         <validator name=\"validationLogin\">\r\n        <form role=\"form\" novalidate>\r\n            <div class=\"form-group\">\r\n                <input type=\"text\" class=\"form-control\" placeholder=\"用户名\"  v-validate:username=\"{minlength:5,maxlength:12,required: true}\" autocomplete=\"off\" v-on:focus=\"scope.setFormaaa($event)\">\r\n            </div>\r\n            <div v-if=\"$validationLogin.username.dirty && $validationLogin.username.invalid\">\r\n                <p style=\"color: #ffffff\">用户名不符合要求</p>\r\n            </div>\r\n            <div class=\"form-group\">\r\n                <input type=\"text\" class=\"form-control\" placeholder=\"密码\"  v-validate:password=\"{minlength:5,maxlength:12,required:true}\" autocomplete=\"off\" v-on:focus=\"setFormaaa($event)\">\r\n            </div>\r\n            <div v-if=\"$validationLogin.password.dirty && $validationLogin.password.invalid\">\r\n                <p style=\"color: #ffffff\">密码不符合要求</p>\r\n            </div>\r\n            <div class=\"form-group\">\r\n                <input type=\"checkbox\"><span>记住我</span>\r\n                <a href=\"#\" class=\"pull-right\">找回密码</a>\r\n            </div>\r\n            <button type=\"button\" class=\"btn btn-primary center-block\" v-bind:disabled=\"$validationLogin.invalid\" v-on:click=\"login()\">登陆</button>\r\n        </form>\r\n        </validator>\r\n        <a href=\"/regist\" class=\"regist-login-link pull-right\">没有账户？马上注册</a>\r\n    </div>\r\n    </div>\r\n<template>\r\n<script>\r\n    export default {\r\n        data() {\r\n            retrn {\r\n                username: '',\r\n                password: ''\r\n            }\r\n        },\r\n        methods: {\r\n            setFormaaa(event) {\r\n                console.log(1);\r\n            }\r\n            login() {\r\n                console.log(1);\r\n            }\r\n        }\r\n        \r\n    }\r\n</script>`\r\n\r\n\r\nhave problem `Uncaught TypeError: Cannot read property 'setFormaaa' of undefined(anonymous function) @ VM5242:3handler @ vue.common.js?e881:8108\r\nVM5244:3 Uncaught TypeError: scope.setFormaaa is not a function(anonymous function) @ VM5244:3handler @ vue.common.js?e881:8108\r\n7VM5249:3 Uncaught TypeError: scope.login is not a function`"},"comment":{"url":"https://api.github.com/repos/vuejs/vue-cli/issues/comments/194699661","html_url":"https://github.com/vuejs/vue-cli/issues/57#issuecomment-194699661","issue_url":"https://api.github.com/repos/vuejs/vue-cli/issues/57","id":194699661,"user":{"login":"yyx990803","id":499550,"avatar_url":"https://avatars.githubusercontent.com/u/499550?v=3","gravatar_id":"","url":"https://api.github.com/users/yyx990803","html_url":"https://github.com/yyx990803","followers_url":"https://api.github.com/users/yyx990803/followers","following_url":"https://api.github.com/users/yyx990803/following{/other_user}","gists_url":"https://api.github.com/users/yyx990803/gists{/gist_id}","starred_url":"https://api.github.com/users/yyx990803/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yyx990803/subscriptions","organizations_url":"https://api.github.com/users/yyx990803/orgs","repos_url":"https://api.github.com/users/yyx990803/repos","events_url":"https://api.github.com/users/yyx990803/events{/privacy}","received_events_url":"https://api.github.com/users/yyx990803/received_events","type":"User","site_admin":false},"created_at":"2016-03-10T06:52:29Z","updated_at":"2016-03-10T06:52:29Z","body":"You should at least isolate the issue and format the code properly. I don't debug your code for free."}}