div{{isVisible}}!--responsiveness works, isVisible switches from false to true--!
I have a working Nuxt code:
div {{ isVisible }} !-- 响应性正常,isVisible从false切换到true --!
I tried using composition-api to convert, but it's not possible: it doesn't work.
I don't have an error message, but I feel unresponsive.
However, console.log will change the value (but the value in the template will not change)
div {{ isVisible }} !-- 响应性不正常,当我点击时isVisible始终为false(但是通过console.log,值会改变) --!
You need to change the following lines
change to
For more information, please refer to:https://vuejs.org/guide/essentials/reactivity-fundamentals.html#ref