场景:PC端
样式:
<div class="verification-code-input">
<input v-model="code[index]" v-for="(_, index) in 5" :key="index" type="text" maxlength="1" @input="handleInput(index)" :ref="'inputRefs' + index" class="input-item">
</div>
函数:
数据: code: ['', '', '', '', '', ''],
handleInput(index) {
// 限制每个input只能输入一个字符
// 这里还可以添加其他逻辑,比如验证码格式验证
const value = this.code[index];
if (value.length === 1 && index < 4) {





![[图解]SysML和EA建模住宅安全系统-07 to be块定义图](https://img-blog.csdnimg.cn/direct/d76adea83b95430885319376f57ed17b.png)











![[数据集][目标检测]吸烟检测数据集VOC+YOLO格式1449张1类别](https://img-blog.csdnimg.cn/direct/c353ce0b542d4fde893a9846da4809b8.png)


