第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

beego框架中使用vue的component 編譯出錯

beego框架中使用vue的component 編譯出錯

慕森王 2019-03-12 13:13:50
這樣一個網(wǎng)頁<!DOCTYPE html><html><head>    <meta charset="UTF-8">    <title>Title</title>    <script src="js/vue.js"></script></head><body><div id="example-2">    <simple-counter></simple-counter>    <simple-counter></simple-counter>    <simple-counter></simple-counter></div><script>    var data = { counter: 0 }    Vue.component('simple-counter', {        template: '<button v-on:click="counter += 1">{{ counter }}</button>',        // 技術(shù)上 data 的確是一個函數(shù)了,因此 Vue 不會警告,        // 但是我們卻給每個組件實例返回了同一個對象的引用        data: function () {            return data        }    });    new Vue({        el: '#example-2'    })</script></body></html>router中func init() {    beego.Router("/arcTest.html", &controllers.ArcTestController{}, "*:Arc")}controller中func (c *ArcTestController) Arc() {    c.TplName = "arcTest.html"}單獨運行html頁面沒有任何問題放進beego框架中 bee run一下報錯[E] [template.go:174] parse template err: arcTest.html template: arcTest.html:20: function "counter" not defined[W] [beego.go:97] template: arcTest.html:20: function "counter" not definedpanic: template: arcTest.html:20: function "counter" not definedcounter不能使用,刪去就編譯成功了,但是明明有定義 這個例子就是在vue官網(wǎng)上復(fù)制的,為什么beego就是編譯不過,導(dǎo)致整個項目都運行不起來,有沒有大神知道怎么解決,跪求。
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 631 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號