遵循此实现=>
https://codepen.io/pen/?&editable=true&editors=001
我想创建一个类似的东西,当我单击一个按钮时,弹出窗口出现在弹出窗口内,而不是简单的文本和按钮,而是一个完全自定义的html。 (或反应成分)
我找不到任何方法。
我尝试添加
<Popconfirm
placement="leftBottom"
title={text}
onConfirm={confirm}
okText="Yes"
cancelText="No"
>
<Button>LB</Button>
if(this.state.isOpen){
<div>custom<div>
}
</Popconfirm>
但它不起作用。
有没有办法实现这一目标?
答案 0 :(得分:1)
使用SELECT ue1.user_id,
ue1.meta_value coins ,
ue3.meta_value user_rank ,
ue2.meta_value gems,
COUNT(ue4.user_id) quiz_count,
COUNT(ue5.user_id) video_watch_count,
ue1.meta_value + ue3.meta_value + ue2.meta_value total_points
FROM `wp_usermeta` as ue1
INNER JOIN `wp_usermeta` as ue2 ON ue2.user_id = ue1.user_id
AND ue1.meta_key = '_coin_points'
AND ue2.meta_key = '_gem_points'
INNER JOIN `wp_usermeta` as ue3 ON ue3.user_id = ue1.user_id
AND ue3.meta_key = '_user_rank'
INNER JOIN `wp_gamipress_user_earnings` as ue4 ON ue4.user_id = ue1.user_id
AND ue4.post_type = 'quiz-game-master'
INNER JOIN `wp_gamipress_user_earnings` as ue5 ON ue5.user_id = ue1.user_id
AND ue5.post_type = 'video-game-master'
WHERE ue1.meta_value > 0
AND ue2.meta_value > 0
GROUP BY ue1.user_id, ue1.meta_value, ue2.meta_value, ue3.meta_value, ue4.user_id, ue5.user_id
ORDER BY total_points DESC LIMIT 0, 50
中的title
property,它接受Popconfirm
。
请注意,Tooltip
API可用于此组件。
ReactNode