0

这里我有 2 个名字,名字和姓氏。如何使用名字和姓氏自动生成不同的名称(例如:firstname.lastname 或 firstname_lastname)

<q-input name="firstname" v-model="first" float-label="First name"
 v-validate="'required|alpha_spaces'" clearable/>
            <i v-show="errors.has('firstname')" class="fa fa-warning "></i>
            <div class="containerError">   
               <span v-show="errors.has('firstname')" class="text-negative text-right">{{ errors.first('firstname') }}</span>
            </div>

<q-input name="lastname" required="required" v-model="last" float-label="Last name" v-validate="'required|alpha_spaces'" clearable />
            <i v-show="errors.has('lasttname')" class="fa fa-warning "></i>
            <div class="containerError">    <span v-show="errors.has('lastname')" class="text-negative text-right">{{ errors.first('lastname') }}</span>
            </div>
4

1 回答 1

0
<template>
            <div v-if="this.last != ''"  float-label="fullname">
            User-name :{ {this.first}}.{{this.last}}  
            </div>
</template>
于 2017-10-18T08:44:16.073 回答