Skip to content

Commit 2b9b78f

Browse files
committed
fix: review suggestion
1 parent e93141b commit 2b9b78f

File tree

1 file changed

+9
-8
lines changed
  • packages/components/src/sender-compat

1 file changed

+9
-8
lines changed

packages/components/src/sender-compat/index.vue

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -226,19 +226,19 @@ defineExpose({
226226

227227
<!-- 映射 actions -> actions-inline -->
228228
<template #actions-inline="slotProps">
229-
<!-- 根据 allowFiles 自动注入 -->
229+
<!-- 单行模式:根据 allowFiles 自动注入 -->
230230
<UploadButton
231-
v-if="allowFiles"
231+
v-if="allowFiles && mode === 'single'"
232232
v-bind="{
233233
...buttonGroup?.file,
234234
tooltip: buttonGroup?.file?.tooltips,
235235
}"
236236
@select="handleFilesSelected"
237237
/>
238238

239-
<!-- 根据 allowSpeech 自动注入 -->
239+
<!-- 单行模式:根据 allowSpeech 自动注入 -->
240240
<VoiceButton
241-
v-if="allowSpeech"
241+
v-if="allowSpeech && mode === 'single'"
242242
ref="voiceRef"
243243
:speech-config="voiceConfig"
244244
:icon="buttonGroup?.voice?.icon"
@@ -262,19 +262,20 @@ defineExpose({
262262
<template #footer-right="slotProps">
263263
<slot v-if="$slots['footer-right']" name="footer-right" v-bind="slotProps" />
264264

265-
<!-- 根据 allowFiles 自动注入 -->
265+
<!-- 多行模式:根据 allowFiles 自动注入 -->
266266
<UploadButton
267-
v-if="allowFiles"
267+
v-if="allowFiles && mode === 'multiple'"
268268
v-bind="{
269269
...buttonGroup?.file,
270270
tooltip: buttonGroup?.file?.tooltips,
271271
}"
272272
@select="handleFilesSelected"
273273
/>
274274

275-
<!-- 根据 allowSpeech 自动注入 -->
275+
<!-- 多行模式:根据 allowSpeech 自动注入 -->
276276
<VoiceButton
277-
v-if="allowSpeech"
277+
v-if="allowSpeech && mode === 'multiple'"
278+
ref="voiceRef"
278279
:speech-config="voiceConfig"
279280
:icon="buttonGroup?.voice?.icon"
280281
@speech-start="handleSpeechStart"

0 commit comments

Comments
 (0)