You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

78 lines
1.9 KiB

<template>
<div class="ai-strip">
<div class="ai-label"><div class="ai-pulse"></div> AI 问答</div>
<input
class="ai-input"
placeholder="问我的收藏:最近有哪些关于设计的内容?"
:value="modelValue"
@input="$emit('update:modelValue', ($event.target as HTMLInputElement).value)"
@keydown.enter="$emit('send')"
/>
<button class="ai-send" @click="$emit('send')">发送 </button>
</div>
</template>
<script setup lang="ts">
defineProps<{ modelValue: string }>();
defineEmits<{ 'update:modelValue': [value: string]; send: [] }>();
</script>
<style scoped>
.ai-strip {
padding: 10px 24px;
border-top: 1px solid var(--border);
display: flex;
align-items: center;
gap: 10px;
background: var(--bg2);
flex-shrink: 0;
}
.ai-input {
flex: 1;
background: var(--bg3);
border: 1px solid var(--border);
border-radius: 8px;
padding: 8px 12px;
color: var(--text);
font-family: var(--font-body);
font-size: 13px;
outline: none;
transition: border-color 0.2s;
}
.ai-input::placeholder { color: var(--text3); }
.ai-input:focus { border-color: rgba(200, 169, 126, 0.4); }
.ai-label {
font-size: 11px;
color: var(--accent);
font-weight: 500;
white-space: nowrap;
display: flex;
align-items: center;
gap: 4px;
}
.ai-pulse {
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--accent);
animation: pulse 2s infinite;
}
@keyframes pulse {
0%, 100% { opacity: 1; transform: scale(1); }
50% { opacity: 0.5; transform: scale(0.8); }
}
.ai-send {
padding: 8px 14px;
border-radius: 8px;
border: 1px solid rgba(200, 169, 126, 0.3);
background: var(--accent-bg);
color: var(--accent);
font-size: 12px;
font-weight: 500;
cursor: pointer;
font-family: var(--font-body);
transition: all 0.15s;
white-space: nowrap;
}
.ai-send:hover { background: rgba(200, 169, 126, 0.2); }
</style>