"Delete the User Name ${user.name}"
以及
'Delete the User Name ${user.name}'
在使用模板字符串时,我发现我这样写,展示不出我想要展示的数据,它不符合规则,并被视为 ESLint 中的错误。此规则是在 ESLint 3.3.0 中引入的。因为从 ES6 开始,可以使用反引号来使用模板字符串。ES6代表ECMA脚本编程语言的第6版。
`Delete the User Name ${user.name}`
应该使用反引号,也就是Tab键上面那个符号,这样即可成功展示。
参考:
https://codesource.io/learn-how-to-fix-unexpected-template-string-expression-in-vue/