抽出 OpenAPI DTO;将 Ask/Report/Profile/Star 等 8 页拆到 ≤400 行,并修 ScaleSummary、fortuneKey、Scale 选答与单测。 Co-authored-by: Cursor <cursoragent@cursor.com>
83 lines
1.8 KiB
Vue
83 lines
1.8 KiB
Vue
<template>
|
|
<div class="input-bar">
|
|
<input
|
|
:value="questionInput"
|
|
type="text"
|
|
class="question-in"
|
|
placeholder="让我来解答你的问题吧"
|
|
@input="$emit('update:questionInput', ($event.target as HTMLInputElement).value)"
|
|
@keydown.enter="$emit('send')"
|
|
/>
|
|
<button type="button" class="send-btn" :disabled="drawing" aria-label="发送并抽取" @click="$emit('send')">
|
|
<span v-if="drawing" class="send-spin">…</span>
|
|
<span v-else class="send-ico" aria-hidden="true">↑</span>
|
|
</button>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
defineProps<{
|
|
questionInput: string
|
|
drawing: boolean
|
|
}>()
|
|
|
|
defineEmits<{
|
|
'update:questionInput': [value: string]
|
|
send: []
|
|
}>()
|
|
</script>
|
|
|
|
<style scoped>
|
|
.input-bar {
|
|
position: fixed;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
z-index: 20;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0));
|
|
background: rgba(255, 255, 255, 0.92);
|
|
backdrop-filter: blur(12px);
|
|
-webkit-backdrop-filter: blur(12px);
|
|
border-top: 1px solid rgba(0, 0, 0, 0.06);
|
|
box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
|
|
}
|
|
.question-in {
|
|
flex: 1;
|
|
border: 1.5px solid #eee;
|
|
border-radius: 22px;
|
|
padding: 11px 16px;
|
|
font-size: 14px;
|
|
background: #fdfaf8;
|
|
outline: none;
|
|
}
|
|
.question-in:focus {
|
|
border-color: rgba(229, 77, 66, 0.35);
|
|
}
|
|
.send-btn {
|
|
width: 40px;
|
|
height: 40px;
|
|
flex-shrink: 0;
|
|
border: none;
|
|
border-radius: 50%;
|
|
background: linear-gradient(135deg, #ff7a6e, var(--color-primary));
|
|
color: #fff;
|
|
font-size: 18px;
|
|
font-weight: 700;
|
|
cursor: pointer;
|
|
box-shadow: 0 4px 12px rgba(229, 77, 66, 0.28);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
.send-btn:disabled {
|
|
opacity: 0.6;
|
|
}
|
|
.send-ico {
|
|
line-height: 1;
|
|
margin-top: -2px;
|
|
}
|
|
</style>
|