我认为您只需要返回:
computed: { statAlertCount() { var stat = this.siteStatistics.filter(item => item.name === "site_alert_count"); return stat.length > 0 ? stat[0].stat : ''; } }