the “scope“ attribute for scoped slots have been deprecated and replaced by “slot-scope“

偏执的太偏执、 2022-12-31 01:30 160阅读 0赞

【辰兮要努力】:hello你好我是辰兮,很高兴你能来阅读,昵称是希望自己能不断精进,向着优秀程序员前行!

博客来源于项目以及编程中遇到的问题总结,偶尔会有读书分享,我会陆续更新Java前端、后台、数据库、项目案例等相关知识点总结,感谢你的阅读和关注,希望我的博客能帮助到更多的人,分享获取新知,大家一起进步!

吾等采石之人,应怀大教堂之心,愿你们奔赴在各自的热爱中…

场景描述:在运行老的一版vue项目出现如下的报错

在这里插入图片描述

  1. the scope attribute for scoped slots have been deprecated and replaced by slot-scope since 2.5.
  2. The new slot-scope attribute can also be used on plain elements in addition to to denote scoped slots.

报错原因:自2.5以来,作用域槽的“scope”属性已被弃用,并被“slot-scope”所取代。

  1. <template scope="scope">
  2. </template>

解决方案:修改成如下方式即可

  1. <template slot-scope="scope">
  2. </template>

The best investment is to invest in yourself.

2020.12.27 17:48 愿你们奔赴在自己的热爱里!

发表评论

表情:
评论列表 (有 0 条评论,160人围观)

还没有评论,来说两句吧...

相关阅读