mirror of https://github.com/vuejs/core.git
fix(compiler-vapor): register event for v-model
This commit is contained in:
parent
26f29b2529
commit
88123e56d0
|
@ -7,7 +7,7 @@ const t0 = _template("<input>")
|
||||||
export function render(_ctx) {
|
export function render(_ctx) {
|
||||||
const n1 = t0()
|
const n1 = t0()
|
||||||
_withDirectives(n1, [[_vModelText, () => _ctx.model, void 0, { lazy: true }]])
|
_withDirectives(n1, [[_vModelText, () => _ctx.model, void 0, { lazy: true }]])
|
||||||
_on(n1, "update:modelValue", $event => (_ctx.model = $event))
|
_on(n1, "update:modelValue", () => $event => (_ctx.model = $event))
|
||||||
return n1
|
return n1
|
||||||
}"
|
}"
|
||||||
`;
|
`;
|
||||||
|
@ -19,7 +19,7 @@ const t0 = _template("<input>")
|
||||||
export function render(_ctx) {
|
export function render(_ctx) {
|
||||||
const n1 = t0()
|
const n1 = t0()
|
||||||
_withDirectives(n1, [[_vModelText, () => _ctx.model, void 0, { number: true }]])
|
_withDirectives(n1, [[_vModelText, () => _ctx.model, void 0, { number: true }]])
|
||||||
_on(n1, "update:modelValue", $event => (_ctx.model = $event))
|
_on(n1, "update:modelValue", () => $event => (_ctx.model = $event))
|
||||||
return n1
|
return n1
|
||||||
}"
|
}"
|
||||||
`;
|
`;
|
||||||
|
@ -31,7 +31,7 @@ const t0 = _template("<input>")
|
||||||
export function render(_ctx) {
|
export function render(_ctx) {
|
||||||
const n1 = t0()
|
const n1 = t0()
|
||||||
_withDirectives(n1, [[_vModelText, () => _ctx.model, void 0, { trim: true }]])
|
_withDirectives(n1, [[_vModelText, () => _ctx.model, void 0, { trim: true }]])
|
||||||
_on(n1, "update:modelValue", $event => (_ctx.model = $event))
|
_on(n1, "update:modelValue", () => $event => (_ctx.model = $event))
|
||||||
return n1
|
return n1
|
||||||
}"
|
}"
|
||||||
`;
|
`;
|
||||||
|
@ -43,7 +43,7 @@ const t0 = _template("<input type=\\"checkbox\\">")
|
||||||
export function render(_ctx) {
|
export function render(_ctx) {
|
||||||
const n1 = t0()
|
const n1 = t0()
|
||||||
_withDirectives(n1, [[_vModelCheckbox, () => _ctx.model]])
|
_withDirectives(n1, [[_vModelCheckbox, () => _ctx.model]])
|
||||||
_on(n1, "update:modelValue", $event => (_ctx.model = $event))
|
_on(n1, "update:modelValue", () => $event => (_ctx.model = $event))
|
||||||
return n1
|
return n1
|
||||||
}"
|
}"
|
||||||
`;
|
`;
|
||||||
|
@ -55,7 +55,7 @@ const t0 = _template("<input>")
|
||||||
export function render(_ctx) {
|
export function render(_ctx) {
|
||||||
const n1 = t0()
|
const n1 = t0()
|
||||||
_withDirectives(n1, [[_vModelDynamic, () => _ctx.model]])
|
_withDirectives(n1, [[_vModelDynamic, () => _ctx.model]])
|
||||||
_on(n1, "update:modelValue", $event => (_ctx.model = $event))
|
_on(n1, "update:modelValue", () => $event => (_ctx.model = $event))
|
||||||
return n1
|
return n1
|
||||||
}"
|
}"
|
||||||
`;
|
`;
|
||||||
|
@ -67,7 +67,7 @@ const t0 = _template("<input type=\\"radio\\">")
|
||||||
export function render(_ctx) {
|
export function render(_ctx) {
|
||||||
const n1 = t0()
|
const n1 = t0()
|
||||||
_withDirectives(n1, [[_vModelRadio, () => _ctx.model]])
|
_withDirectives(n1, [[_vModelRadio, () => _ctx.model]])
|
||||||
_on(n1, "update:modelValue", $event => (_ctx.model = $event))
|
_on(n1, "update:modelValue", () => $event => (_ctx.model = $event))
|
||||||
return n1
|
return n1
|
||||||
}"
|
}"
|
||||||
`;
|
`;
|
||||||
|
@ -79,7 +79,7 @@ const t0 = _template("<input type=\\"text\\">")
|
||||||
export function render(_ctx) {
|
export function render(_ctx) {
|
||||||
const n1 = t0()
|
const n1 = t0()
|
||||||
_withDirectives(n1, [[_vModelText, () => _ctx.model]])
|
_withDirectives(n1, [[_vModelText, () => _ctx.model]])
|
||||||
_on(n1, "update:modelValue", $event => (_ctx.model = $event))
|
_on(n1, "update:modelValue", () => $event => (_ctx.model = $event))
|
||||||
return n1
|
return n1
|
||||||
}"
|
}"
|
||||||
`;
|
`;
|
||||||
|
@ -91,7 +91,7 @@ const t0 = _template("<select></select>")
|
||||||
export function render(_ctx) {
|
export function render(_ctx) {
|
||||||
const n1 = t0()
|
const n1 = t0()
|
||||||
_withDirectives(n1, [[_vModelSelect, () => _ctx.model]])
|
_withDirectives(n1, [[_vModelSelect, () => _ctx.model]])
|
||||||
_on(n1, "update:modelValue", $event => (_ctx.model = $event))
|
_on(n1, "update:modelValue", () => $event => (_ctx.model = $event))
|
||||||
return n1
|
return n1
|
||||||
}"
|
}"
|
||||||
`;
|
`;
|
||||||
|
@ -103,7 +103,7 @@ const t0 = _template("<input>")
|
||||||
export function render(_ctx) {
|
export function render(_ctx) {
|
||||||
const n1 = t0()
|
const n1 = t0()
|
||||||
_withDirectives(n1, [[_vModelText, () => _ctx.model]])
|
_withDirectives(n1, [[_vModelText, () => _ctx.model]])
|
||||||
_on(n1, "update:modelValue", $event => (_ctx.model = $event))
|
_on(n1, "update:modelValue", () => $event => (_ctx.model = $event))
|
||||||
return n1
|
return n1
|
||||||
}"
|
}"
|
||||||
`;
|
`;
|
||||||
|
@ -115,7 +115,7 @@ const t0 = _template("<textarea></textarea>")
|
||||||
export function render(_ctx) {
|
export function render(_ctx) {
|
||||||
const n1 = t0()
|
const n1 = t0()
|
||||||
_withDirectives(n1, [[_vModelText, () => _ctx.model]])
|
_withDirectives(n1, [[_vModelText, () => _ctx.model]])
|
||||||
_on(n1, "update:modelValue", $event => (_ctx.model = $event))
|
_on(n1, "update:modelValue", () => $event => (_ctx.model = $event))
|
||||||
return n1
|
return n1
|
||||||
}"
|
}"
|
||||||
`;
|
`;
|
||||||
|
@ -127,7 +127,7 @@ const t0 = _template("<input>")
|
||||||
export function render(_ctx) {
|
export function render(_ctx) {
|
||||||
const n1 = t0()
|
const n1 = t0()
|
||||||
_withDirectives(n1, [[_vModelDynamic, () => _ctx.model]])
|
_withDirectives(n1, [[_vModelDynamic, () => _ctx.model]])
|
||||||
_on(n1, "update:modelValue", $event => (_ctx.model = $event))
|
_on(n1, "update:modelValue", () => $event => (_ctx.model = $event))
|
||||||
_renderEffect(() => _setDynamicProps(n1, _ctx.obj))
|
_renderEffect(() => _setDynamicProps(n1, _ctx.obj))
|
||||||
return n1
|
return n1
|
||||||
}"
|
}"
|
||||||
|
@ -140,7 +140,7 @@ const t0 = _template("<input>")
|
||||||
export function render(_ctx) {
|
export function render(_ctx) {
|
||||||
const n1 = t0()
|
const n1 = t0()
|
||||||
_withDirectives(n1, [[_vModelDynamic, () => _ctx.model]])
|
_withDirectives(n1, [[_vModelDynamic, () => _ctx.model]])
|
||||||
_on(n1, "update:modelValue", $event => (_ctx.model = $event))
|
_on(n1, "update:modelValue", () => $event => (_ctx.model = $event))
|
||||||
return n1
|
return n1
|
||||||
}"
|
}"
|
||||||
`;
|
`;
|
||||||
|
|
|
@ -18,7 +18,7 @@ export function genSetModelValue(
|
||||||
? [JSON.stringify(`update:${camelize(oper.key.content)}`)]
|
? [JSON.stringify(`update:${camelize(oper.key.content)}`)]
|
||||||
: ['`update:${', ...genExpression(oper.key, context), '}`']
|
: ['`update:${', ...genExpression(oper.key, context), '}`']
|
||||||
const handler = [
|
const handler = [
|
||||||
(isTS ? `($event: any)` : `$event`) + ' => (',
|
`() => ${isTS ? `($event: any)` : `$event`} => (`,
|
||||||
...genExpression(oper.value, context, '$event'),
|
...genExpression(oper.value, context, '$event'),
|
||||||
')',
|
')',
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue