Vue reported an error SyntaxError: Unexpected string in.

novice, recently started to learn vue, a simple todoList instance

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        
        <style type="text/css">
            
        </style>
    </head>
    <body>
        <div id="todo">
            <h2></h2>
            <h3></h3>
            <input type="text" placeholder="ded" 
             @keyup.13="addList" v-model="addText"\>
             

{{prolist.length}}

<!--v-forprolist--> <li class="li1" v-for="list in prolist"> <div> <span class="type-span"></span> <span>{{list.name}}</span> <span class="close">X</span> </div> </li> </div> <script src="../../vus.js"></script> <script> new Vue({ el: "-sharptodo", data: { addText:"", //name-,status- prolist:[ {name:"HTML5",status:false}, {name:"CSS3",status:false}, {name:"vue",status:false}, {name:"react",status:false} ] }, computed:{ }, methods:{ addList(){ //status=false, this.prolist.push({ name:this.addText, status:false }); //addText this.addText=""; } } }); </script> </body> </html>

the above code will report an error in the browser.

SyntaxError: Unexpected string in

with (this) {return _ c ("div", {"id": "todo"}}, [_ c (" h2targets, [_ v ("small targets list")]), _ v ("), _ c ("h3targets, [_ v (" add small targets ")]), _ v ("), _ c (" input", {directives: [{name: "model", rawName: "v-model", value: (addText), expression: "addText"}], Attrs: {"type": "text", "placeholder": "ded", "": "}, domProps: {" value ": (addText)}, on: {" keyup ": function ($event) {if (! ("button" in $event) & & $if (!) Return addList ($event)}, "input": function ($event) {if ($event.target.composing) return; AddText=$event.target.value}), _ v ("), _ c ("paired, [_ v (" common "+ _ s (prolist.length) +" target ")]), _ v ("), _ l ((prolist), function (list) {return _ c (" li", {staticClass: "li1"}), [_ c ("div", [_ c (" span", {staticClass: "type-span"})), _ v ("), _ c ("span",) [_ v (_ s (list.name))]), _ v (""), _ c ("span", {staticClass: "close"}, [_ v ("X")])})], 2)}

Mar.10,2021

the last shutdown was misspelled. It should be /

.
 <input type="text" placeholder="ded" 
 @keyup.13="addList" v-model="addText"\>

carelessness. Reach out your hand


the question should be addressed first. It is recommended to write code in IDE. Low-level errors like webstorm, vscode will prompt

.
Menu