vue components传值,在组件里页面使用 slot-scope,scope.row,报错?-灵析社区

笑面猫

vue3的版本我用的vue2写法,我在1个components里传了多个值,在rightColumn页面使用 slot-scope, 报错信息:Property "scope" was accessed during render but is not defined on instance. 很多警告信息:Unhandled error during execution of scheduler flush. This is likely a Vue internals bug. {{ scope.row.checkItem }} 我尝试只传1个值,使用slot-scope="scope",取值scope.row,也报错。

阅读量:19

点赞量:0

问AI
"Vue 3" 还有 "slot-scope" 这个属性?不是从 "Vue 2.6" 开始不就已经废弃了吗?只不过还是可以用。 你如果说要在 "Vue 3" 中用作用域插槽就改用 "v-slot" 就好了呀。 "作用域插槽 - 插槽 Slots | Vue.js" (https://link.segmentfault.com/?enc=BEB%2B6xt7RRPx3a3DSxFe0w%3D%3D.fAln3JNvN1SgU9EDD3xxvYKFvJhVK%2BMtEyZGYWdl1tBJZqgiDjH3uLuVKW5g87ZMRQCG%2BxsxI5glLEHNIVcD8Q%3D%3D) "#slot-scope 废弃 | API — Vue.js" (https://link.segmentfault.com/?enc=lKLFC51%2Fi3lcqhhpeavXQQ%3D%3D.h1f3N%2FPNdGw6l6l9hQpWxpKjuvWy1MfBhw4KZzSe1g53UThp7kZwMp0gtdjn44MEs8RyYIqEF7ntIscHYkS0Jw%3D%3D)