diff --git a/packages/omi-mp/src/utils/helper.js b/packages/omi-mp/src/utils/helper.js index a64933d81..859ab0469 100644 --- a/packages/omi-mp/src/utils/helper.js +++ b/packages/omi-mp/src/utils/helper.js @@ -28,4 +28,23 @@ export function fixProps(properties){ } } return props -} \ No newline at end of file +} + +// 代理input +export function helpInputEvent(fn, e){ + if(!e.detail){ + Object.defineProperty(e,'detail',{ + value: {}, + writable: false, + configurable : true + }); + } + + Object.defineProperty(e.detail,'value',{ + value: e.target.value, + writable: false, + configurable : true + }); + + fn && fn(e) +}