vue 报错:Templates should only be responsible for mapping the state to the UI. Avoid placing tags with

场景

今天使用vue写后台管理系统时,控制台一直报错:Templates should only be responsible for mapping the state to the UI. Avoid placing tags with side-effects in your templates, such as <script>, as they will not be parsed.

在这里插入图片描述

解决办法

百度一番后,发现问题是因为:Html结构部分缺少div标签闭合,然后仔细查看代码后发现确实是缺少了一个</div>,补充上之后,问题解决。

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐