这里我有两个名字,名字和名字姓。如何使用名字和姓氏自动生成不同的名称 (例如: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>
答案 0 :(得分:0)
<template>
<div v-if="this.last != ''" float-label="fullname">
User-name :{ {this.first}}.{{this.last}}
</div>
</template>