Skip to content

Vue 2 support ? #273

@IndexXuan

Description

@IndexXuan

Thanks for this great plugin/lsp.
the document said when you install @vue/runtime-dom, volar/vue-tsc support Vue 2, is it really that smooth ?

I create a Vue 2 app with @vue/composition-api by vue-cli, and the first step is v-model handler.
Vue 2 v-model means props.value + emit input & Vue 3 is modelValue + emit onUpdate:modelValue, how volar handle this different ?

repro link: https://github.com/IndexXuan/vue2-volar-test-app/blob/master/src/views/Home.vue#L9
when I have a v-input component

  props: {
    value: {
      type:  String,
      required: true,
    }
  }

when I use this v-input on parent component

<v-input v-model="xxx" />

It will ends up with error.

image
image

Also there are some template key warning(Vue 2 should place key at child), not big problem.

Thanks for you help.

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