单击按钮时不打开纸张对话框

时间:2016-03-03 09:54:08

标签: dialog polymer

Higuys,

根据纸张对话框中的聚合物文档,我做了这个

<paper-card elevation=3 align="center" id="question-ask-card">

      <h1 id="got-a-question">
          Got a question ?
      </h1>

    <paper-button data-dialog="Qdialog" id="askit" raised ><p id="ask-it">Write on Blackboard</p></paper-button>

</paper-card>

,对话框为

  <paper-dialog id="Qdialog">

    <h1>sdjafadsfasdfjhg</h1>

    <p>
      aouaouwghsefjgzskdcghizbskk
    </p>

 </paper-dialog>

那么如何点击该按钮链接该对话框,请帮助我!!!!!!!!

提前致谢。

1 个答案:

答案 0 :(得分:0)

假设您的代码只是放在主文档中,这就像在按钮中添加<!doctype html> <head> <meta name="description" content="Polymer Example"> <meta charset="utf-8"> <base href="http://polygit.org/components/"> <script src="webcomponentsjs/webcomponents-lite.min.js"></script> <link href="paper-elements/paper-elements.html" rel="import"> <style> body { font-family: sans-serif; } </style> </head> <body> <paper-card elevation=3 align="center" id="question-ask-card"> <h1 id="got-a-question">Got a question ?</h1> <paper-button data-dialog="Qdialog" id="askit" raised onclick="Qdialog.open()"><p id="ask-it">Write on Blackboard</p></paper-button> </paper-card> <paper-dialog id="Qdialog"> <h1>sdjafadsfasdfjhg</h1> <p> aouaouwghsefjgzskdcghizbskk </p> </paper-dialog> </body>一样简单。

&#13;
&#13;
{{1}}
&#13;
&#13;
&#13;