错误如图:
原因:ESLint推荐用ES6的Template String来拼接字符串,而不能用+
号。
解决方法:
`我是字符串部分,${我是参数部分},我是字符串部分`
官方文档:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/template_strings
ES6:Unexpected string concatenation (prefer-template)
原文:https://www.cnblogs.com/Harold-Hua/p/11611693.html