vue 的DOMException问题

开发中遇见了

vue.runtime.esm.js:1888 DOMException: Failed to execute 'setAttribute' on 'Element': ')' is not a valid attribute name.
at baseSetAttr (http://localhost:3000/app.js:36065:8)
at setAttr (http://localhost:3000/app.js:36040:5)
at Array.updateAttrs (http://localhost:3000/app.js:35995:7)
at invokeCreateHooks (http://localhost:3000/app.js:35349:22)
at createElm (http://localhost:3000/app.js:35236:11)
at createChildren (http://localhost:3000/app.js:35333:9)
at createElm (http://localhost:3000/app.js:35234:9)
at VueComponent.patch [as __patch__] (http://localhost:3000/app.js:35757:7)
at VueComponent.Vue._update (http://localhost:3000/app.js:33229:19)
at VueComponent.updateComponent (http://localhost:3000/app.js:33350:10)

这样的一个问题,都不能具体定位到错误的位置,后来通过代码管理工具对比代码才发现

    <li class="unselect-item" @click="more" )>更多筛选</li>
 
这段代码多了一个右括号导致问题出现,再网上看了一些人遇见的问题,有的是标签属性多了个豆号什么的,所以一旦出现DOMException这样的问题,可以先从标签上看一下是不是哪里多写了或者写错了什么东西导致的问题出现,从标签开始排查
原文地址:https://www.cnblogs.com/llcdbk/p/12101418.html