Subscribe on changes!

当watch传入一个返回ref的函数为source时,副作用不会被正常触发

avatar
Mar 13th 2023

Vue version

3.2.47

Link to minimal reproduction

https://sfc.vuejs.org/#eNp9Us1ywiAQfpUtl8ROTBp7c9T+3HroE5QeYsQmNgEGFj1k8u5dCKOOzvTAwO73s7DLwN60zo9OsCVb2dq0GsEKdHrDZdtrZRAGMGKfwanCuoER9kb1kJAi4ZLLWkmLnlDC2m9pObtKLmISjRPX+eeY/yqzxTcBF8i6DiOYTFES8FA95RIgncF6E8zzY9U5AS+T4xKk6zrILpzBH6Nn5Abn5ynID6qVaZL5AiMtAFp7J2tslYS6a+vfd5QL8gpGV0LtbJPqyljxITH9rLDJTSV3qifuI5RPM+82crkqpo5SLylA0euuQkHRMEy3GokEsNo6RCr5GmquOYude/A7Z8SnZ8BEKoOgmIKA3KnPN7+RLm6kq+J8I5axadjzvtL5wSpJ3yG8mkfAcraMDaUcTd/HnDWI2i6Lwu5r/4kONlfmp6BTbpzEthe5sP18a9TJCkPGnIX5RI+Ckkdh5kbInTDC/Od5Q73z9bbUzZGNf++Q9AI=

Steps to reproduce

  1. 打开链接
  2. 点击button2时result时不更新
  3. 点击button1时result会更新

What is expected?

  • ref2为true时 点击button2时result更新
  • ref2为false时 点击button2时result不更新

What is actually happening?

  • ref2为true时 点击button2时result不更新
  • ref2为false时 点击button2时result不更新

System Info

No response

Any additional comments?

No response