No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    How to get suffix value from <q-input>?

    Framework
    2
    3
    2038
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tindecken last edited by

      I want to get @gmail.com suffix for my console.log(), how can i do it?
      image

      Many thanks.

      1 Reply Last reply Reply Quote 0
      • L
        lvaylet last edited by lvaylet

        Untested, but should work:

        <template>
          <q-input type="email" v-model="email" float-label="Email" :suffix="suffix" clearable />
        </template>
        
        <script>
        export default {
          data () {
            return {
              email: '',
              suffix: '@gmail.com'    
            }
          },
          methods: {
            login: function (event) {
              console.log(this.email + this.suffix + ':' + this.password)
            }
          }
        }
        </script>
        

        Vue.js is data-centric, so it makes sense to define your settings in data() and bind to them. On top of that, you get reactivity out of the box and your suffix is dynamic.

        1 Reply Last reply Reply Quote 2
        • T
          tindecken last edited by

          yes, it worked, thank you 🙂

          1 Reply Last reply Reply Quote 0
          • First post
            Last post