这个组件是一个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 关注
- 1136 浏览
相关问题推荐
添加回答
举报
0/150
提交
取消