search

Home  >  Q&A  >  body text

vue3 converted to composite api then displays nothing

<p>I checked a few times but my options API doesn't work after I converted it to a composite API. I don't know what's wrong with it and it doesn't show any errors. However, it doesn't print anything to the screen like my options API does. It only shows warnings. </p> <p>runtime-core.esm-bundler.js:40 [Vue warn]: Unable to resolve component: onboardland If this is a native custom element, make sure to exclude it from component resolution via </p> <p>This is my composite api, not working</p> <pre class="brush:php;toolbar:false;"><template> <div> <onboardland /> <onboardshow /> </div> </template> <script> import onboardland from './onboardland.vue' import onboardshow from './onboardshow.vue' export default { setup() { return { components: { onboardland, onboardshow } }; } }; </script></pre> <p>Here are the running options api</p> <pre class="brush:php;toolbar:false;"><template> <div> <onboardland /> <onboardshow /> </div> </template> <script> import onboardland from './onboardland.vue' import onboardshow from './onboardshow.vue' export default { components: { onboardland, onboardshow } } </script></pre></p>
P粉106711425P粉106711425454 days ago436

reply all(1)I'll reply

  • P粉427877676

    P粉4278776762023-09-05 10:46:57

    When using the composition API definition Vue SFC.

    You can use the