Skip to content

Commit 4493d14

Browse files
committed
fix: 修复v1.1.4Bubble宽度问题,修复sender组件底部不触发聚焦事件问题
1 parent 55dbe0b commit 4493d14

File tree

7 files changed

+16
-11
lines changed

7 files changed

+16
-11
lines changed

apps/playground/src/components/BubbleDemo.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<!-- home 首页-使用 Bubble 组件 -->
22
<script setup lang="ts">
33
import { DocumentCopy, Refresh, Search, Star } from '@element-plus/icons-vue'
4-
import Bubble from 'vue-element-plus-x/src/components/Bubble/index.vue'
54
65
const avatar = ref(
76
'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png',

packages/components/src/components/Bubble/index.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,6 @@ defineExpose(instance)
288288
box-sizing: border-box;
289289
min-width: 0;
290290
max-width: var(--bubble-content-max-width);
291-
width: 100%;
292291
color: var(--el-text-color-primary);
293292
font-size: var(--el-font-size-base);
294293
line-height: var(--el-font-line-height-primary);

packages/components/src/components/BubbleList/index.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const props = withDefaults(defineProps<BubbleListProps<T>>(), {
1919
},
2020
btnLoading: true,
2121
btnColor: '#409EFF',
22+
btnIconSize: 24,
2223
})
2324
2425
const emits = defineEmits(['complete'])
@@ -226,6 +227,7 @@ defineExpose({
226227
:class="{ 'always-scrollbar': props.alwaysShowScrollbar }"
227228
:style="{
228229
'--el-bubble-list-max-height': `${maxHeight}`,
230+
'--el-bubble-list-btn-size': `${props.btnIconSize}px`,
229231
}"
230232
@scroll="handleScroll"
231233
>
@@ -389,12 +391,12 @@ defineExpose({
389391
}
390392
391393
.el-bubble-list-back-to-bottom-icon {
392-
font-size: 24px;
394+
font-size: var(--el-bubble-list-btn-size);
393395
position: relative;
394396
395397
.back-to-bottom-loading-svg-bg {
396398
position: absolute;
397-
font-size: 48px;
399+
font-size: calc(var(--el-bubble-list-btn-size) + 26px);
398400
animation: is-loading 1s infinite linear;
399401
}
400402

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export interface BubbleListProps<T extends BubbleListItemProps = BubbleListItemP
1919
backButtonPosition?: BackButtonPosition // 底部按钮位置
2020
btnLoading?: boolean
2121
btnColor?: string
22+
btnIconSize?: number
2223
// v1.1.1+ 新增 --- end
2324
}
2425

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ defineExpose({
430430

431431
<!-- 底部容器 -->
432432
<Transition name="slide">
433-
<div v-if="$slots.footer" class="el-sender-footer">
433+
<div v-if="$slots.footer" class="el-sender-footer" @mousedown="onContentMouseDown">
434434
<slot name="footer" />
435435
</div>
436436
</Transition>
@@ -582,6 +582,10 @@ defineExpose({
582582
.el-sender-prefix {
583583
flex: initial;
584584
}
585+
586+
.el-sender-action-list {
587+
margin-left: auto;
588+
}
585589
}
586590
}
587591

packages/components/src/components/Sender/index.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,11 +419,10 @@ defineExpose({
419419
ref="inputRef"
420420
v-model="internalValue"
421421
class="el-sender-input"
422-
:input-style="{
422+
:input-style="props.inputStyle || {
423423
'resize': 'none',
424424
'max-height': '176px',
425425
'max-width': inputWidth,
426-
...props.inputStyle,
427426
}"
428427
:rows="1"
429428
:autosize="autoSize"
@@ -497,7 +496,7 @@ defineExpose({
497496

498497
<!-- 底部容器 -->
499498
<Transition name="slide">
500-
<div v-if="$slots.footer" class="el-sender-footer">
499+
<div v-if="$slots.footer" class="el-sender-footer" @mousedown="onContentMouseDown">
501500
<slot name="footer" />
502501
</div>
503502
</Transition>
@@ -661,6 +660,10 @@ defineExpose({
661660
.el-sender-prefix {
662661
flex: initial;
663662
}
663+
664+
.el-sender-action-list {
665+
margin-left: auto;
666+
}
664667
}
665668
}
666669

packages/components/src/components/Typewriter/index.vue

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,6 @@ defineExpose(instance)
274274
<style scoped lang="scss">
275275
/* Markdown基础样式 */
276276
.markdown-content :deep(ul) { list-style-type: disc; }
277-
.markdown-body {
278-
width: 100%; // 修复 md 格式宽度问题
279-
}
280277
// 新增 md 雾化效果
281278
// 添加对 h1-h6, ol, ul 的特殊处理
282279
.typing-markdown-cursor-foggy,.typing-cursor-foggy {

0 commit comments

Comments
 (0)