解决办法,在.eslintrc.js文件里添加规则禁用ta "rules": { "@typescript-eslint/explicit-module-boundary-types": "off" },