import component in vue file
import DataTable from '@/components/DataTable.vue';
define component in script section
components: {
DataTable
}
In Template section of vue file, add tag like this:
<template>
<div>
<DataTable />
</div>
</template>
project is created using vue-cli. install vue-cli.
npm install -g @vue/cli
run vue-cli GUI by
vue ui
through this GUI load project and manage dependies, run tasks like serve build test. This is an easy and recomended way.
or
through command line
npm install
npm run serve
npm run build
npm run test
npm run lint
npm run test:e2e
npm run test:unit
1st build the project through vue-cli GUI or through command line
npm run build
this will place all build files in /dist folder at root of the project. Copy all files and folders to deployment server. index.html file is included so accessing server will run the project in browser.