我为onClick,彩票和createAlert运行了2个功能。 createAlert未创建警报。我做错了什么?另外,如果有人可以告诉我如何将彩票功能改回以按钮的Id作为参数,那将不胜感激,因为当我将第二个功能添加到onClick时,它就停止了工作。
plot_list <- lapply(panel, function(x) {
ggplot(data = df %>% filter(panel == x), aes(x = value, y = region)) +
geom_point() +
theme(axis.title.x = element_blank()) +
facet_wrap(. ~ panel) +
{if (x == 0) scale_y_discrete(position = "left") else scale_y_discrete(position = "right")} +
{if (x == 1) theme(axis.title.y = element_blank())}
})
do.call("grid.arrange", c(plot_list, ncol = 2, bottom = "value"))
答案 0 :(得分:1)
client = Client('http://www.example/xmlrpc.php', 'username', 'password')
post = WordPressPost()
post.title = 'title'
post.content = 'content'
post.post_status = 'publish'
post.wp_page_template = "custom_template.php"
templates = client.call(pages.GetPageTemplates())
print(f"These are the Templates: {templates}")
post.id = client.call(posts.NewPost(post))
回调中调用您的createAlert
函数,它在该回调中返回警报jsx,这就是为什么警报未在组件中呈现的原因。onClick
中,有5条lottery
语句,它违反了DRY原理。
setState