Answers for "how to include js in vue3 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

how to load js in vuejs components

var slide = require('../assets/template/js/jssor.slider-26.1.5.min.js');
Posted by: Guest on January-26-2021

Browse Popular Code Answers by Language