Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Latest commit

 

History

History
46 lines (34 loc) · 1.27 KB

views.md

File metadata and controls

46 lines (34 loc) · 1.27 KB

Your views are just Vue components. Varie makes a suggestion on how to organize your components with layouts and directory structures.

[{.info} To learn more about components go to Vue's Documentation.]

Layouts

By default we provide a public layout, by adding more you are able to use different layouts.

  +-- views
      +-- layouts
          ./Public.vue

[{.info} To learn more about layouts read the routing documentation.]

Directory Structure

We suggest making areas folders for your site, which allows you to keep a tidy folder structure and also can keep component folders inside of those.

  +-- views
      +-- Profile
        ./index.vue
        +-- components
            ./NewPasswordForm.vue
            ./ProfileImageUploader.vue

As you can see your can create sub component's in this manner that are not necessarily reusable components but components to keep your code tidy.

Component Dependency Injection

To inject dependencies into your components by using the $inject property in your Vue Component.

export default Vue.extend({
  $inject: ["DocumentationService"]
  computed : {
    menu() {
        return this.documentationService.getMenu();
    }
  }
});