首先,js代码没有错误,在里面使用了el表达式,但是编辑器总是提示this inspection checks that the script tag content is valid XML
,解决办法如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
修改为<!DOCTYPE html>
,代码就不会再提示错误了。