frappe-ui 0.1.15 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/readme.md +3 -1
- package/src/components/Tabs.vue +9 -2
package/package.json
CHANGED
package/readme.md
CHANGED
package/src/components/Tabs.vue
CHANGED
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
</Tab>
|
|
28
28
|
<div
|
|
29
29
|
ref="indicator"
|
|
30
|
-
class="absolute -bottom-px h-px bg-gray-900
|
|
30
|
+
class="absolute -bottom-px h-px bg-gray-900"
|
|
31
|
+
:class="transitionClass"
|
|
31
32
|
:style="{ left: `${indicatorLeft}px` }"
|
|
32
33
|
/>
|
|
33
34
|
</TabList>
|
|
@@ -76,6 +77,7 @@ const indicator = ref(null)
|
|
|
76
77
|
const tabsLength = ref(props.tabs?.length)
|
|
77
78
|
|
|
78
79
|
const indicatorLeft = ref(props.options?.indicatorLeft)
|
|
80
|
+
const transitionClass = ref('')
|
|
79
81
|
|
|
80
82
|
function moveIndicator(index) {
|
|
81
83
|
if (index >= tabsLength.value) {
|
|
@@ -93,5 +95,10 @@ watch(changedIndex, (index) => {
|
|
|
93
95
|
nextTick(() => moveIndicator(index))
|
|
94
96
|
})
|
|
95
97
|
|
|
96
|
-
onMounted(() =>
|
|
98
|
+
onMounted(() => {
|
|
99
|
+
moveIndicator(changedIndex.value)
|
|
100
|
+
nextTick(() => {
|
|
101
|
+
transitionClass.value = 'transition-all duration-300 ease-in-out'
|
|
102
|
+
})
|
|
103
|
+
})
|
|
97
104
|
</script>
|