【发布时间】:2018-09-16 21:23:15
【问题描述】:
假设我的组件中有一个剪贴板粘贴事件,如下所示。
window.addEventListener('paste', this.insertNewRowsBeforePaste.bind(this));
然后当我按下键盘上的 ctrl + V 时,它会调用此事件,即 ClipboardEvent
insertNewRowsBeforePaste(event) {
const tabName = // <---- I need to be able to see which tab the user has clicked on then I can do other processing based on the current tab.
}
所以我希望它说 tabName = 'Tab 1' 或 'Tab 2' 等,因为我的组件是一个带有多个选项卡的选项卡控件。
【问题讨论】:
标签: html typescript dom