jiangchengfeiyi-xiaochengxu/uni_modules/zp-mixins/methods/event.js
2025-04-02 23:45:33 +08:00

11 lines
306 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* 解析事件里的动态函数名,这种没有()的函数名在uniapp不被执行
* 比如:<view bindtap="{{openId==undefined?'denglu':'hy_to'}}">立即</view>
* @param {*} exp
*/
export function parseEventDynamicCode(e, exp) {
if (typeof(this[exp]) === 'function') {
this[exp](e)
}
}