File tree 2 files changed +4
-5
lines changed
2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -32,11 +32,11 @@ const props = defineProps({
32
32
}
33
33
})
34
34
35
- const instance = getCurrentInstance ( )
35
+ const emit = defineEmits ([ ' nav-link-click ' ] )
36
36
37
37
// ===================================================================== Methods
38
38
const scrollToSection = async (el ) => {
39
- instance . parent . exposed . handleNavClick ( )
39
+ emit ( ' nav-link-click ' )
40
40
const id = el .replaceAll (' #' , ' ' )
41
41
const section = document .getElementById (id)
42
42
if (section) {
Original file line number Diff line number Diff line change 11
11
<div class =" mobile-nav" >
12
12
<Navbar
13
13
:links =" navigation"
14
- class =" mobile" >
14
+ class =" mobile"
15
+ @nav-link-click =" handleNavClick" >
15
16
<div class =" nav-item" >
16
17
<ButtonCta
17
18
tag =" nuxt-link"
@@ -169,8 +170,6 @@ const handleNavClick = () => {
169
170
if (navigationOpen .value ) { toggleNav () }
170
171
}
171
172
172
- defineExpose ({ handleNavClick })
173
-
174
173
</script >
175
174
176
175
<style lang="scss" scoped>
You can’t perform that action at this time.
0 commit comments