如何使用纸质对话聚合物元件? [英] How to use paper-dialog polymer element?
本文介绍了如何使用纸质对话聚合物元件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在通过添加开始和结束标签<paper-dialog><p>This is it</p></paper-dialog>
使用元素,但是没有显示出来.我是否需要在脚本之上添加一些脚本,以便在某些事件上触发该脚本?还是有其他方法使其可见?
I am using the element by adding opening and closing tags <paper-dialog><p>This is it</p></paper-dialog>
but it is not getting shown up. Do I need to add some script on top of it so that it should be triggered on some event? Or is there some another way to make it visible ?
推荐答案
对话框本身是自动隐藏的.通常,您可以使用按钮进行切换.
例如,给对话框一个id="dialog"
并将按钮on-tap="toggleDialog"
设置为
The dialog itself is autohidden. You usually toggle it with a button.
For example, give the dialog an id="dialog"
and make the button on-tap="toggleDialog"
, which would be
toggleDialog: () => {
this.$.dialog.toggle();
},
这篇关于如何使用纸质对话聚合物元件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文