vue-element-ui-x 1.0.2 → 1.0.3

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-element-ui-x",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "基于Vue 2 + Element UI的AI聊天组件库",
5
5
  "main": "lib/index.common.js",
6
6
  "module": "lib/index.esm.js",
@@ -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
  }