Answers for "vuejs import"

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
8

vue import component

// With Vue 3.2 
<script setup>
import Btn from './components/Btn'
</script>

<template>
  <Btn />
</template>
Posted by: Guest on November-02-2020
0

import vue js

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

import vue

import Vue from 'vue'
Posted by: Guest on December-21-2020
0

vue js app component

// main.js
import { createApp } from 'vue'
import App from './App.vue'
import 'YourComponent' from 'YourFileOrLibrary';


const app = createApp(App);
app.component('yourComponent', YourFileOrLibrary);

// ...
Posted by: Guest on January-19-2021

Browse Popular Code Answers by Language