如何组件的properties属性传入function
发布于 6 年前 作者 oxia 14497 次浏览 来自 问答

https://mp.weixin.qq.com/debug/wxadoc/dev/framework/custom-component/component.html

文档对于properties的解释太少了,不知道如何传入function,如下代码不生效

Component({
properties: {
       validateMobileFn: {
type: Function,
           value: function () {
return MOBILE_REG.test(this.data.phone);
           }

}

}

})

回到顶部