Skip to content

[Question] v-models 的值怎么使用变量 #502

@hsiangleev

Description

@hsiangleev

请问v-models的值怎么使用变量,models的值由多个变量组合,例如

const name = ref('')
const age = ref(0)
const models = []
models.push([name.value, 'name'])
models.push([age.value, 'age', ['number']])
return () => (
    <Test v-models={models} />
)

我这样使用会报错Internal server error: unknown: Property key of ObjectProperty expected node to be of a type ["Identifier","StringLiteral","NumericLiteral"] but instead got undefined

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions