js中用反斜线“\”’实现字符串换行

1 Vue.component('todo-item',{
2        template:'\
3             <li>\
4                  {{title}}\
5                  <button v-on:click = "$emit(\'remove\')">X</button>\
6             </li>\
7              ',
8 })

 

posted @ 2017-07-20 11:44  IT小师妹  阅读(9403)  评论(0)    收藏  举报