子组件: /components/testCom1.vue <template> </template> import { ref, reactive, defineExpose } from 'vue' const a = ref(Math.round(Math.random() * 100)) const b = reactive({ num: Math.round(Math.random() * 100), }) const c = 77 defineExpose({ a, b, c }) 在子组件...
i have a vue2 propject, use vue3 components in vue2, but Vue3 components that use Setup are exposed via defineExpose and are not in the converted component Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment Assignees No one assigned Labe...
Vue version 3.2.39 Link to minimal reproduction https://github.com/segevfiner/vue-define-expose-bug Steps to reproduce Run pnpm dev, open the page, The Bar: {{ bar() }} in the components used in HomeView renders correctly. Run pnpm build & pnpm preview, Bar: {{ bar() }} throws ...
子组件: /components/testCom1.vue <template> </template> import { ref, reactive, defineExpose } from 'vue' const a = ref(Math.round(Math.random() * 100)) const b = reactive({ num: Math.round(Math.random() * 100), }) const c = 77 defineExpose({ a, b, c }) 在子组件...
I use vue-composition-api in my program like setup(){ const fn = ()=>{} defineExpose({ fn }); } Can't I test this function in my test file? I check wrapper.vm,its not on vm。 So is there a way to test this function?