调用天地图,天地图的全局变量T报错
‘T’ is not defined no-undef
在 package.json 下 添加 这些一般是可以解决的
"rules": {
"generator-star-spacing": "off",
"no-unused-vars": "off",
"no-console": "off",
"no-irregular-whitespace": "off",
"no-debugger": "off",
"indent": 0,
"no-tabs": 0,
"no-mixed-spaces-and-tabs": 0,
"vue/no-unused-components": "off"
}
但是,全局变量报错就不行了。
新建 .eslintrc.js 文件 ,填入如下东西重启
module.exports = {
"globals":{
"error": true
}
}
即可解决