Polymer 1.0:如何让这个 <paper-menu-button> 示例正常工作?
Polymer 1.0: How do I get this <paper-menu-button> example to work properly?
如何使 <paper-menu-button>
下拉菜单正常工作? Here is a jsBin.
http://jsbin.com/xamixicuna/4/edit?html,output
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<base href="http://polygit.org/polymer:+v1.1.0/components/">
<title>JS Bin</title>
<link rel="import" href="polymer/polymer.html">
<link rel="import" href="iron-icons/iron-icons.html">
<link rel="import" href="paper-menu-button/paper-menu-button.html">
<link rel="import" href="paper-icon-button/paper-icon-button.html">
<link rel="import" href="paper-menu/paper-menu.html">
<link rel="import" href="paper-item/paper-item.html">
</head>
<body>
Click the below menu icon to make the dropdown menu appear.
<br>
<paper-menu-button>
<paper-icon-button icon="menu" class="dropdown-trigger"></paper-icon-button>
<paper-menu class="dropdown-content">
<paper-item>Share</paper-item>
<paper-item>Settings</paper-item>
<paper-item>Help</paper-item>
</paper-menu>
</paper-menu-button>
</body>
</html>
已添加网络组件,似乎正在运行:http://jsbin.com/rucejo/2/edit?html,output
优秀。
如果您在 <paper-toolbar
> 中使用 <paper-menu-button>
,则需要先使用 <div>
标签。 <paper-toolbar>
不支持 <paper-menu-button>
如何使 <paper-menu-button>
下拉菜单正常工作? Here is a jsBin.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<base href="http://polygit.org/polymer:+v1.1.0/components/">
<title>JS Bin</title>
<link rel="import" href="polymer/polymer.html">
<link rel="import" href="iron-icons/iron-icons.html">
<link rel="import" href="paper-menu-button/paper-menu-button.html">
<link rel="import" href="paper-icon-button/paper-icon-button.html">
<link rel="import" href="paper-menu/paper-menu.html">
<link rel="import" href="paper-item/paper-item.html">
</head>
<body>
Click the below menu icon to make the dropdown menu appear.
<br>
<paper-menu-button>
<paper-icon-button icon="menu" class="dropdown-trigger"></paper-icon-button>
<paper-menu class="dropdown-content">
<paper-item>Share</paper-item>
<paper-item>Settings</paper-item>
<paper-item>Help</paper-item>
</paper-menu>
</paper-menu-button>
</body>
</html>
已添加网络组件,似乎正在运行:http://jsbin.com/rucejo/2/edit?html,output
优秀。
如果您在 <paper-toolbar
> 中使用 <paper-menu-button>
,则需要先使用 <div>
标签。 <paper-toolbar>
不支持 <paper-menu-button>