The problem with vue $index?

as the title, I now have two click events, one editor, one delete, deletion can be performed normally, but the editor will report an error!

<tbody>
                                <tr class="gradeX" v-for="(item,index) in mydatas">
                                    <td class="expand tabclick">{{item.id}}</td>
                                    <td class="">{{item.menuname}}</td>
                                    <td>{{item.type}}</td>
                                    <td>{{item.ord}}</td>
                                    <td>{{item.path}}</td>
                                     <td>
                                         <div class="tpl-table-black-operation">
                                            <a href="javascript:;"  @click="edit(inedx)"> 
                                                <i class="am-icon-pencil"></i> 
                                                
                                            </a> 
                                            <a href="javascript:;" class="tpl-table-black-operation-del" @click="delt(index)">
                                                <i class="am-icon-trash"></i> 
                                                
                                            </a>
                                        </div>
                                    </td>
                                </tr> 
                            </tbody>
methods:{
               delt:function($index){ 
                      var id = $(".tabclick").eq($index).text();    
                      var platresourceid;
                      var data = {platresourceid:id}
                    $.ajax({
                        url:"*********",
                        type:"post",
                        dataType:"json",
                        data:data,
                        success:function(datas){
                            if(datas.code > 0){
                                window.location.href="***********";
                            }else{
                                alert("")
                            }
                        }
                    });
                },
                edit:function($inedx){
                    var editId = $(".tabclick").eq($inedx).text();
                      var id;
                      var data = {id:editId}
                    $.ajax({
                        url:"*******",
                        type:"post",
                        dataType:"json",
                        data:data,
                        success:function(datas){
                            alert(datas)
                        }
                    });
                }
           }

the error is as follows

Mar.10,2021

misspelled, boss!


the word clipboard.png


is a simple error that can be realized by debugging. You should learn to read error tips, look for mistakes, and correct them.

Menu