<el-progress
:text-inside="true"
:stroke-width="24"
:percentage="parseInt((Online/Total)*100)||0" // 计算百分比
status="success"
></el-progress>
报错原因:
//百分比必须为0-100,
否则报错[Vue warn]:
Invalid prop:custom validator check failed for prop "percentage"
解决方法:
:percentage="parseInt((Online/Total)*100) || 0" 这样在数据返回之前会默认渲染0