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

using vue component: custom name registration #656

Closed
crazyxhz opened this issue Jul 17, 2018 · 4 comments
Closed

using vue component: custom name registration #656

crazyxhz opened this issue Jul 17, 2018 · 4 comments
Labels
type: feature request Request to add a new feature

Comments

@crazyxhz
Copy link

As the doc says: https://vuepress.vuejs.org/guide/using-vue.html#using-components
doc

the component is registered using the folder structure. e.g. I have a file components/w-button/w-button.vue is registered as w-button-w-button component.

How can I change this default behavior?
I want the auto comp registration follow the name property in the vue file.

@ulivz ulivz added TBD type: feature request Request to add a new feature labels Jul 17, 2018
@ulivz
Copy link
Member

ulivz commented Jul 17, 2018

Sorry but for now you cannot change the default behaviors, but we can push it to the TBD list.

@olavoasantos
Copy link

olavoasantos commented Aug 5, 2018

I've been thinking about this as well. Maybe use the config.js file to declare a list of components? Or use front matter to declare and import non-global components?

---
components:
  - path: path/to/Button.vue
    tag: w-Button
  - path: path/to/Modal.vue
    tag: w-Modal
---

@shigma
Copy link
Collaborator

shigma commented Mar 8, 2019

Now you can use @vuepress/plugin-register-components.

@shigma shigma closed this as completed Mar 8, 2019
@shigma
Copy link
Collaborator

shigma commented Mar 8, 2019

See #1418

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request Request to add a new feature
Projects
None yet
Development

No branches or pull requests

4 participants