fix(components): [el-tabs] fix tab render (#4383)

This commit is contained in:
三咲智子 2021-11-15 10:08:07 +08:00 committed by GitHub
parent 1855687416
commit 6de5aacce4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -325,17 +325,13 @@ export default defineComponent({
'aria-selected': pane.active,
ref: `tab-${tabName}`,
tabindex,
onFocus: () => {
setFocus()
},
onBlur: () => {
removeFocus()
},
onClick: (ev) => {
onFocus: () => setFocus(),
onBlur: () => removeFocus(),
onClick: (ev: MouseEvent) => {
removeFocus()
props.onTabClick(pane, tabName, ev)
},
onKeydown: (ev) => {
onKeydown: (ev: KeyboardEvent) => {
if (
closable &&
(ev.code === EVENT_CODE.delete ||
@ -380,7 +376,7 @@ export default defineComponent({
: '',
],
ref: nav$,
style: navStyle,
style: navStyle.value,
role: 'tablist',
onKeydown: changeTab,
},