简体   繁体   中英

How can i autofill with v-text-field

I am making a form where I need one of the fields to autofill with the other fields for example:

                <v-col cols="12" sm="6" md="6">
                  <v-text-field label="code" required  v-model='meeting.code'></v-text-field>
                </v-col>
                <v-col cols="12" sm="6" md="6">
                  <v-text-field label="password" required v-model='meeting.password'></v-text-field>
                </v-col>                                                                           
                <v-col cols="12" sm="6" md="6">
                  <v-text-field label="Url" required v-model="url"></v-text-field>
                </v-col> 
                 url=https://meeting.com/+"this.meeting.code"+/+"this.meeting.password"+

I need the code and password variables to be part of the link in this

You can use a computed property for that:

computed: {
  url() {
    const { code, password } = this.meeting
    return `https://meeting.com/${code}/${password}`
  }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM