vux框架的v-input清空按钮不起作用
作者:互联网
欢迎扫码加群,一起讨论,共同学习成长!
公司之前的项目,改几个bug,发现vux真的不好用,建议最好别用
1 <group label-width="4em" label-align="right"> 2 <div class="warpper"> 3 <span>账号</span> 4 <x-input v-model="loginForm.username" ref="userInput" :show-clear="false" placeholder="请输入工号或手机号码"> 5 <span slot="right"> 6 <x-icon v-show="loginForm.username.length > 0" type="ios-close" size="18" @click.native="()=>{ $refs['userInput'].reset() }"></x-icon> 7 </span> 8 </x-input> 9 </div> 10 <div class="warpper"> 11 <span>密码</span> 12 <x-input type="password" v-model="loginForm.password" ref="passInput" :show-clear="false" placeholder="请输入密码"> 13 <span slot="right"> 14 <x-icon v-show="loginForm.password.length > 0" type="ios-close" size="18" @click.native="()=>{ $refs['passInput'].reset() }"></x-icon> 15 </span> 16 </x-input> 17 </div> 18 </group>
标签:18,refs,清空,input,close,native,click,vux,size 来源: https://www.cnblogs.com/CinderellaStory/p/12036786.html