按钮在vaadin-Grid内部工作(JavaScript)
我想在新标签中打开一个链接,但在网格中不起作用,我想打开一个链接。我在网格外测试了代码,然后在那里工作。一切都用点亮完成。
这是代码的一部分:
<vaadin-grid-column resizable="" path="action" header="Action">
<template>
<button @click="${this._openTab()}"Test</button>
</template>
</vaadin-grid-column>
_opentab函数:
_openTab(e){
window.open("https://google.com", "_blank");
}
I have a button in a vaadin grid that I want to open a link in a new tab, but it doesn't work inside the grid. I tested the code outside the grid, and it worked there. Everything is done using Lit.
Here's part of the code:
<vaadin-grid-column resizable="" path="action" header="Action">
<template>
<button @click="${this._openTab()}"Test</button>
</template>
</vaadin-grid-column>
The _openTab function:
_openTab(e){
window.open("https://google.com", "_blank");
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论