本文整理汇总了Python中link.Link.append_widget方法的典型用法代码示例。如果您正苦于以下问题:Python Link.append_widget方法的具体用法?Python Link.append_widget怎么用?Python Link.append_widget使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类link.Link
的用法示例。
在下文中一共展示了Link.append_widget方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: nav_dd_icon
# 需要导入模块: from link import Link [as 别名]
# 或者: from link.Link import append_widget [as 别名]
def nav_dd_icon(icon_class="fa fa-envelope-o", label_class="label label-success", label_text=""):
link = Link(href="#", css_classes="dropdown-toggle", data_toggle="dropdown")
icon = Icon(icon_class)
span = Span(label_class, label_text)
icon.append_widget(span)
link.append_widget(icon)
return link
示例2: _compose_user_panel
# 需要导入模块: from link import Link [as 别名]
# 或者: from link.Link import append_widget [as 别名]
def _compose_user_panel(self):
userpanel = ZenWidget("div", {"class": "user-panel"})
userimagediv = ZenWidget("div", {"class": "pull-left image"})
userpanel.append_widget(userimagediv)
userimg = Image(self.user_info["src"], self.user_info["css_classes"], self.user_info["alt"])
userimagediv.append_widget(userimg)
usernamediv = ZenWidget("div", {"class": "pull-left info"})
p = ZenWidget("p")
p.append_text(self.user_info["username"])
userimagediv.append_widget(p)
userstatus = Link("#")
userstatusicon = Icon("fa fa-circle text-success")
userstatusicon.append_text(self.user_info["userstatus"])
userstatus.append_widget(userstatusicon)
userimagediv.append_widget(userstatus)
userpanel.append_widget(userstatus)
return userpanel
示例3: nav_toggle_button
# 需要导入模块: from link import Link [as 别名]
# 或者: from link.Link import append_widget [as 别名]
def nav_toggle_button():
btn = Link("#", "sidebar-toggle", "offcanvas", "button")
btn.append_widget(Span("sr-only", "Toggle navigation"))
return btn