Answers for "how to create js and import in vue component"

7

vuejs import component

<template>
  <your-component></your-component>
</template>

<script>
  import YourComponent from '../components/YourComponent.vue'
  
  export default {
	components: {
      YourComponent // <=> YourComponent: 'YourComponent'
    }	
  };
</script>

<!-- OR -->

<script>
  export default {
	components: {
      YourComponent: () => import('your/component/path')
    }
  }
</script>
Posted by: Guest on December-21-2020
0

import vue js

<script src="https://unpkg.com/vue"></script>
Posted by: Guest on April-30-2021

Code answers related to "how to create js and import in vue component"

Browse Popular Code Answers by Language