亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

請問為什么我寫的代碼一樣就是顯示不出來

點擊了提交什么都不顯示

http://img1.sycdn.imooc.com//5d8c6bd70001063f19201030.jpg


正在回答

4 回答

<!doctype html>

<html>

?<head>

? <meta charset="UTF-8">

? <meta name="Generator" content="EditPlus?">

? <meta name="Author" content="">

? <meta name="Keywords" content="">

? <meta name="Description" content="">

? <title>Todolist</title>

? <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>

?</head>

?<body>

? <div id="root">

?<div>

? <input v-model="inputValue"></input>

?<button @click="handclick">按鈕</button>

? </div>

?<ul>

? <!--todo-item?

v-for="(item,index) of list"?

:key="index"?

:content='item'

>

</todo-item-->


? <template-list

v-for='(item,index) of list'

:key='index'

:coent='item'

>

</template-list>

?</ul>

? </div>

<script>

Vue.component('template-list',{

props:['coent'],

template:'<div @click="headldclick">{{coent}}</div>',

methods:{

headldclick:function(){

alert('124')

}

}


})



//Vue.component('todo-item',{

// props:['content'],

// template:'<li>{{content}}</li>'

//})


new Vue({

el:"#root",

data:{

inputValue:"",

list:[]

},

methods:{?

handclick: function() {

this.list.push(this.inputValue),

this.inputValue=""

}

}

})

</script>

?</body>

</html>


0 回復 有任何疑惑可以回復我~

在頁面按F12 查看代碼 有提示錯誤的

0 回復 有任何疑惑可以回復我~

F12看錯誤

0 回復 有任何疑惑可以回復我~

代碼是很誠實的 肯定是有地方寫的不對的 另外你不上代碼 只發個頁面截圖怎么幫你找你問題呢?

2 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

請問為什么我寫的代碼一樣就是顯示不出來

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號