当我使用filterBy时,我的Vue.js应用程序停止工作

当我使用filterBy时,我的Vue.js应用程序停止工作,vue.js,Vue.js,当我使用filterBy时,我的应用程序停止工作,页面中没有显示任何内容,DOM中缺少VM实例div。原因可能是什么 <div v-else v-for="events in profDetails.events | filterBy events.type"> 您正在使用哪个版本的Vue?在v2中删除了filterBy(改为在计算的函数中过滤数据。)vuejs版本1OK——在这种情况下,我认为您需要显示一些示例数据(在profDetails中有什么内容,以及您试图过滤掉哪些元素

当我使用filterBy时,我的应用程序停止工作,页面中没有显示任何内容,DOM中缺少VM实例div。原因可能是什么

<div  v-else v-for="events in profDetails.events | filterBy events.type">

您正在使用哪个版本的Vue?在v2中删除了filterBy(改为在
计算的
函数中过滤数据。)vuejs版本1OK——在这种情况下,我认为您需要显示一些示例数据(在
profDetails
中有什么内容,以及您试图过滤掉哪些元素?)现在,您似乎正试图通过同一
事件中包含的字段来过滤每个
事件
,但这似乎不是您真正想要的…添加了JSON,希望对您有所帮助:)
{
    "usrId": "1",
    "events": [{
        "sdate": "02/13/2017",
        "author": "suthota1@email.com",
        "imgsmall": "images/backgroundhead.svg",
        "usrId": 1,
        "title": "BigFix Detect (Endpoint Detection & Response) Marketing Announce",
        "type": "announcements",
        "edate": "02/13/2017",
        "tags": "",
        "bu": ["Security"],
        "scope": "CISOs, SOC Analysts",
        "contact": "",
        "createTS": "June 01, 2017 @ 04:53 PM",
        "id": 1,
        "region": "North America",
        "imglarge": "images/backgroundhead.svg",
        "kma": "New landing page, demo video, webinar, comprehensive digital campaign, try/buy offer, immersive demos at RSA, analyst quick take report",
        "status": "Published",
        "desc": "IBM launches new rapid threat detection and remediation platform. The top tactic employed by attackers is to avoid being detected in the first place. This has spawned a flood of endpoint detection and response (EDR) tools that have primarily focused on detection of endpoint threats. Unlike other vendors, BigFix sees, understands and acts on all threats on the endpoint through a single platform, detecting malicious behavior and delivering targeted remediation on impacted endpoints enterprise wide in minutes."
    }, {
        "sdate": "07/26/2017",
        "author": "suthota1@email.com",
        "imgsmall": "images/backgroundhead.svg",
        "usrId": 1,
        "title": "IBM X-Force Red Portal 2.0",
        "type": "announcements",
        "edate": "07/26/2017",
        "tags": "",
        "bu": ["Security"],
        "scope": "Technical security testing",
        "contact": "",
        "createTS": "June 01, 2017 @ 04:53 PM",
        "id": 2,
        "region": "North America",
        "imglarge": "images/backgroundhead.svg",
        "kma": "Announce as Tier 1 story at Blackhat for Security",
        "status": "Published",
        "desc": "TECHIBM X-Force Red, is a new global force of the industry's."
    }],
    "status": "SUCCESS"
 }