Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not get v-model value #149

Closed
15926524 opened this issue Jun 10, 2023 · 3 comments
Closed

can not get v-model value #149

15926524 opened this issue Jun 10, 2023 · 3 comments

Comments

@15926524
Copy link

Hello,
I'm using vue-at with Quasar framework with vue and vue-at versions bellow:

  • vue: 3.0.0,
  • vue-at: 3.0.0-alpha.2

but i cannot get the v-model value with this code:

<template>
  <at :members="members" v-model="atText">
    <div :contenteditable="true"></div>
  </at>
  <at-ta :members="members" v-model="atTaText">
    <textarea v-model="textA"></textarea>
  </at-ta>
  <p>{{ members }}</p>
  <p>{{ atText }}</p>         // ← Never changed TODO:
  <p>{{ atTaText }}</p>       // ← Never changed TODO:
  <p>{{ textA }}</p>          // ← will change TODO:
</template>

<script>
import At from 'vue-at' // for content-editable
import AtTa from 'vue-at/dist/vue-at-textarea' // for textarea

export default {
  components: { At, AtTa },
  data () {
    return {
      members: ['Roxie Miles', 'grace.carroll', 'Allen'],
      atText: "atat",
      atTaText:"tata",
      textA:"textA"
    }
  }
}
</script>

can you give me any suggestions? Thanks!

@15926524
Copy link
Author

I realized I used the wrong syntax. I should have used v-model:value. The corrisponde example is in the branch "wip-vue3", file "app.vue".

ps. can u update the project documentation? I noticed that the project documentation is still the vue2 version, or at least can u mark the version used in the documentation? Thanks!

@fritx
Copy link
Owner

fritx commented Jun 12, 2023

@15926524 you are right, the current entry of vue3 documentation is not obvious, which needs to be improved.

for Vue3, read this one instead.

image

@fritx
Copy link
Owner

fritx commented Jun 12, 2023

Also see: #148 (comment)

For Quasar q-input, this should work:

<at-ta :members="members">
  <q-input
    v-model="name"
    type="textarea"
    :rows="1"
    :autogrow="false"
    resize="none"
  />
</at-ta>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants