vuejs import script code example

Example 1: 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>

Example 2: how to load js in vuejs components

var slide = require('../assets/template/js/jssor.slider-26.1.5.min.js');

Example 3: import vue

import Vue from 'vue'

Tags:

Html Example