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.fails('plain elements with argument', () => {
|
||||
test('plain elements with argument', () => {
|
||||
const onError = vi.fn()
|
||||
compileWithVModel('<input v-model:value="model" />', { onError })
|
||||
|
||||
|
|
|
@ -65,6 +65,7 @@ export const transformVModel: DirectiveTransform = (dir, node, context) => {
|
|||
let runtimeDirective: VaporHelper | undefined
|
||||
|
||||
if (isComponent) {
|
||||
} else {
|
||||
if (dir.arg)
|
||||
context.options.onError(
|
||||
createDOMCompilerError(
|
||||
|
@ -72,7 +73,6 @@ export const transformVModel: DirectiveTransform = (dir, node, context) => {
|
|||
dir.arg.loc,
|
||||
),
|
||||
)
|
||||
} else {
|
||||
const { tag } = node
|
||||
const isCustomElement = context.options.isCustomElement(tag)
|
||||
runtimeDirective = 'vModelText'
|
||||
|
|
Loading…
Reference in New Issue