Missing breaking change: Option API does not have access to exposed properties anymore #66
Open
Description
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>
Metadata
Assignees
Labels
No labels