@yunlefun/vue 0.0.8-beta.0 → 0.0.8-beta.1
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/README.md
CHANGED
|
@@ -14,7 +14,7 @@ const emit = defineEmits(['click'])
|
|
|
14
14
|
:class="{
|
|
15
15
|
active,
|
|
16
16
|
}"
|
|
17
|
-
class="ylf-bottom-menu-item
|
|
17
|
+
class="ylf-bottom-menu-item cursor-pointer transition"
|
|
18
18
|
flex="~ 1"
|
|
19
19
|
justify="center" items="center"
|
|
20
20
|
text-gray-800 dark="text-white"
|
|
@@ -24,12 +24,14 @@ const items: BottomMenuItem[] = [
|
|
|
24
24
|
]
|
|
25
25
|
|
|
26
26
|
// when using vue-router
|
|
27
|
-
// import { useRouter } from 'vue-router'
|
|
27
|
+
// import { useRoute, useRouter } from 'vue-router'
|
|
28
|
+
// const route = useRoute()
|
|
28
29
|
// const router = useRouter()
|
|
29
|
-
// const active = computed(() =>
|
|
30
|
+
// const active = computed(() => route.path)
|
|
31
|
+
|
|
30
32
|
const active = ref('/')
|
|
31
33
|
function onClick(item: BottomMenuItem) {
|
|
32
|
-
// router.push(item.to)
|
|
34
|
+
// router.push(item.to || '/')
|
|
33
35
|
active.value = item.to || ''
|
|
34
36
|
}
|
|
35
37
|
</script>
|