F
F
furrya_black2017-03-03 17:45:16
webpack
furrya_black, 2017-03-03 17:45:16

How to split Component.vue into subcomponents?

Essence:
- client
-- elements
-- components
-- views
-- ... other here
In elements, components and views there are .vue components, let's clarify that in vue there is no division into views and so on - only components. I want to move button.vue, link.vue into elements for further reuse in components (components/buttonGroup.vue for example, which consists of html wrapper code over (?) under button.vue 1 button.vue 2, ..... from elements)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
furrya_black, 2017-03-03
@furrya_black

ps: as always, I will show my bike and get an answer where my bike is already. It's always like that with me =)

W
wostex, 2017-03-20
@wostex

So what's the question?
register a nested component in the parent component:

import Button from './Button.vue'

components: {
   'app-button': Button
}

in the template of this parent component:
Everything is the same as adding local components to the instance.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question