export default { components: { Render: { props: { renderFunc: Function, scope: Object // 将数据传递出去 }, render(createElement: any): any { let that: any // eslint-disable-next-line prefer-const that = this // 这里createElement必须传过去,不然会报错 return ( that.renderFunc && that.renderFunc(createElement, that.scope) ) } } } }