Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing breaking change: Option API does not have access to exposed properties anymore #66

Open
dorian-marchal opened this issue May 29, 2024 · 0 comments

Comments

@dorian-marchal
Copy link

dorian-marchal commented May 29, 2024

This component worked as expected in Vue 2.7.16 but fails with TypeError: this.getFoo is not a function in Vue 3.4.23:

<template>
    <pre>
        {{ foo }}
    </pre>
</template>

<script setup>
function getFoo() {
    return 'foo'
}
defineExpose({ getFoo })
</script>

<script>
export default {
    computed: {
        foo() {
            return this.getFoo()
        },
    },
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant