fix: 验证码重置

This commit is contained in:
zhangyh
2025-10-22 14:33:45 +08:00
parent 42c5551a93
commit ac5abc454d

View File

@@ -54,9 +54,9 @@ const emit = defineEmits(['nextStep'])
const loading = ref(false)
const timeout = ref(null)
const inputRefs = ref([])
const getCtData = ref([...props.ct])
// Computed
const getCtData = computed(() => props.ct)
const ctSize = computed(() => getCtData.value.length)
const cIndex = computed(() => {
let i = getCtData.value.findIndex((item) => item === '')
@@ -199,7 +199,7 @@ const onKeydown = (e, index) => {
const reset = () => {
// 重置。一般是验证码错误时触发。
getCtData.value = getCtData.value.map((item) => '')
getCtData.value = ['', '', '', '', '']
resetCaret()
}