Cannot read property ‘onShow’ of undefined报错 在uniapp创建vue文件,使用typeScript语言,运行到小程序中报错 在创建文件的定义中加上@Component({})即可解决