'scope' is defined but never used

错误如下:

解决办法:

1.scope这个属性在最新版本vue已经被弃用,升级成slot-scope了 ,所以属性名应该改为slot-scope。

 2.如上所示,我们发现,还是有报错,原因是vetur的eslint检查没有关闭,只要不勾选此项即可,如下所示:

结果:

猜你喜欢

转载自www.cnblogs.com/FHC1994/p/10356854.html