效果图
直接上代码
直接封装成一个组件,哪里需要就直接调用就可以了
<template>
<div class="am-payPwd" :id="`ids_${id}`">
<input
type="password"
readonly
onfocus="this.removeAttribute('readonly');"
maxlength="1"
autocomplete="new-password"
@input="changeInput"
@click="changePwd"
v-model="pwdList[i]"
@keyup="keyUp($event)"
@keydown="oldPwdList = pwdList.length"
class="shortInput"
v-for="(v, i) in 6"
:key="i"
/>
</div>
</template>
<script>
export defa