鍍金池/ 問答/HTML/ iOS weex 自定義組件的方法不能執(zhí)行

iOS weex 自定義組件的方法不能執(zhí)行

在iOS中自定義了一個組件,并提供了一個方法,但是在vue調(diào)用的時候提示funcation undefined.

// iOS中
[WXSDKEngine registerComponent:@"rich-image" withClass:[KSWXImgComponent class]];

// KSWXImgComponent.m
WX_EXPORT_METHOD(@selector(save:))
- (void)save:(WXKeepAliveCallback)resultCallback {
}
// vue中
<rich-image ref="test"></rich-image>
this.$refs['test'].save()
回答
編輯回答
何蘇葉

問題解決后請 采納答案 進(jìn)行終結(jié);如果自己找到解決方案,你可以 自問自答 并采納。

2017年10月6日 01:25