feat: add function return for event setter

This commit is contained in:
南京-金建新 2022-12-30 10:24:59 +08:00 committed by 刘菊萍(絮黎)
parent 5a1e1bc052
commit c6d65dbdc1

View File

@ -224,7 +224,7 @@ export default function (metadata: IPublicTypeTransformedComponentMetadata): IPu
field.parent.setPropValue(item.name, { field.parent.setPropValue(item.name, {
type: 'JSFunction', type: 'JSFunction',
// 需要传下入参 // 需要传下入参
value: `function(){this.${item.relatedEventName}.apply(this,Array.prototype.slice.call(arguments).concat([${item.paramStr ? item.paramStr : ''}])) }`, value: `function(){return this.${item.relatedEventName}.apply(this,Array.prototype.slice.call(arguments).concat([${item.paramStr ? item.paramStr : ''}])) }`,
}); });
return item; return item;
}); });