<template> <ve-ring :data="chartData" :settings="settings" /> </template> <script> import { inOutKeyCount } from '@/api/statistics' export default { name: 'InOutKeyCount', data() { return { chartData: { columns: ['name', 'count'], rows: [] }, settings: { radius: [60, 100] } } }, activated() { this.fetchData() }, methods: { fetchData() { inOutKeyCount().then(response => { if (response.code === 200) { this.chartData.rows = response.data } }) } } } </script> <style scoped> </style>