html上的代码
<div id="app">
<div v-show="showLogin"><sign-in></sign-in></div>
</div>
JavaScript代码
const Login=require('./components/login');
Vue.component('sign-in',Login);
var Vm = new Vue({
el:'#app',
data:{
showing:''
},
mounted:function(){
this.showing='onLogin';
},
})
控制台直接报错为:
[Vue warn]: Failed to mount component: template or render function not defined. (found in root instance)
在vue2.0官网上找到的解决方案是
对于Browserify,可以用 aliasify;
但是又没有事例,捣鼓了半天也没有成功,希望哪位大神指导一下!
近几天的研究得到的解决方案是vuejs-templates/browserify-simple来解决的,具体地址:https://github.com/vuejs-temp...