Polymer paper-dropdown-menu

最后都变了- 提交于 2019-12-11 20:11:22

问题


I am trying with paper-dropdown-menu. It seems to be working on Google Chrome but on Firefox the dropdown menu is not coming up. Is this only compatible with Chrome browser?


回答1:


<link rel="import" href="../../bower_components/polymer/polymer.html">

<dom-module id="cc-dropdown">
  <template>
    {{selectedData}}
    <paper-dropdown-menu label="Environment">
      <paper-menu class="dropdown-content" attr-for-selected="value" selected="{{selectedData}}">
        <template is="dom-repeat" items="{{data}}">
          <paper-item value="{{item}}">{{item}}</paper-item>
        </template>
      </paper-menu>
    </paper-dropdown-menu>
  </template>

  <script>
    (function() {
      'use strict';

      Polymer({
        is: 'cc-dropdown',

        properties: {
          data: {
            type: Array,
            value: ["Stage", "Prod"],
            notify: true
          },
          selectedData: {
            type: String,
            value: "Stage",
            notify: true
          }
        }
      });
    })();
  </script>

</dom-module>

Here is the one that works for me



来源:https://stackoverflow.com/questions/33481692/polymer-paper-dropdown-menu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!