fix(compiler-core): generate TS-cast safe assignment code for v-model
fix #4655
This commit is contained in:
@@ -8,7 +8,7 @@ return function render(_ctx, _cache) {
|
||||
const { vModelText: _vModelText, withDirectives: _withDirectives, openBlock: _openBlock, createElementBlock: _createElementBlock } = _Vue
|
||||
|
||||
return _withDirectives((_openBlock(), _createElementBlock(\\"my-input\\", {
|
||||
\\"onUpdate:modelValue\\": $event => (model = $event)
|
||||
\\"onUpdate:modelValue\\": $event => ((model) = $event)
|
||||
}, null, 8 /* PROPS */, [\\"onUpdate:modelValue\\"])), [
|
||||
[_vModelText, model]
|
||||
])
|
||||
@@ -24,7 +24,7 @@ return function render(_ctx, _cache) {
|
||||
const { vModelDynamic: _vModelDynamic, mergeProps: _mergeProps, withDirectives: _withDirectives, openBlock: _openBlock, createElementBlock: _createElementBlock } = _Vue
|
||||
|
||||
return _withDirectives((_openBlock(), _createElementBlock(\\"input\\", _mergeProps(obj, {
|
||||
\\"onUpdate:modelValue\\": $event => (model = $event)
|
||||
\\"onUpdate:modelValue\\": $event => ((model) = $event)
|
||||
}), null, 16 /* FULL_PROPS */, [\\"onUpdate:modelValue\\"])), [
|
||||
[_vModelDynamic, model]
|
||||
])
|
||||
@@ -42,7 +42,7 @@ return function render(_ctx, _cache) {
|
||||
const _directive_bind = _resolveDirective(\\"bind\\")
|
||||
|
||||
return _withDirectives((_openBlock(), _createElementBlock(\\"input\\", {
|
||||
\\"onUpdate:modelValue\\": $event => (model = $event)
|
||||
\\"onUpdate:modelValue\\": $event => ((model) = $event)
|
||||
}, null, 8 /* PROPS */, [\\"onUpdate:modelValue\\"])), [
|
||||
[_directive_bind, val, key],
|
||||
[_vModelDynamic, model]
|
||||
@@ -59,7 +59,7 @@ return function render(_ctx, _cache) {
|
||||
const { vModelText: _vModelText, withDirectives: _withDirectives, openBlock: _openBlock, createElementBlock: _createElementBlock } = _Vue
|
||||
|
||||
return _withDirectives((_openBlock(), _createElementBlock(\\"input\\", {
|
||||
\\"onUpdate:modelValue\\": $event => (model = $event)
|
||||
\\"onUpdate:modelValue\\": $event => ((model) = $event)
|
||||
}, null, 8 /* PROPS */, [\\"onUpdate:modelValue\\"])), [
|
||||
[
|
||||
_vModelText,
|
||||
@@ -80,7 +80,7 @@ return function render(_ctx, _cache) {
|
||||
const { vModelText: _vModelText, withDirectives: _withDirectives, openBlock: _openBlock, createElementBlock: _createElementBlock } = _Vue
|
||||
|
||||
return _withDirectives((_openBlock(), _createElementBlock(\\"input\\", {
|
||||
\\"onUpdate:modelValue\\": $event => (model = $event)
|
||||
\\"onUpdate:modelValue\\": $event => ((model) = $event)
|
||||
}, null, 8 /* PROPS */, [\\"onUpdate:modelValue\\"])), [
|
||||
[
|
||||
_vModelText,
|
||||
@@ -101,7 +101,7 @@ return function render(_ctx, _cache) {
|
||||
const { vModelText: _vModelText, withDirectives: _withDirectives, openBlock: _openBlock, createElementBlock: _createElementBlock } = _Vue
|
||||
|
||||
return _withDirectives((_openBlock(), _createElementBlock(\\"input\\", {
|
||||
\\"onUpdate:modelValue\\": $event => (model = $event)
|
||||
\\"onUpdate:modelValue\\": $event => ((model) = $event)
|
||||
}, null, 8 /* PROPS */, [\\"onUpdate:modelValue\\"])), [
|
||||
[
|
||||
_vModelText,
|
||||
@@ -122,7 +122,7 @@ return function render(_ctx, _cache) {
|
||||
const { vModelText: _vModelText, withDirectives: _withDirectives, openBlock: _openBlock, createElementBlock: _createElementBlock } = _Vue
|
||||
|
||||
return _withDirectives((_openBlock(), _createElementBlock(\\"input\\", {
|
||||
\\"onUpdate:modelValue\\": $event => (model = $event)
|
||||
\\"onUpdate:modelValue\\": $event => ((model) = $event)
|
||||
}, null, 8 /* PROPS */, [\\"onUpdate:modelValue\\"])), [
|
||||
[_vModelText, model]
|
||||
])
|
||||
@@ -139,7 +139,7 @@ return function render(_ctx, _cache) {
|
||||
|
||||
return _withDirectives((_openBlock(), _createElementBlock(\\"input\\", {
|
||||
type: \\"checkbox\\",
|
||||
\\"onUpdate:modelValue\\": $event => (model = $event)
|
||||
\\"onUpdate:modelValue\\": $event => ((model) = $event)
|
||||
}, null, 8 /* PROPS */, [\\"onUpdate:modelValue\\"])), [
|
||||
[_vModelCheckbox, model]
|
||||
])
|
||||
@@ -157,7 +157,7 @@ return function render(_ctx, _cache) {
|
||||
const _directive_bind = _resolveDirective(\\"bind\\")
|
||||
|
||||
return _withDirectives((_openBlock(), _createElementBlock(\\"input\\", {
|
||||
\\"onUpdate:modelValue\\": $event => (model = $event)
|
||||
\\"onUpdate:modelValue\\": $event => ((model) = $event)
|
||||
}, null, 8 /* PROPS */, [\\"onUpdate:modelValue\\"])), [
|
||||
[_directive_bind, foo, \\"type\\"],
|
||||
[_vModelDynamic, model]
|
||||
@@ -175,7 +175,7 @@ return function render(_ctx, _cache) {
|
||||
|
||||
return _withDirectives((_openBlock(), _createElementBlock(\\"input\\", {
|
||||
type: \\"radio\\",
|
||||
\\"onUpdate:modelValue\\": $event => (model = $event)
|
||||
\\"onUpdate:modelValue\\": $event => ((model) = $event)
|
||||
}, null, 8 /* PROPS */, [\\"onUpdate:modelValue\\"])), [
|
||||
[_vModelRadio, model]
|
||||
])
|
||||
@@ -192,7 +192,7 @@ return function render(_ctx, _cache) {
|
||||
|
||||
return _withDirectives((_openBlock(), _createElementBlock(\\"input\\", {
|
||||
type: \\"text\\",
|
||||
\\"onUpdate:modelValue\\": $event => (model = $event)
|
||||
\\"onUpdate:modelValue\\": $event => ((model) = $event)
|
||||
}, null, 8 /* PROPS */, [\\"onUpdate:modelValue\\"])), [
|
||||
[_vModelText, model]
|
||||
])
|
||||
@@ -208,7 +208,7 @@ return function render(_ctx, _cache) {
|
||||
const { vModelSelect: _vModelSelect, withDirectives: _withDirectives, openBlock: _openBlock, createElementBlock: _createElementBlock } = _Vue
|
||||
|
||||
return _withDirectives((_openBlock(), _createElementBlock(\\"select\\", {
|
||||
\\"onUpdate:modelValue\\": $event => (model = $event)
|
||||
\\"onUpdate:modelValue\\": $event => ((model) = $event)
|
||||
}, null, 8 /* PROPS */, [\\"onUpdate:modelValue\\"])), [
|
||||
[_vModelSelect, model]
|
||||
])
|
||||
@@ -224,7 +224,7 @@ return function render(_ctx, _cache) {
|
||||
const { vModelText: _vModelText, withDirectives: _withDirectives, openBlock: _openBlock, createElementBlock: _createElementBlock } = _Vue
|
||||
|
||||
return _withDirectives((_openBlock(), _createElementBlock(\\"textarea\\", {
|
||||
\\"onUpdate:modelValue\\": $event => (model = $event)
|
||||
\\"onUpdate:modelValue\\": $event => ((model) = $event)
|
||||
}, null, 8 /* PROPS */, [\\"onUpdate:modelValue\\"])), [
|
||||
[_vModelText, model]
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user