vue-codemirror icon indicating copy to clipboard operation
vue-codemirror copied to clipboard

v-model not working properly on vue-compat

Open lqbach opened this issue 2 years ago • 1 comments

Describe the bug

v-model is not properly working on vue-compat build. The modelValue prop is not being passed properly to the component, and as a result the default line is empty. Here is a CodeSandbox example for reference. Maybe there should be extra compatibility configurations that need to be added to get it to work?

Reproduction

CodeSandbox Example

Currently running project on vue/compat build with Vite.

System Info

System:
    OS: Linux 5.15 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
    CPU: (2) x64 AMD EPYC
    Memory: 600.43 MB / 1.63 GB
    Container: Yes
    Shell: 5.1.4 - /bin/bash
  Binaries:
    Node: 16.17.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 8.15.0 - /usr/local/bin/npm
    Watchman: 20220528.183901.0 - /usr/local/bin/watchman
  npmPackages:
    @codemirror/lang-javascript: ^6.1.4 => 6.1.4 
    @codemirror/lang-sql: ^6.4.0 => 6.4.0 
    @popperjs/core: ^2.11.6 => 2.11.6 
    @vitejs/plugin-legacy: ^1.6.4 => 1.8.2 
    @vitejs/plugin-vue: ^1.2.2 => 1.10.2 
    @vue-flow/core: ^1.15.2 => 1.15.2 
    @vue/compat: ^3.2.47 => 3.2.47 
    @vue/compiler-sfc: ^3.1.0 => 3.2.47 
    @vue/runtime-dom: latest => 3.2.47 
    codemirror: ^6.0.1 => 6.0.1 
    sass: ^1.49.0 => 1.58.3 
    vite: ^2.8.3 => 2.9.15 
    vite-plugin-compression: ^0.4.0 => 0.4.0 
    vue: ^3.2.45 => 3.2.47 
    vue-codemirror: ^6.1.1 => 6.1.1

Used Package Manager

npm

Validations

  • [X] Read the the documentation in detail.
  • [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • [X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
  • [X] The provided reproduction is a minimal reproducible example of the bug.

lqbach avatar Mar 07 '23 17:03 lqbach

Facing the same issue of code-mirror not picking the value from v-model (not using vue-compact)

jjoshi-cb avatar May 09 '23 07:05 jjoshi-cb