mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-27 09:12:41 +00:00
!48580 修复仓颉list_item异常
Merge pull request !48580 from 闻涛/feature_fix_cj_listitem
This commit is contained in:
commit
1b7bb18d9c
@ -67,15 +67,22 @@ void FfiOHOSAceFrameworkListItemSetOnSelect(void (*callback)(bool flag))
|
||||
ListItemModel::GetInstance()->SetSelectCallback(CJLambda::Create(callback));
|
||||
}
|
||||
|
||||
void FfiOHOSAceFrameworkListItemSetSwipeAction(void (*startBuilder)(), void (*endBuilder)(),
|
||||
void (*onIndexChange)(int32_t index), int32_t edgeEffect)
|
||||
void FfiOHOSAceFrameworkListItemSetSwipeAction(void (*startBuilder)(), void (*endBuilder)(), int32_t edgeEffect)
|
||||
{
|
||||
if (!Utils::CheckParamsValid(edgeEffect, SWIPE_EDGE_EFFECT.size())) {
|
||||
LOGE("invalid value for font swipeEdgeAction");
|
||||
return;
|
||||
}
|
||||
|
||||
ListItemModel::GetInstance()->SetDeleteArea(
|
||||
CJLambda::Create(endBuilder), nullptr, nullptr, nullptr, nullptr,
|
||||
Dimension(0, DimensionUnit::VP), false, nullptr);
|
||||
|
||||
ListItemModel::GetInstance()->SetDeleteArea(
|
||||
CJLambda::Create(startBuilder), nullptr, nullptr, nullptr, nullptr,
|
||||
Dimension(0, DimensionUnit::VP), true, nullptr);
|
||||
|
||||
ListItemModel::GetInstance()->SetSwiperAction(
|
||||
CJLambda::Create(startBuilder), CJLambda::Create(endBuilder),
|
||||
CJLambda::Create(onIndexChange), SWIPE_EDGE_EFFECT[edgeEffect]);
|
||||
nullptr, nullptr, nullptr, SWIPE_EDGE_EFFECT[edgeEffect]);
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ CJ_EXPORT void FfiOHOSAceFrameworkListItemSetEditable(bool flag);
|
||||
CJ_EXPORT void FfiOHOSAceFrameworkListItemSetSelectable(bool flag);
|
||||
CJ_EXPORT void FfiOHOSAceFrameworkListItemSetOnSelect(void (*callback)(bool flag));
|
||||
CJ_EXPORT void FfiOHOSAceFrameworkListItemSetSwipeAction(
|
||||
void (*startBuilder)(), void (*endBuilder)(), void (*onIndexChange)(int32_t index), int32_t edgeEffect);
|
||||
void (*startBuilder)(), void (*endBuilder)(), int32_t edgeEffect);
|
||||
}
|
||||
|
||||
#endif // OHOS_ACE_FRAMEWORK_CJ_FLEX_FFI_H
|
||||
|
Loading…
Reference in New Issue
Block a user