pull/209/head
xingyu4j 2025-09-03 14:58:59 +08:00
commit 25468bece5
2 changed files with 4 additions and 10 deletions

View File

@ -59,9 +59,9 @@ function handleComplete(e: string[]) {
async function handleSend(e: Event) { async function handleSend(e: Event) {
try { try {
e?.preventDefault(); e?.preventDefault();
await handleSendCode();
countdown.value = maxTime; countdown.value = maxTime;
startCountdown(); startCountdown();
await handleSendCode();
} catch (error) { } catch (error) {
console.error('Failed to send code:', error); console.error('Failed to send code:', error);
// Consider emitting an error event or showing a notification // Consider emitting an error event or showing a notification

View File

@ -27,7 +27,7 @@ const docRef = useTemplateRef<HTMLDivElement>('docRef');
const contentStyle = computed<StyleValue>(() => { const contentStyle = computed<StyleValue>(() => {
if (autoContentHeight) { if (autoContentHeight) {
return { return {
height: `calc(var(${CSS_VARIABLE_LAYOUT_CONTENT_HEIGHT}) - ${headerHeight.value}px - ${docHeight.value}px - ${typeof heightOffset === 'number' ? `${heightOffset}px` : heightOffset})`, height: `calc(var(${CSS_VARIABLE_LAYOUT_CONTENT_HEIGHT}) - ${headerHeight.value}px - ${footerHeight.value}px - ${docHeight.value}px - ${typeof heightOffset === 'number' ? `${heightOffset}px` : heightOffset})`,
overflowY: shouldAutoHeight.value ? 'auto' : 'unset', overflowY: shouldAutoHeight.value ? 'auto' : 'unset',
}; };
} }
@ -57,7 +57,7 @@ onMounted(() => {
</script> </script>
<template> <template>
<div class="relative"> <div class="relative flex min-h-full flex-col">
<div <div
v-if="$slots.doc && isDocAlertEnable()" v-if="$slots.doc && isDocAlertEnable()"
ref="docRef" ref="docRef"
@ -110,16 +110,10 @@ onMounted(() => {
<div :class="cn('h-full p-4', contentClass)" :style="contentStyle"> <div :class="cn('h-full p-4', contentClass)" :style="contentStyle">
<slot></slot> <slot></slot>
</div> </div>
<div <div
v-if="$slots.footer" v-if="$slots.footer"
ref="footerRef" ref="footerRef"
:class=" :class="cn('bg-card align-center flex px-6 py-4', footerClass)"
cn(
'bg-card align-center absolute bottom-0 left-0 right-0 flex px-6 py-4',
footerClass,
)
"
> >
<slot name="footer"></slot> <slot name="footer"></slot>
</div> </div>