Vue的v-bind="$attrs"如何使用
/这是是爷爷组件 <template> /传两个prop,parent和child <parent parent='40' child="18"/> </template> <script> export default{ name:"grandpa" } </script> //这是是爸爸组件 <template> <child v-bind = '$attrs'/> <span>{{parent}}</span>//40 </template> <script> export default { name:"parent", props:['parent'] } </script> //这是儿子组件 <template> <span>{{child}}</span>//18 </template> <script> export default { name:"child", props:['child'] } </script>