纸按钮悬停事件
Paper button hover event
我想在 Paper 按钮悬停时触发一些额外的信息,而不是一定要按下。我目前知道:on-tap="myFunc"
在定义函数时,但是在查看 Polymer 文档时,我并没有真正看到任何关于 on-hover 的信息。我可能找错地方了
我在查看 paper-button 的源代码时注意到 Paper Button is-a HtmlElement。我真的看不到所有事件处理程序的设置位置。
有on-hover吗?如果是这样,它在哪里?没有标记智能感知的乏味孩子。
我正在检查 Paper Button 源代码,并查看:https://elements.polymer-project.org/elements/paper-button?view=demo:demo/index.html&active=paper-button 但其中大部分是基于样式化的,并没有真正从 on-hover
触发事件
您可以绑定到本机浏览器事件,无需每个元素都分派每个事件。
// this handler will be executed only once when the cursor moves over the unordered list
<paper-button on-mouseenter="doSomething">
// this handler will be executed every time the cursor is moved over a different list item
<paper-button on-mouseover="doSomething">
另见 https://developer.mozilla.org/de/docs/Web/Events/mouseover
我想在 Paper 按钮悬停时触发一些额外的信息,而不是一定要按下。我目前知道:on-tap="myFunc"
在定义函数时,但是在查看 Polymer 文档时,我并没有真正看到任何关于 on-hover 的信息。我可能找错地方了
我在查看 paper-button 的源代码时注意到 Paper Button is-a HtmlElement。我真的看不到所有事件处理程序的设置位置。
有on-hover吗?如果是这样,它在哪里?没有标记智能感知的乏味孩子。
我正在检查 Paper Button 源代码,并查看:https://elements.polymer-project.org/elements/paper-button?view=demo:demo/index.html&active=paper-button 但其中大部分是基于样式化的,并没有真正从 on-hover
触发事件您可以绑定到本机浏览器事件,无需每个元素都分派每个事件。
// this handler will be executed only once when the cursor moves over the unordered list
<paper-button on-mouseenter="doSomething">
// this handler will be executed every time the cursor is moved over a different list item
<paper-button on-mouseover="doSomething">
另见 https://developer.mozilla.org/de/docs/Web/Events/mouseover