大屏可视化(VUE2 + DataV)

准备:安装vue脚手架(vue/cli),创建vue2项目,安装dataV,在main.js入口文件中引入dataV。

dataV地址:DataV

一、dataV安装

npm install @jiaminghi/data-view

二、main.js

import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import dataV from '@jiaminghi/data-view'

import '@/assets/css/index.css'

Vue.use(dataV)
Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')

三、app.vue


四、route => index.js

import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: () => import('../views/HomeView.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router

五、views => HomeView.vue






六、效果展示

你可能感兴趣的:(前端,javascript,vue.js,大屏可视化)