安装Chart.Js
npm install vue-chartjs chart.js --save
引用Chart.Js
import Chart from 'chart.js'
使用Chart.Js
:can-cancel="true"
:on-cancel="onCancel"
:is-full-page="fullPage">
/* eslint-disable quotes */
import Loading from 'vue-loading-overlay'
import { Bar } from 'vue-chartjs'
import qs from 'Qs'
import Chart from 'chart.js'
// eslint-disable-next-line no-extend-native
Date.prototype.format = function (fmt) {
var o = {
'M+': this.getMonth() + 1, // 月份
'd+': this.getDate(), // 日
'h+': this.getHours(), // 小时
'm+':