3.0.11
Reproduction link Steps to reproducetrigger @click
for button with v+=1
expression two times.
1st time it will reset v to 1
2nd time and onward it will stay 1
it is expected that v+=1 will increment value of v by 1 every time @click
is triggered.
The same way v=v+1
or v++
works
v+=1
always sets the value to 1 and does not increment
vue: v3.0.11
for a var/let v = ref()
v += 1
is compiled to:
_createVNode("button", { onClick: _cache[3] || (_cache[3] = $event => (_isRef(v) ? v.value = 1 : v+=1)) }, "v += 1"),
for a const c = ref()
_createVNode("button", { onClick: _cache[6] || (_cache[6] = $event => (c.value += 1)) }, "c += 1")
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4