Skip to main content

Custom Component

Badaso uses the VueJS framework for the frontend. Therefore, adding components to the frontend also uses VueJS. The block below is a directory structure for adding a new component to the frontend.

Add a Component#

  • To add a component, add it to the components directory.
๐Ÿ“ฆ Your Projectโ”ฃ ๐Ÿ“‚ resourcesโ”ƒ โ”ฃ ๐Ÿ“‚ jsโ”ƒ โ”ƒ โ”ฃ ๐Ÿ“‚ badasoโ”ƒ โ”ƒ โ”ƒ โ”ฃ ๐Ÿ“‚ components /** you can add a component here **/โ”ƒ โ”ƒ โ”ƒ โ”ƒ โ”— ๐Ÿ“œ ExampleComponent.vue
  • Now you can use that custom component in your pages like below.
info

Custom Components will be imported automatically and can be used directly if the file naming uses the pascal case.

<template>  ...  <example-component></example-component>  ...</template>