Skip to content

Commit

Permalink
fix: tab 组件修正渲染函数导致的生产版本错误 (#4787)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cat1007 authored Nov 29, 2024
1 parent 64bb0ce commit e639a3c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/tabs/tab-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export default defineComponent({
handleActiveTabScroll();
});
// renders
const navs = computed(() => {
const renderNavsContent = () => {
return props.panels.map((panel, index) => {
let label;
if (panel?.children?.label) {
Expand Down Expand Up @@ -244,7 +244,7 @@ export default defineComponent({
/>
);
});
});
};
const renderArrows = () => {
return [
<div
Expand Down Expand Up @@ -280,14 +280,15 @@ export default defineComponent({
];
};
const renderNavs = () => {
const navContent = renderNavsContent();
return (
<div class={navContainerClass.value}>
<div class={navScrollContainerClass.value} onWheel={handleWheel}>
<div ref={navsWrapRef} class={navsWrapClass.value} style={wrapTransformStyle.value}>
{props.theme !== 'card' && (
<TTabNavBar placement={props.placement} value={props.value} navs={navs.value} />
<TTabNavBar placement={props.placement} value={props.value} navs={navContent} />
)}
{navs.value}
{navContent}
</div>
</div>
</div>
Expand Down

0 comments on commit e639a3c

Please sign in to comment.