vue-element-ui-x 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/README.md +20 -9
  2. package/components.json +13 -0
  3. package/lib/components/Attachments/index.js +987 -995
  4. package/lib/components/Bubble/index.js +10656 -10705
  5. package/lib/components/BubbleList/index.js +10951 -11038
  6. package/lib/components/Conversations/index.js +14026 -14063
  7. package/lib/components/FilesCard/index.js +606 -614
  8. package/lib/components/Prompts/index.js +457 -470
  9. package/lib/components/Sender/index.js +1701 -1678
  10. package/lib/components/Thinking/index.js +695 -703
  11. package/lib/components/ThoughtChain/index.js +25117 -25173
  12. package/lib/components/Typewriter/index.js +10247 -10302
  13. package/lib/components/Welcome/index.js +357 -370
  14. package/lib/index.common.js +1 -1
  15. package/lib/index.esm.js +1 -1
  16. package/lib/index.js +32068 -32093
  17. package/lib/index.umd.js +1 -1
  18. package/lib/mixins/index.js +61 -116
  19. package/package.json +24 -6
  20. package/src/components/Attachments/index.js +8 -8
  21. package/src/components/Bubble/index.js +6 -6
  22. package/src/components/BubbleList/index.js +8 -8
  23. package/src/components/BubbleList/src/loading.vue +75 -75
  24. package/src/components/Conversations/index.js +8 -8
  25. package/src/components/FilesCard/index.js +8 -8
  26. package/src/components/FilesCard/src/fileSvg/audio.vue +38 -38
  27. package/src/components/FilesCard/src/fileSvg/code.vue +35 -35
  28. package/src/components/FilesCard/src/fileSvg/database.vue +94 -94
  29. package/src/components/FilesCard/src/fileSvg/excel.vue +38 -38
  30. package/src/components/FilesCard/src/fileSvg/file.vue +40 -40
  31. package/src/components/FilesCard/src/fileSvg/image.vue +40 -40
  32. package/src/components/FilesCard/src/fileSvg/index.js +46 -46
  33. package/src/components/FilesCard/src/fileSvg/link.vue +54 -54
  34. package/src/components/FilesCard/src/fileSvg/mark.vue +38 -38
  35. package/src/components/FilesCard/src/fileSvg/pdf.vue +38 -38
  36. package/src/components/FilesCard/src/fileSvg/ppt.vue +38 -38
  37. package/src/components/FilesCard/src/fileSvg/three.vue +38 -38
  38. package/src/components/FilesCard/src/fileSvg/txt.vue +38 -38
  39. package/src/components/FilesCard/src/fileSvg/unknown.vue +54 -54
  40. package/src/components/FilesCard/src/fileSvg/video.vue +38 -38
  41. package/src/components/FilesCard/src/fileSvg/word.vue +38 -38
  42. package/src/components/FilesCard/src/fileSvg/zip.vue +38 -38
  43. package/src/components/FilesCard/src/main.vue +14 -12
  44. package/src/components/FilesCard/src/options.js +18 -18
  45. package/src/components/Prompts/index.js +8 -8
  46. package/src/components/Sender/index.js +8 -8
  47. package/src/components/Sender/src/components/ClearButton.vue +28 -28
  48. package/src/components/Sender/src/components/Loading.vue +53 -53
  49. package/src/components/Sender/src/components/SendButton.vue +26 -26
  50. package/src/components/Sender/src/components/SpeechButton.vue +24 -24
  51. package/src/components/Sender/src/components/SpeechLoading.vue +87 -87
  52. package/src/components/Sender/src/main.vue +47 -13
  53. package/src/components/Thinking/index.js +8 -8
  54. package/src/components/ThoughtChain/index.js +8 -8
  55. package/src/components/Typewriter/index.js +8 -8
  56. package/src/components/Welcome/index.js +8 -8
  57. package/src/index.js +7 -9
  58. package/src/styles/Conversations.scss +175 -152
  59. package/src/styles/Sender.scss +1 -1
  60. package/lib/locale/lang/ar-SA.js +0 -18
  61. package/lib/locale/lang/ar-SA.umd.js +0 -26
  62. package/lib/locale/lang/de-DE.js +0 -18
  63. package/lib/locale/lang/de-DE.umd.js +0 -26
  64. package/lib/locale/lang/es-ES.js +0 -18
  65. package/lib/locale/lang/es-ES.umd.js +0 -26
  66. package/lib/locale/lang/fr-FR.js +0 -18
  67. package/lib/locale/lang/fr-FR.umd.js +0 -26
  68. package/lib/locale/lang/it-IT.js +0 -18
  69. package/lib/locale/lang/it-IT.umd.js +0 -26
  70. package/lib/locale/lang/ja-JP.js +0 -18
  71. package/lib/locale/lang/ja-JP.umd.js +0 -26
  72. package/lib/locale/lang/ko-KR.js +0 -18
  73. package/lib/locale/lang/ko-KR.umd.js +0 -26
  74. package/src/styles/button.scss +0 -302
  75. package/src/styles/var.scss +0 -1051
  76. /package/lib/locale/lang/{pt-BR.js → pt-br.js} +0 -0
  77. /package/lib/locale/lang/{pt-BR.umd.js → pt-br.umd.js} +0 -0
@@ -397,21 +397,15 @@
397
397
  internalValue(newVal, oldVal) {
398
398
  this.$emit('input', newVal);
399
399
 
400
- // 当内容变化时,修复高度问题
401
-
402
400
  if (this.isComposing) return;
403
- // 新增:如果处于防抖状态,则不进行触发检测
404
401
  if (this.triggerDebounce) return;
405
402
 
406
- // 触发逻辑:检测输入内容中是否出现了触发字符
407
403
  const triggerStrings = this.triggerStrings || []; // 如果为 undefined,就使用空数组
408
404
 
409
- // 新的检测逻辑:检查是否在当前光标位置前有触发字符
410
405
  if (this.inputRef && triggerStrings.length > 0) {
411
406
  const textArea = this.inputRef.$el.querySelector('textarea');
412
407
  if (textArea) {
413
408
  const cursorPosition = textArea.selectionStart;
414
- // 检查光标前是否有新增的触发字符
415
409
  if (cursorPosition > 0 && newVal.length > oldVal.length) {
416
410
  const lastChar = newVal.charAt(cursorPosition - 1);
417
411
  if (triggerStrings.includes(lastChar)) {
@@ -431,7 +425,7 @@
431
425
  }
432
426
  }
433
427
  }
434
-
428
+ // V2.7X 兼容问题
435
429
  // 原有的处理逻辑,用于向后兼容
436
430
  const validOldVal = typeof oldVal === 'string' ? oldVal : '';
437
431
  const wasOldValTrigger = triggerStrings.includes(validOldVal);
@@ -479,6 +473,31 @@
479
473
  },
480
474
 
481
475
  methods: {
476
+ /* 确保光标在可视区域内 */
477
+ ensureCursorVisible() {
478
+ if (!this.inputRef) return;
479
+
480
+ const textareaEl = this.inputRef.$el.querySelector('textarea');
481
+ if (!textareaEl) return;
482
+
483
+ this.$nextTick(() => {
484
+ // 获取光标位置信息
485
+ const cursorPosition = textareaEl.selectionStart;
486
+ const textBeforeCursor = this.internalValue.substring(0, cursorPosition);
487
+ const linesBeforeCursor = textBeforeCursor.split('\n').length;
488
+
489
+ const lineHeight = parseInt(window.getComputedStyle(textareaEl).lineHeight) || 20;
490
+ const maxVisibleHeight = textareaEl.offsetHeight;
491
+ const maxVisibleLines = Math.floor(maxVisibleHeight / lineHeight);
492
+
493
+ // 如果光标超出可视范围,滚动到光标位置
494
+ if (linesBeforeCursor > maxVisibleLines) {
495
+ const targetScrollTop = (linesBeforeCursor - maxVisibleLines) * lineHeight;
496
+ textareaEl.scrollTop = targetScrollTop;
497
+ }
498
+ });
499
+ },
500
+
482
501
  /* 直接应用输入框样式 */
483
502
  applyInputStyles() {
484
503
  if (!this.inputRef) return;
@@ -486,14 +505,18 @@
486
505
  const textareaEl = this.inputRef.$el.querySelector('textarea');
487
506
  if (!textareaEl) return;
488
507
 
489
- // 设置默认基础样式
508
+ // 设置默认基础样式(当启用autosize时,不设置固定高度)
490
509
  const defaultStyles = {
491
510
  width: this.inputWidth || '100%',
492
- height: '24px',
493
511
  maxHeight: '176px',
494
512
  boxSizing: 'border-box',
495
513
  };
496
514
 
515
+ // 只有在未启用autosize时才设置固定高度
516
+ if (!this.computedAutoSize) {
517
+ defaultStyles.height = '24px';
518
+ }
519
+
497
520
  // 应用默认样式
498
521
  Object.keys(defaultStyles).forEach(key => {
499
522
  textareaEl.style[key] = defaultStyles[key];
@@ -502,11 +525,15 @@
502
525
  // 如果用户传入了样式对象,则应用覆盖默认样式
503
526
  if (this.inputStyle && typeof this.inputStyle === 'object') {
504
527
  Object.keys(this.inputStyle).forEach(key => {
528
+ // 当启用autosize时,避免覆盖height相关属性
529
+ if (this.computedAutoSize && (key === 'height' || key === 'minHeight')) {
530
+ return;
531
+ }
505
532
  textareaEl.style[key] = this.inputStyle[key];
506
533
  });
507
534
 
508
- // 如果用户设置了字体大小,需要调整高度
509
- if (this.inputStyle.fontSize) {
535
+ // 如果用户设置了字体大小,需要调整高度(仅在未启用autosize时)
536
+ if (this.inputStyle.fontSize && !this.computedAutoSize) {
510
537
  // 确保高度能完全容纳当前字体大小
511
538
  const computedFontSize = window.getComputedStyle(textareaEl).fontSize;
512
539
  const fontSize = parseInt(computedFontSize);
@@ -665,6 +692,8 @@
665
692
  this.internalValue = `${textBeforeCursor}\n${textAfterCursor}`; // 插入换行符
666
693
  this.$nextTick(() => {
667
694
  e.target.setSelectionRange(cursorPosition + 1, cursorPosition + 1); // 更新光标位置
695
+ // 确保光标在可视区域内
696
+ this.ensureCursorVisible();
668
697
  });
669
698
  } else if (e.keyCode === 13 && !e.shiftKey) {
670
699
  // 阻止掉 Enter 的默认换行行为
@@ -687,6 +716,8 @@
687
716
  this.internalValue = `${textBeforeCursor}\n${textAfterCursor}`; // 插入换行符
688
717
  this.$nextTick(() => {
689
718
  e.target.setSelectionRange(cursorPosition + 1, cursorPosition + 1); // 更新光标位置
719
+ // 确保光标在可视区域内
720
+ this.ensureCursorVisible();
690
721
  });
691
722
  }
692
723
  }
@@ -758,8 +789,11 @@
758
789
  },
759
790
 
760
791
  updated() {
761
- // 确保在组件更新后重新应用样式
762
- this.applyInputStyles();
792
+ // 只在特定条件下重新应用样式,避免干扰autosize功能
793
+ // 当启用autosize时,减少样式重新应用的频率
794
+ if (!this.computedAutoSize) {
795
+ this.applyInputStyles();
796
+ }
763
797
  },
764
798
  };
765
799
  </script>
@@ -1,8 +1,8 @@
1
- import ElXThinking from './src/main.vue';
2
-
3
- /* istanbul ignore next */
4
- ElXThinking.install = function (Vue) {
5
- Vue.component(ElXThinking.name, ElXThinking);
6
- };
7
-
8
- export default ElXThinking;
1
+ import ElXThinking from './src/main.vue';
2
+
3
+ /* istanbul ignore next */
4
+ ElXThinking.install = function (Vue) {
5
+ Vue.component(ElXThinking.name, ElXThinking);
6
+ };
7
+
8
+ export default ElXThinking;
@@ -1,8 +1,8 @@
1
- import ElXThoughtChain from './src/main.vue';
2
-
3
- /* istanbul ignore next */
4
- ElXThoughtChain.install = function (Vue) {
5
- Vue.component(ElXThoughtChain.name, ElXThoughtChain);
6
- };
7
-
8
- export default ElXThoughtChain;
1
+ import ElXThoughtChain from './src/main.vue';
2
+
3
+ /* istanbul ignore next */
4
+ ElXThoughtChain.install = function (Vue) {
5
+ Vue.component(ElXThoughtChain.name, ElXThoughtChain);
6
+ };
7
+
8
+ export default ElXThoughtChain;
@@ -1,8 +1,8 @@
1
- import ElXTypewriter from './src/main.vue';
2
-
3
- /* istanbul ignore next */
4
- ElXTypewriter.install = function (Vue) {
5
- Vue.component(ElXTypewriter.name, ElXTypewriter);
6
- };
7
-
8
- export default ElXTypewriter;
1
+ import ElXTypewriter from './src/main.vue';
2
+
3
+ /* istanbul ignore next */
4
+ ElXTypewriter.install = function (Vue) {
5
+ Vue.component(ElXTypewriter.name, ElXTypewriter);
6
+ };
7
+
8
+ export default ElXTypewriter;
@@ -1,8 +1,8 @@
1
- import ElXWelcome from './src/main.vue';
2
-
3
- /* istanbul ignore next */
4
- ElXWelcome.install = function (Vue) {
5
- Vue.component(ElXWelcome.name, ElXWelcome);
6
- };
7
-
8
- export default ElXWelcome;
1
+ import ElXWelcome from './src/main.vue';
2
+
3
+ /* istanbul ignore next */
4
+ ElXWelcome.install = function (Vue) {
5
+ Vue.component(ElXWelcome.name, ElXWelcome);
6
+ };
7
+
8
+ export default ElXWelcome;
package/src/index.js CHANGED
@@ -9,8 +9,8 @@ import ElXThinking from './components/Thinking/index.js';
9
9
  import ElXThoughtChain from './components/ThoughtChain/index.js';
10
10
  import ElXTypewriter from './components/Typewriter/index.js';
11
11
  import ElXWelcome from './components/Welcome/index.js';
12
- // 导入所有 mixins
13
- import * as customMixins from './mixins';
12
+
13
+ // 导入 mixins
14
14
  import {
15
15
  createSendUtils,
16
16
  createStreamUtils,
@@ -57,7 +57,11 @@ export {
57
57
  // Mixins
58
58
  createSendUtils,
59
59
  createStreamUtils,
60
- customMixins,
60
+ recordMixin,
61
+ sendMixin,
62
+ streamMixin,
63
+ XRequest,
64
+ XStream,
61
65
  // 组件
62
66
  ElXAttachments,
63
67
  ElXBubble,
@@ -73,11 +77,6 @@ export {
73
77
  lang,
74
78
  // 国际化
75
79
  locale,
76
- recordMixin,
77
- sendMixin,
78
- streamMixin,
79
- XRequest,
80
- XStream,
81
80
  };
82
81
 
83
82
  // 默认导出(完整引入)
@@ -94,7 +93,6 @@ components.forEach(component => {
94
93
  });
95
94
 
96
95
  // 添加mixins
97
- ElementUIX.customMixins = customMixins;
98
96
  ElementUIX.streamMixin = streamMixin;
99
97
  ElementUIX.sendMixin = sendMixin;
100
98
  ElementUIX.recordMixin = recordMixin;
@@ -1,6 +1,3 @@
1
- /* ElXConversations 组件样式 */
2
-
3
- /* 主容器 */
4
1
  .el-x-conversations-container {
5
2
  display: flex;
6
3
  flex-direction: column;
@@ -9,7 +6,7 @@
9
6
  width: fit-content;
10
7
  box-sizing: border-box;
11
8
  overflow: hidden;
12
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
9
+ box-shadow: 0 1px 3px rgba(0, 0, 0, .1)
13
10
  }
14
11
 
15
12
  .el-x-conversations-list {
@@ -19,34 +16,30 @@
19
16
  flex: 1;
20
17
  display: flex;
21
18
  flex-direction: column;
22
- box-sizing: border-box;
19
+ box-sizing: border-box
23
20
  }
24
21
 
25
22
  .el-x-conversations-scroll-wrapper {
26
23
  flex: 1;
27
24
  overflow: hidden;
28
- position: relative;
25
+ position: relative
26
+ }
29
27
 
30
- /* 在右侧添加留白区域 */
31
- &::after {
32
- content: '';
33
- position: absolute;
34
- top: 0;
35
- right: 0;
36
- width: 8px;
37
- /* 右侧留白宽度 */
38
- height: 100%;
39
- background-color: transparent;
40
- pointer-events: none;
41
- /* 确保不影响交互 */
42
- }
28
+ .el-x-conversations-scroll-wrapper::after {
29
+ content: "";
30
+ position: absolute;
31
+ top: 0;
32
+ right: 0;
33
+ width: 8px;
34
+ height: 100%;
35
+ background-color: rgba(0, 0, 0, 0);
36
+ pointer-events: none
43
37
  }
44
38
 
45
- // 加载更多
46
39
  .el-x-conversations-load-more {
47
40
  display: flex;
48
41
  width: calc(100% - 20px);
49
- padding: 4px 0;
42
+ padding: 14px 10px;
50
43
  justify-content: center;
51
44
  align-items: center;
52
45
  font-size: 12px;
@@ -57,71 +50,69 @@
57
50
  border-radius: 8px;
58
51
  height: auto;
59
52
  min-height: var(--conversation-label-height, 20px);
60
- box-sizing: border-box;
53
+ box-sizing: border-box
61
54
  }
62
55
 
63
- // 加载动画
64
56
  .el-x-conversations-load-more-is-loading {
65
57
  margin-top: 2px;
66
- animation: spinloading 2s linear infinite;
58
+ animation: spinloading 2s linear infinite
67
59
  }
68
60
 
69
61
  @keyframes spinloading {
70
62
  0% {
71
- transform: rotate(0deg);
63
+ transform: rotate(0deg)
72
64
  }
73
65
 
74
66
  100% {
75
- transform: rotate(360deg);
67
+ transform: rotate(360deg)
76
68
  }
77
69
  }
78
70
 
79
71
  .scroll-content {
80
- min-height: 100%;
72
+ min-height: 100%
81
73
  }
82
74
 
83
75
  .loading-more {
84
76
  text-align: center;
85
77
  padding: 10px 0;
86
78
  color: #909399;
87
- font-size: 14px;
79
+ font-size: 14px
88
80
  }
89
81
 
90
82
  .el-x-conversation-group {
91
- position: relative;
83
+ position: relative
84
+ }
92
85
 
93
- &:last-child {
94
- margin-bottom: 0;
95
- }
86
+ .el-x-conversation-group:last-child {
87
+ margin-bottom: 0
88
+ }
96
89
 
97
- .el-x-conversation-group-title {
98
- font-size: 14px;
99
- color: #909399;
100
- padding: 8px 0;
101
- font-weight: 500;
102
- margin-bottom: 4px;
103
- border-radius: 4px;
104
- border-top-left-radius: 0px;
105
- border-top-right-radius: 0px;
106
- // 预留滚动条宽度
107
- width: calc(100% - 10px);
108
- box-sizing: border-box;
109
- }
90
+ .el-x-conversation-group .el-x-conversation-group-title {
91
+ font-size: 14px;
92
+ color: #909399;
93
+ padding: 8px 0;
94
+ font-weight: 500;
95
+ margin-bottom: 4px;
96
+ border-radius: 4px;
97
+ border-top-left-radius: 0px;
98
+ border-top-right-radius: 0px;
99
+ width: calc(100% - 10px);
100
+ box-sizing: border-box
101
+ }
110
102
 
111
- .sticky-title {
112
- position: sticky;
113
- top: 0;
114
- z-index: 20;
115
- background-color: var(--conversation-list-auto-bg-color, #fff);
116
- }
103
+ .el-x-conversation-group .sticky-title {
104
+ position: sticky;
105
+ top: 0;
106
+ z-index: 20;
107
+ background-color: var(--conversation-list-auto-bg-color, #fff)
108
+ }
117
109
 
118
- .active-sticky {
119
- z-index: 10;
120
- }
110
+ .el-x-conversation-group .active-sticky {
111
+ z-index: 10
112
+ }
121
113
 
122
- .el-x-conversation-group-items {
123
- padding-top: 0;
124
- }
114
+ .el-x-conversation-group .el-x-conversation-group-items {
115
+ padding-top: 0
125
116
  }
126
117
 
127
118
  .scroll-to-top-btn {
@@ -129,132 +120,164 @@
129
120
  right: 16px;
130
121
  bottom: 16px;
131
122
  z-index: 99;
132
- opacity: 0.8;
133
- transition: opacity 0.3s;
123
+ opacity: .8;
124
+ transition: opacity .3s
125
+ }
134
126
 
135
- &:hover {
136
- opacity: 1;
137
- }
127
+ .scroll-to-top-btn:hover {
128
+ opacity: 1
138
129
  }
139
130
 
140
- /* 项目样式 */
141
131
  .el-x-conversation-item {
142
132
  padding: 14px 10px;
143
133
  margin-right: 20px;
144
134
  border-radius: 8px;
145
135
  cursor: pointer;
146
- transition: background-color 0.2s ease;
136
+ transition: background-color .2s ease
137
+ }
147
138
 
148
- &+& {
149
- margin-top: 4px;
150
- }
139
+ .el-x-conversation-item+.el-x-conversation-item {
140
+ margin-top: 4px
141
+ }
151
142
 
152
- &.disabled {
153
- opacity: 0.5;
154
- cursor: not-allowed;
155
- color: #c0c4cc;
156
- }
143
+ .el-x-conversation-item.disabled {
144
+ opacity: .5;
145
+ cursor: not-allowed;
146
+ color: #c0c4cc
147
+ }
157
148
 
158
- &.active {
159
- background-color: #f0f0f0;
160
- }
149
+ .el-x-conversation-item.active {
150
+ background-color: #f0f0f0
151
+ }
161
152
 
162
- &.hovered,
163
- &:hover {
164
- background-color: #f0f0f0;
165
- }
153
+ .el-x-conversation-item.hovered,
154
+ .el-x-conversation-item:hover {
155
+ background-color: #f0f0f0
156
+ }
166
157
 
167
- &.menu-opened {
168
- background-color: #f0f0f0;
169
- }
158
+ .el-x-conversation-item.menu-opened {
159
+ background-color: #f0f0f0
170
160
  }
171
161
 
172
162
  .el-x-conversation-content {
173
163
  display: flex;
174
164
  align-items: center;
175
- height: var(--conversation-label-height, 20px);
165
+ height: var(--conversation-label-height, 20px)
166
+ }
176
167
 
177
- .el-x-conversation-prefix-icon {
178
- margin-right: 8px;
179
- display: flex;
180
- justify-content: center;
181
- align-items: center;
182
- }
168
+ .el-x-conversation-content .el-x-conversation-prefix-icon {
169
+ margin-right: 8px;
170
+ display: flex;
171
+ justify-content: center;
172
+ align-items: center
173
+ }
183
174
 
184
- .el-x-conversation-content-main {
185
- flex: 1;
186
- display: flex;
187
- align-items: center;
188
- position: relative;
189
- overflow: hidden;
190
- }
175
+ .el-x-conversation-content .el-x-conversation-content-main {
176
+ flex: 1;
177
+ display: flex;
178
+ align-items: center;
179
+ position: relative;
180
+ overflow: hidden
181
+ }
191
182
 
192
- .el-x-conversation-label-container {
193
- flex: 1;
194
- display: flex;
195
- justify-content: space-between;
196
- align-items: center;
197
- overflow: hidden;
198
- }
183
+ .el-x-conversation-content .el-x-conversation-label-container {
184
+ flex: 1;
185
+ display: flex;
186
+ justify-content: space-between;
187
+ align-items: center;
188
+ overflow: hidden
189
+ }
199
190
 
200
- .el-x-conversation-label {
201
- font-size: 14px;
202
- color: #303133;
203
- position: relative;
204
- white-space: nowrap;
191
+ .el-x-conversation-content .el-x-conversation-label {
192
+ font-size: 14px;
193
+ color: #303133;
194
+ position: relative;
195
+ white-space: nowrap
196
+ }
205
197
 
206
- &.text-gradient {
207
- mask-image: linear-gradient(to right, black 60%, transparent 100%);
208
- -webkit-mask-image: linear-gradient(to right, black 60%, transparent 100%);
209
- }
210
- }
198
+ .el-x-conversation-content .el-x-conversation-label.text-gradient {
199
+ mask-image: linear-gradient(to right, black 60%, transparent 100%);
200
+ -webkit-mask-image: linear-gradient(to right, black 60%, transparent 100%)
201
+ }
211
202
 
212
- .el-x-conversation-timestamp {
213
- font-size: 14px;
214
- color: #909399;
215
- margin-left: 8px;
216
- }
203
+ .el-x-conversation-content .el-x-conversation-timestamp {
204
+ font-size: 14px;
205
+ color: #909399;
206
+ margin-left: 8px
207
+ }
217
208
 
218
- .el-x-conversation-suffix-icon {
219
- margin-left: 8px;
220
- display: flex;
221
- justify-content: center;
222
- align-items: center;
223
- }
209
+ .el-x-conversation-content .el-x-conversation-suffix-icon {
210
+ margin-left: 8px;
211
+ display: flex;
212
+ justify-content: center;
213
+ align-items: center
214
+ }
224
215
 
225
- .el-x-conversation-dropdown-more {
226
- justify-self: center;
227
- height: 100%;
228
- display: flex;
229
- align-items: center;
230
- }
216
+ .el-x-conversation-content .el-x-conversation-dropdown-more {
217
+ justify-self: center;
218
+ height: 100%;
219
+ display: flex;
220
+ align-items: center
221
+ }
222
+
223
+ .el-x-conversation-content .el-x-conversation-dropdown-more-icon {
224
+ font-size: 16px;
225
+ padding: 2px;
226
+ border-radius: 5px
227
+ }
231
228
 
232
- .el-x-conversation-dropdown-more-icon {
233
- font-size: 16px;
234
- padding: 2px;
235
- border-radius: 5px;
229
+ .el-x-conversation-content .el-x-conversation-dropdown-more-icon:hover {
230
+ background-color: #d3d3d3
231
+ }
236
232
 
237
- &:hover {
238
- background-color: #d3d3d3;
239
- }
240
- }
233
+ .el-x-conversation-content .el-x-conversation-menu {
234
+ margin-left: 8px;
235
+ display: flex;
236
+ align-items: center;
237
+ opacity: 0;
238
+ transition: opacity .2s ease
239
+ }
241
240
 
242
- .el-x-conversation-menu {
243
- margin-left: 8px;
244
- display: flex;
245
- align-items: center;
246
- opacity: 0;
247
- transition: opacity 0.2s ease;
248
-
249
- .hovered &,
250
- .active & {
251
- opacity: 1;
252
- }
253
- }
241
+ .hovered .el-x-conversation-content .el-x-conversation-menu,
242
+ .active .el-x-conversation-content .el-x-conversation-menu {
243
+ opacity: 1
254
244
  }
255
245
 
256
- // Dropdown菜单样式
257
246
  .el-x-conversation-dropdown-menu {
258
247
  max-height: 300px;
259
- overflow-y: auto;
248
+ overflow-y: auto
249
+ }
250
+
251
+ .el-x-conversations-scrollbar {
252
+ height: 100%;
253
+ overflow-y: auto
254
+ }
255
+
256
+ .el-x-conversations-scrollbar::-webkit-scrollbar {
257
+ width: 6px
258
+ }
259
+
260
+ .el-x-conversations-scrollbar::-webkit-scrollbar-thumb {
261
+ background-color: rgba(0, 0, 0, 0);
262
+ border-radius: 3px;
263
+ transition: background-color .3s ease
264
+ }
265
+
266
+ .el-x-conversations-scrollbar::-webkit-scrollbar-track {
267
+ background-color: rgba(0, 0, 0, 0)
268
+ }
269
+
270
+ .el-x-conversations-scrollbar:hover::-webkit-scrollbar-thumb {
271
+ background-color: #e0e0e0
272
+ }
273
+
274
+ @supports(scrollbar-width: thin) {
275
+ .el-x-conversations-scrollbar {
276
+ scrollbar-width: thin;
277
+ scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)
278
+ }
279
+
280
+ .el-x-conversations-scrollbar:hover {
281
+ scrollbar-color: #e0e0e0 rgba(0, 0, 0, 0)
282
+ }
260
283
  }
@@ -129,7 +129,7 @@ $--el-x-fill-color: $--background-color-base;
129
129
  align-self: center;
130
130
 
131
131
  ::v-deep .el-textarea__inner {
132
- padding: 0;
132
+ padding: 0 !important;
133
133
  margin: 0;
134
134
  color: $--el-x-text-color-primary;
135
135
  font-size: $--el-x-sender-input-font-size;