报错如下:
Argument of type ‘Router’ is not assignable to parameter of type ‘Plugin_2’.
Type ‘Router’ is not assignable to type ‘{ install: PluginInstallFunction; }’.
Types of property ‘install’ are incompatible.
Type ‘(app: App) => void’ is not assignable to type ‘PluginInstallFunction’.
Types of parameters ‘app’ and ‘app’ are incompatible.
Type ‘App’ has no properties in common with type ‘App’
大意是“类型Router的参数不能给类型Plugin_2的参数“
”类型Router不能分配给类型’{ install: PluginInstallFunction; }”
升级element-plus之前都没问题,理所当然认为是element-plus版本不兼容问题,当前element-plus版本是2.2.4,之前是2.2.0,于是卸载当前element-plus,安装2.2.0版本的element-plus,就没问题了