write(ui): 对话框填满 + 🎙/发送按钮浮在 textarea 框内右下
deploy write / build-and-deploy (push) Successful in 1m26s
deploy write / build-and-deploy (push) Successful in 1m26s
- input-row 改 position: relative + flex:1 撑满 input-bar 高度 - textarea width/height 100% 填满,右/下加 padding (130px / 14px) 给按钮腾位 - btn-tray absolute right:8 bottom:8,pointer-events: none 让 textarea 仍可点 - 按钮 height 40→32 更紧凑
This commit is contained in:
@@ -340,18 +340,20 @@ onMounted(() => {
|
||||
:disabled="busy || activeId === null"
|
||||
@keydown="onInputKeydown"
|
||||
></textarea>
|
||||
<button
|
||||
class="btn mic"
|
||||
:class="{ on: recording }"
|
||||
:disabled="busy || activeId === null"
|
||||
@click="toggleMic"
|
||||
:title="recording ? '停止录音' : '开始语音输入'"
|
||||
>{{ recording ? '◼' : '🎙' }}</button>
|
||||
<button
|
||||
class="btn primary"
|
||||
:disabled="busy || !inputText.trim() || activeId === null"
|
||||
@click="sendMessage"
|
||||
>发送</button>
|
||||
<div class="btn-tray">
|
||||
<button
|
||||
class="btn mic"
|
||||
:class="{ on: recording }"
|
||||
:disabled="busy || activeId === null"
|
||||
@click="toggleMic"
|
||||
:title="recording ? '停止录音' : '开始语音输入'"
|
||||
>{{ recording ? '◼' : '🎙' }}</button>
|
||||
<button
|
||||
class="btn primary"
|
||||
:disabled="busy || !inputText.trim() || activeId === null"
|
||||
@click="sendMessage"
|
||||
>发送</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="status" :class="{ err: statusErr }">{{ status }}</div>
|
||||
</div>
|
||||
|
||||
@@ -210,40 +210,61 @@ textarea, input { font: inherit; }
|
||||
background: var(--bg-elev);
|
||||
border-top: 1px solid var(--border-soft);
|
||||
padding: 10px 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
}
|
||||
.input-row {
|
||||
flex: 1;
|
||||
position: relative;
|
||||
min-height: 0;
|
||||
}
|
||||
.input-row { display: flex; gap: 8px; align-items: flex-end; min-width: 0; }
|
||||
.input-row textarea {
|
||||
flex: 1 1 0;
|
||||
min-width: 0;
|
||||
min-height: 40px;
|
||||
max-height: 100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
/* 右 + 下 padding 给悬浮按钮腾空间,文字不会爬到按钮下 */
|
||||
padding: 11px 130px 14px 14px;
|
||||
resize: none;
|
||||
padding: 9px 12px;
|
||||
border: 1px solid var(--border);
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
border-radius: 8px;
|
||||
border-radius: 10px;
|
||||
outline: none;
|
||||
font-size: 14px;
|
||||
line-height: 1.4;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.input-row textarea::placeholder { color: var(--text-mute); }
|
||||
.input-row textarea:focus { border-color: var(--accent-strong); }
|
||||
.input-row textarea:disabled { opacity: 0.6; }
|
||||
|
||||
/* 悬浮在 textarea 框线内右下 */
|
||||
.btn-tray {
|
||||
position: absolute;
|
||||
right: 8px;
|
||||
bottom: 8px;
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
pointer-events: none; /* 让 textarea 仍接受点击右下空白处定位光标 */
|
||||
}
|
||||
.btn-tray > * { pointer-events: auto; }
|
||||
|
||||
.btn {
|
||||
height: 40px;
|
||||
height: 32px;
|
||||
padding: 0 14px;
|
||||
border-radius: 8px;
|
||||
border-radius: 7px;
|
||||
border: 1px solid var(--border);
|
||||
background: var(--bg-elev);
|
||||
color: var(--text-dim);
|
||||
font-size: 14px;
|
||||
font-size: 13px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.btn:hover { background: var(--bg-hover); color: var(--text); }
|
||||
.btn.primary { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
|
||||
.btn.primary { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; font-weight: 600; }
|
||||
.btn.primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
|
||||
.btn.primary:disabled { background: var(--bg-card); border-color: var(--border); color: var(--text-mute); cursor: not-allowed; }
|
||||
.btn.mic { width: 44px; padding: 0; }
|
||||
.btn.mic { width: 36px; padding: 0; }
|
||||
.btn.mic.on { background: var(--accent-red); border-color: var(--accent-red); color: #fff; }
|
||||
|
||||
.status {
|
||||
|
||||
Reference in New Issue
Block a user