-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
支持拖拽数据场景 #18
Comments
你希望是什么形式的API,怎么调用,能起到什么效果? |
const onDragStart = useTrackEvent(category, action, label, props.onDragStart);
<div onDragStart={onDragStart}> 这样子? |
现在是用的hooks,useDrag和useDrop,想要这么收集 const [{isDragging}, dragRef, preview] = useDrag({
begin() {
// TODO 卡片托起的操作频率
},
end() {
// TODO 卡片放下的操作频率
}
}) |
你希望在此基础上增加怎么样的能力,希望最终的使用方式是怎么样的? |
更灵活的使用方式;可以在callback中使用 const trackEvent = useTrackEvent(...);
const [{isDragging}, dragRef, preview] = useDrag({
begin() {
trackEvent({type: xxxDrag});
},
end() {
trackEvent({type: xxxDrop});
}
}) 这么做侵染性有点强...你那边有什么建议? |
懂了没问题
… 在 2019年10月23日,下午5:43,hunter2009 ***@***.***> 写道:
更灵活的使用方式;可以在callback中使用
const trackEvent = useTrackEvent(...);
const [{isDragging}, dragRef, preview] = useDrag({
begin() {
trackEvent({type: xxxDrag});
},
end() {
trackEvent({type: xxxDrop});
}
})
这么做侵染性有点强...你那边有什么建议?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Cafe这边PM有个诉求,希望能收集到卡片拖起、放置的使用情况,不知道目前有方式可以收集到么?
The text was updated successfully, but these errors were encountered: