Subscribe on changes!

computed properties are not executed

avatar
Sep 25th 2020

Version

3.0.0

Reproduction link

https://codesandbox.io/s/magical-fog-4shec?file=/src/components/List.vue

Steps to reproduce

When you click change to audit, the log function is executed, but the computed attribute is not executed.

vue 3.rc-10 version, it can work normally.

What is expected?

When the ref value in setup is changed, the computed attribute is also changed

What is actually happening?

When the ref value in setup is changed, the calculated attribute is not changed

avatar
Sep 25th 2020

Make userList reactive:

userList: reactive([
  { id: 1, name: "name1", isAudit: false },
  { id: 2, name: "name2", isAudit: true },
  { id: 3, name: "name3", isAudit: true },
])
avatar
Sep 25th 2020

Make userList reactive:


userList: reactive([

  { id: 1, name: "name1", isAudit: false },

  { id: 2, name: "name2", isAudit: true },

  { id: 3, name: "name3", isAudit: true },

])

Thank you. I got it wrong

avatar
Sep 25th 2020

Or a ref, that would also work