mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-27 02:01:15 +08:00
fix(components): [el-tabs] fix tab render (#4383)
This commit is contained in:
parent
1855687416
commit
6de5aacce4
@ -325,17 +325,13 @@ export default defineComponent({
|
|||||||
'aria-selected': pane.active,
|
'aria-selected': pane.active,
|
||||||
ref: `tab-${tabName}`,
|
ref: `tab-${tabName}`,
|
||||||
tabindex,
|
tabindex,
|
||||||
onFocus: () => {
|
onFocus: () => setFocus(),
|
||||||
setFocus()
|
onBlur: () => removeFocus(),
|
||||||
},
|
onClick: (ev: MouseEvent) => {
|
||||||
onBlur: () => {
|
|
||||||
removeFocus()
|
|
||||||
},
|
|
||||||
onClick: (ev) => {
|
|
||||||
removeFocus()
|
removeFocus()
|
||||||
props.onTabClick(pane, tabName, ev)
|
props.onTabClick(pane, tabName, ev)
|
||||||
},
|
},
|
||||||
onKeydown: (ev) => {
|
onKeydown: (ev: KeyboardEvent) => {
|
||||||
if (
|
if (
|
||||||
closable &&
|
closable &&
|
||||||
(ev.code === EVENT_CODE.delete ||
|
(ev.code === EVENT_CODE.delete ||
|
||||||
@ -380,7 +376,7 @@ export default defineComponent({
|
|||||||
: '',
|
: '',
|
||||||
],
|
],
|
||||||
ref: nav$,
|
ref: nav$,
|
||||||
style: navStyle,
|
style: navStyle.value,
|
||||||
role: 'tablist',
|
role: 'tablist',
|
||||||
onKeydown: changeTab,
|
onKeydown: changeTab,
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user