Skip to content

Commit 2f52b96

Browse files
author
何嘉悦
committed
fix: 修复MentionSender的样式继承属性
1 parent 4493d14 commit 2f52b96

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

packages/components/src/components/MentionSender/index.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
import type { MentionOption, SenderProps } from './types.d.ts'
2+
import type { MentionOption, MentionSenderProps } from './types.d.ts'
33
import {
44
ClearButton,
55
LoadingButton,
@@ -8,7 +8,7 @@ import {
88
SpeechLoadingButton,
99
} from './components'
1010
11-
const props = withDefaults(defineProps<SenderProps>(), {
11+
const props = withDefaults(defineProps<MentionSenderProps>(), {
1212
placeholder: '请输入内容',
1313
autoSize: () => ({
1414
minRows: 1,
@@ -325,11 +325,10 @@ defineExpose({
325325
ref="inputRef"
326326
v-model="internalValue"
327327
class="el-sender-input"
328-
:input-style="{
328+
:input-style="props.inputStyle || {
329329
'resize': 'none',
330330
'max-height': '176px',
331331
'max-width': inputWidth,
332-
...props.inputStyle,
333332
}"
334333
:rows="1"
335334
:autosize="autoSize"

packages/components/src/components/MentionSender/types.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export interface MentionOption {
55
[key: string]: any
66
}
77

8-
export interface SenderProps {
8+
export interface MentionSenderProps {
99
modelValue?: string
1010
placeholder?: string
1111
autoSize?: {
@@ -20,7 +20,7 @@ export interface SenderProps {
2020
submitType?: 'enter' | 'shiftEnter'
2121
headerAnimationTimer?: number
2222
inputWidth?: string
23-
23+
2424
// 变体属性
2525
variant?: 'default' | 'updown'
2626
showUpdown?: boolean

0 commit comments

Comments
 (0)