Skip to content

Commit

Permalink
fix(tab-nav): arrow display is abnormal (#3517)
Browse files Browse the repository at this point in the history
  • Loading branch information
betavs authored Oct 24, 2023
1 parent 2b8dcdf commit 6b38e4a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/tabs/tab-nav.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { h, defineComponent, Transition, ref, computed, watch, onMounted } from 'vue';
import { h, defineComponent, Transition, ref, computed, watch, onMounted, nextTick } from 'vue';
import debounce from 'lodash/debounce';
import {
ChevronLeftIcon as TdChevronLeftIcon,
Expand Down Expand Up @@ -137,8 +137,10 @@ export default defineComponent({
});

const totalAdjust = () => {
adjustArrowDisplay();
adjustScrollLeft();
nextTick(() => {
adjustArrowDisplay();
adjustScrollLeft();
});
};
// watch
watch([scrollLeft, () => props.placement, () => props.panels], totalAdjust);
Expand Down

0 comments on commit 6b38e4a

Please sign in to comment.