fix(compiler-sfc): fix template expression assignment codegen for script setup let refs (#3626)
fix #3625
This commit is contained in:
@@ -361,6 +361,7 @@ export default {
|
||||
const count = ref(0)
|
||||
const maybe = foo()
|
||||
let lett = 1
|
||||
let v = ref(1)
|
||||
|
||||
return (_ctx, _cache) => {
|
||||
return (_openBlock(), _createBlock(_Fragment, null, [
|
||||
@@ -372,6 +373,12 @@ return (_ctx, _cache) => {
|
||||
}),
|
||||
_createVNode(\\"div\\", {
|
||||
onClick: _cache[3] || (_cache[3] = $event => (_isRef(lett) ? lett.value = count.value : lett = count.value))
|
||||
}),
|
||||
_createVNode(\\"div\\", {
|
||||
onClick: _cache[4] || (_cache[4] = $event => (_isRef(v) ? v.value += 1 : v += 1))
|
||||
}),
|
||||
_createVNode(\\"div\\", {
|
||||
onClick: _cache[5] || (_cache[5] = $event => (_isRef(v) ? v.value -= 1 : v -= 1))
|
||||
})
|
||||
], 64 /* STABLE_FRAGMENT */))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user