如何使<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>
答案 0 :(得分:3)
添加了webcomponents,似乎正在运行:http://jsbin.com/rucejo/2/edit?html,output
答案 1 :(得分:1)
优异。
如果您使用<paper-menu-button>
&gt;中的<paper-toolbar
您需要先使用<div>
标签。 <paper-toolbar>
不支持<paper-menu-button>