这个组件是一个chart
<script>import { Line } from 'vue-chartjs'; export default { extends: Line, mounted () { this.renderChart({ labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'], datasets: [ { label: 'success', backgroundColor: '#FC2525', fill: 'transparent', data: [40, 39, 10, 40, 39, 80, 40] }, { label: 'fail', backgroundColor: '#05CBE1', fill: 'transparent', data: [60, 55, 32, 10, 2, 12, 53] } ] }, {responsive: true, maintainAspectRatio: false}) } }</script>
然后在另一个组件Dash里引入并注册了
import LineChart from '@/components/line.vue'; export default { components:{ LineChart },
但是我每次刷新后 这个chart就消失了### 问题描述
蓝山帝景