如題,template中的button標(biāo)簽無法顯示、HTML代碼如下 <div id="app"> <counter></counter> <counter></counter> <counter></counter> </div> <template id="counter-temp"> <h1>Hello Vuejs!!</h1> <button>{{count}}</button> </template>JS代碼如下Vue.component('counter',{ template:'#counter-temp', data: function () { return {count: 0}; } }); new Vue ({ el: '#app', });
Vuejs中使用component無法解析template的button標(biāo)簽
30秒到達(dá)戰(zhàn)場
2019-03-27 22:18:43