@@ -75,13 +75,6 @@ const sendTextMessage = () => {
75
75
messageText .value = ' '
76
76
// 重置状态
77
77
isTyping .value = false
78
-
79
- // 重置输入框高度
80
- nextTick (() => {
81
- if (messageInput .value ) {
82
- messageInput .value .style .height = ' auto'
83
- }
84
- })
85
78
}
86
79
87
80
// 保存消息到历史记录
@@ -147,8 +140,8 @@ const handleInput = () => {
147
140
const autoResizeTextarea = () => {
148
141
if (! messageInput .value ) return
149
142
150
- messageInput . value . style . height = ' auto '
151
- messageInput . value . style . height = ` ${ Math . min ( messageInput . value . scrollHeight , 120 ) } px `
143
+ // 不再调整高度,只处理输入事件
144
+ // 高度已固定,只需确保滚动条正常工作
152
145
}
153
146
154
147
// 处理按键事件
@@ -411,7 +404,7 @@ onUnmounted(() => {
411
404
position : relative ;
412
405
background-color : var (--ios-bg-primary );
413
406
border-top : 1px solid var (--ios-border-color );
414
- padding : 8 px 12px ;
407
+ padding : 10 px 12px ;
415
408
display : flex ;
416
409
flex-direction : column ;
417
410
box-sizing : border-box ;
@@ -420,7 +413,7 @@ onUnmounted(() => {
420
413
/* 表情包和图标工具栏 */
421
414
.icons-toolbar {
422
415
width : 100% ;
423
- margin-bottom : 8 px ;
416
+ margin-bottom : 10 px ;
424
417
}
425
418
426
419
.icons-group {
@@ -466,37 +459,17 @@ onUnmounted(() => {
466
459
position : relative ;
467
460
}
468
461
469
- .input-container ::after {
470
- content : " 可拖动调整高度" ;
471
- position : absolute ;
472
- right : 8px ;
473
- bottom : 4px ;
474
- font-size : 10px ;
475
- color : var (--ios-text-tertiary );
476
- opacity : 0.6 ;
477
- pointer-events : none ;
478
- transition : opacity 0.3s ease ;
479
- background-color : rgba (255 , 255 , 255 , 0.7 );
480
- padding : 1px 3px ;
481
- border-radius : 3px ;
482
- }
483
-
484
- .input-container :hover ::after {
485
- opacity : 1 ;
486
- }
487
-
488
462
.message-input {
489
463
width : 100% ;
490
- min-height : 36px ;
491
- max-height : 120px ;
492
- padding : 8px 12px 18px 12px ;
464
+ height : 120px ;
465
+ padding : 12px 15px ;
493
466
border-radius : 18px ;
494
467
background-color : var (--ios-bg-tertiary );
495
468
border : 1px solid var (--ios-border-color );
496
469
outline : none ;
497
- resize : vertical ;
498
- font-size : 14 px ;
499
- line-height : 1.4 ;
470
+ resize : none ;
471
+ font-size : 15 px ;
472
+ line-height : 1.5 ;
500
473
color : var (--ios-text-primary );
501
474
overflow-y : auto ;
502
475
transition : all 0.2s ease ;
@@ -528,9 +501,9 @@ onUnmounted(() => {
528
501
}
529
502
530
503
.send-button {
531
- width : 36 px ;
532
- height : 36 px ;
533
- min-width : 36 px ;
504
+ width : 40 px ;
505
+ height : 40 px ;
506
+ min-width : 40 px ;
534
507
border-radius : 50% ;
535
508
display : flex ;
536
509
align-items : center ;
@@ -543,7 +516,7 @@ onUnmounted(() => {
543
516
opacity : 0.5 ;
544
517
pointer-events : none ;
545
518
box-shadow : 0 1px 3px rgba (0 , 0 , 0 , 0.2 );
546
- margin-bottom : 1 px ;
519
+ margin-bottom : 10 px ;
547
520
}
548
521
549
522
.send-button.active {
@@ -559,7 +532,7 @@ onUnmounted(() => {
559
532
/* 表情选择器 */
560
533
.emoji-picker {
561
534
position : absolute ;
562
- top : 46 px ;
535
+ top : 50 px ;
563
536
left : 12px ;
564
537
background-color : var (--ios-bg-primary );
565
538
border-radius : 12px ;
@@ -617,7 +590,7 @@ onUnmounted(() => {
617
590
/* 历史记录面板 */
618
591
.history-panel {
619
592
position : absolute ;
620
- top : 46 px ;
593
+ top : 50 px ;
621
594
left : 50px ;
622
595
background-color : var (--ios-bg-primary );
623
596
border-radius : 12px ;
@@ -727,11 +700,11 @@ onUnmounted(() => {
727
700
/* 响应式适配 */
728
701
@media screen and (max-width : 768px ) {
729
702
.chat-input-panel {
730
- padding : 6 px 10px ;
703
+ padding : 8 px 10px ;
731
704
}
732
705
733
706
.icons-toolbar {
734
- margin-bottom : 6 px ;
707
+ margin-bottom : 8 px ;
735
708
}
736
709
737
710
.icons-group {
@@ -753,16 +726,16 @@ onUnmounted(() => {
753
726
}
754
727
755
728
.message-input {
756
- min-height : 34px ;
757
- max-height : 100px ;
758
- padding : 7px 10px 16px 10px ;
729
+ height : 50px ;
730
+ padding : 10px 12px ;
759
731
font-size : 14px ;
760
732
}
761
733
762
734
.send-button {
763
- width : 34px ;
764
- height : 34px ;
765
- min-width : 34px ;
735
+ width : 36px ;
736
+ height : 36px ;
737
+ min-width : 36px ;
738
+ margin-bottom : 7px ;
766
739
}
767
740
768
741
.send-button svg {
@@ -788,7 +761,7 @@ onUnmounted(() => {
788
761
789
762
.emoji-picker ,
790
763
.history-panel {
791
- top : 42 px ;
764
+ top : 45 px ;
792
765
max-height : 240px ;
793
766
}
794
767
}
0 commit comments