添加tsconfig.json文件
{ "compilerOptions": { "experimentalDecorators": true, // 设置这个属性即可解决问题 "allowJs": true }
参考:https://www.jianshu.com/p/53e2be3150cc