mirror of https://github.com/vuejs/core.git
fix(compiler-vapor): v-model argument on native element
This commit is contained in:
parent
75488653d3
commit
af1581be28
|
@ -91,8 +91,7 @@ describe('compiler: vModel transform', () => {
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
// TODO: component
|
test('plain elements with argument', () => {
|
||||||
test.fails('plain elements with argument', () => {
|
|
||||||
const onError = vi.fn()
|
const onError = vi.fn()
|
||||||
compileWithVModel('<input v-model:value="model" />', { onError })
|
compileWithVModel('<input v-model:value="model" />', { onError })
|
||||||
|
|
||||||
|
|
|
@ -65,6 +65,7 @@ export const transformVModel: DirectiveTransform = (dir, node, context) => {
|
||||||
let runtimeDirective: VaporHelper | undefined
|
let runtimeDirective: VaporHelper | undefined
|
||||||
|
|
||||||
if (isComponent) {
|
if (isComponent) {
|
||||||
|
} else {
|
||||||
if (dir.arg)
|
if (dir.arg)
|
||||||
context.options.onError(
|
context.options.onError(
|
||||||
createDOMCompilerError(
|
createDOMCompilerError(
|
||||||
|
@ -72,7 +73,6 @@ export const transformVModel: DirectiveTransform = (dir, node, context) => {
|
||||||
dir.arg.loc,
|
dir.arg.loc,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
} else {
|
|
||||||
const { tag } = node
|
const { tag } = node
|
||||||
const isCustomElement = context.options.isCustomElement(tag)
|
const isCustomElement = context.options.isCustomElement(tag)
|
||||||
runtimeDirective = 'vModelText'
|
runtimeDirective = 'vModelText'
|
||||||
|
|
Loading…
Reference in New Issue