Vue计算的属性未更新

时间:2020-05-27 08:24:06

标签: vue.js vue-component vuex

我在不更新的同一组件中有一个计算属性。

在组件中,道具从商店状态更新。

看第一个提示点:“访问过”:是

商店提交后的组件道具:

{
    "id": "1528877976193",
    "name": "I",
    "background": "null",
    "url": "I/",
    "videoSD": "HM_2v_0_1_1.mp4",
    "videoHD": "HM_2v_0_1_1_hd.mp4",
    "destination": "null",
    "cuepoints": [
        {
            "resource": "I/T00_S01_SC01_SL01_01.png",
            "sec": 20,
            "sequences": {
                "sequence": {
                    "resource": "I/T00_S01_SC01_SL01_01",
                    "second": "0"
                }
            },
            "type": "image",
            "visited": true
        },
        {
            "resource": "I/T00_S01_SC01_SL02_01.png",
            "sec": 109,
            "sequences": {
                "sequence": {
                    "resource": "I/T00_S01_SC01_SL02_01",
                    "second": "109"
                }
            },
            "type": "image",
            "visited": false
        }
    ]
}

但是我的计算财产没有更新:

  isBlank() {
    return this.data.cuepoints[0].visited === true ? false : true
  },

我尝试了@mentorgashi,没有缓存提示,什么也没有...

    lank_2: {
      cache: false,
      get: () => {
    this.data.cuepoints[0].visited === true ? false : true
      },
    },

谢谢

0 个答案:

没有答案