fix: 验证码重置
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user