這個組件是一個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就消失了### 問題描述
- 1 回答
- 0 關注
- 1183 瀏覽
相關問題推薦
添加回答
舉報
0/150
提交
取消