We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<template> <router-tab /> </template> <script> export default { mounted() { document.addEventListener('mousedown', this.middleClick) }, destroyed() { document.removeEventListener('mousedown', this.middleClick) }, methods: { middleClick(e) { if (e && (e.which == 2 || e.button == 4) && /router-tab__item/.test(e.target.className)) { const to = e.target.closest('.router-tab__item').__vue__.to, closable = this.$tabs.items.reduce((r, item) => ({ ...r, [item.to]: (item.closable ??= true) }), {}) if (closable[to]) this.$tabs.close(to) } } } } </script>
The text was updated successfully, but these errors were encountered:
feat(TabItem): 鼠标中键点击关闭页签项
ef673b5
#118
v1.2.6 already supports this feature
v1.2.6
Sorry, something went wrong.
Thank You
No branches or pull requests
The text was updated successfully, but these errors were encountered: