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

feat: global component registration #8

Open
Yubiao-Li opened this issue Apr 25, 2021 · 5 comments
Open

feat: global component registration #8

Yubiao-Li opened this issue Apr 25, 2021 · 5 comments

Comments

@Yubiao-Li
Copy link

when I use the component like this

// app.vue
<mp-block>
  <Test />
</mp-block>
// test.vue
<template>
  <mp-button>111</mp-button>
</template>

it didn't show normal and has warning that Failed to resolve component: mp-button , while I try to console.log(this) in test.vue, it show that it didn't register any components
image

while I try console.log(app) in main.js , it seems normal, what happen???
image

@Yubiao-Li Yubiao-Li changed the title custom component register problem(xxx is not define) Failed to resolve component Apr 25, 2021
@privatenumber
Copy link
Owner

Thanks for the report @Yubiao-Li

Do you mind providing a reproduction via CodeSandbox or CodePen/JSFiddle?

@Yubiao-Li
Copy link
Author

Thanks for the report @Yubiao-Li

Do you mind providing a reproduction via CodeSandbox or CodePen/JSFiddle?

https://codepen.io/Yubiao-Li/pen/bGgZZgy?editors=1111

@Yubiao-Li
Copy link
Author

@privatenumber

@privatenumber
Copy link
Owner

Ah it's not working because you registered components globally, which is currently not supported.

Changing it to local registration works: https://codepen.io/privatenumber/pen/jOyRVEz?editors=1111

Let's change this to a feature request to support global component registration

@privatenumber privatenumber changed the title Failed to resolve component feat: global component registration Apr 27, 2021
@Yubiao-Li
Copy link
Author

Ah it's not working because you registered components globally, which is currently not supported.

Changing it to local registration works: https://codepen.io/privatenumber/pen/jOyRVEz?editors=1111

Let's change this to a feature request to support global component registration

@privatenumber Oh I don't know it can't support global component registration. Looking forward to your update

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

2 participants