请教:jsx函数式组件中写slot-scope好像不对,报这个错
jsx函数式组件中写slot-scope好像不对,报这个错"TypeError: Invalid attempt to spread non-iterable instance",请问正确的写法是怎样的
{...{
scopedSlots: {
icon: props => {
console.log(props);
return (
<van-icon
class-prefix={
'iconfont ' +
(props.checked
? 'icontubiaosheji_fujiedianxuanzhongfuben'
: 'icontubiaosheji_weixuanzhongfuben')
}
color={props.checked ? '#4888F4' : '#333'}
name="extra"
></van-icon>
);
}
}
}}