the “scope“ attribute for scoped slots have been deprecated and replaced by “slot-scope“
【辰兮要努力】:hello你好我是辰兮,很高兴你能来阅读,昵称是希望自己能不断精进,向着优秀程序员前行!
博客来源于项目以及编程中遇到的问题总结,偶尔会有读书分享,我会陆续更新Java前端、后台、数据库、项目案例等相关知识点总结,感谢你的阅读和关注,希望我的博客能帮助到更多的人,分享获取新知,大家一起进步!
吾等采石之人,应怀大教堂之心,愿你们奔赴在各自的热爱中…
场景描述:在运行老的一版vue项目出现如下的报错
the “scope” attribute for scoped slots have been deprecated and replaced by “slot-scope” since 2.5.
The new “slot-scope” attribute can also be used on plain elements in addition to to denote scoped slots.
报错原因:自2.5以来,作用域槽的“scope”属性已被弃用,并被“slot-scope”所取代。
<template scope="scope">
</template>
解决方案:修改成如下方式即可
<template slot-scope="scope">
</template>
The best investment is to invest in yourself.
2020.12.27 17:48 愿你们奔赴在自己的热爱里!
还没有评论,来说两句吧...