vue-element-ui-x 0.2.1 → 0.2.2
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/README.md +8 -8
- package/lib/components/Conversations/index.js +17 -9
- package/lib/index.common.js +1 -1
- package/lib/index.esm.js +1 -1
- package/lib/index.js +18 -13
- package/lib/index.umd.js +1 -1
- package/package.json +1 -1
- package/src/components/Conversations/src/main.vue +9 -3
- package/src/index.js +3 -5
- package/src/styles/Bubble.scss +157 -157
- package/src/styles/Conversations.scss +1 -1
package/package.json
CHANGED
|
@@ -193,9 +193,7 @@
|
|
|
193
193
|
export default {
|
|
194
194
|
name: 'ElXConversations',
|
|
195
195
|
|
|
196
|
-
components: {
|
|
197
|
-
ConversationsItem,
|
|
198
|
-
},
|
|
196
|
+
components: { ConversationsItem },
|
|
199
197
|
|
|
200
198
|
props: {
|
|
201
199
|
items: {
|
|
@@ -549,6 +547,14 @@
|
|
|
549
547
|
loadMoreData() {
|
|
550
548
|
if (!this.loadMore) return;
|
|
551
549
|
this.loadMore();
|
|
550
|
+
// 确保loading元素可见
|
|
551
|
+
this.$nextTick(() => {
|
|
552
|
+
const scrollContainer = this.$refs.scrollContainer;
|
|
553
|
+
if (scrollContainer) {
|
|
554
|
+
// 滚动到底部,确保loading元素可见
|
|
555
|
+
scrollContainer.scrollTop = scrollContainer.scrollHeight;
|
|
556
|
+
}
|
|
557
|
+
});
|
|
552
558
|
},
|
|
553
559
|
|
|
554
560
|
scrollToTop() {
|
package/src/index.js
CHANGED
|
@@ -41,8 +41,9 @@ const install = function (Vue) {
|
|
|
41
41
|
});
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
-
// 具名导出(按需引入)-
|
|
44
|
+
// 具名导出(按需引入)- 组件和Mixins
|
|
45
45
|
export {
|
|
46
|
+
// 组件
|
|
46
47
|
ElXAttachments,
|
|
47
48
|
ElXBubble,
|
|
48
49
|
ElXBubbleList,
|
|
@@ -54,10 +55,7 @@ export {
|
|
|
54
55
|
ElXThoughtChain,
|
|
55
56
|
ElXTypewriter,
|
|
56
57
|
ElXWelcome,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
// 具名导出(按需引入)- Mixins
|
|
60
|
-
export {
|
|
58
|
+
// Mixins
|
|
61
59
|
createSendUtils,
|
|
62
60
|
createStreamUtils,
|
|
63
61
|
customMixins,
|
package/src/styles/Bubble.scss
CHANGED
|
@@ -1,157 +1,157 @@
|
|
|
1
|
-
@import '../theme/var.scss';
|
|
2
|
-
|
|
3
|
-
.el-x-bubble {
|
|
4
|
-
display: flex;
|
|
5
|
-
gap: var(--el-x-bubble-avatar-placeholder-gap);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.el-x-bubble-avatar-size {
|
|
9
|
-
::v-deep .el-avatar {
|
|
10
|
-
width: var(--el-x-bubble-avatar-placeholder-width);
|
|
11
|
-
height: var(--el-x-bubble-avatar-placeholder-height);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.el-x-bubble-avatar-placeholder {
|
|
16
|
-
width: var(--el-x-bubble-avatar-placeholder-width);
|
|
17
|
-
height: var(--el-x-bubble-avatar-placeholder-height);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.el-x-bubble-start {
|
|
21
|
-
.el-x-bubble-content-wrapper {
|
|
22
|
-
.el-x-bubble-content-corner {
|
|
23
|
-
border-start-start-radius: $--el-x-border-radius-base - 2px;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.el-x-bubble-end {
|
|
29
|
-
justify-content: end;
|
|
30
|
-
flex-direction: row-reverse;
|
|
31
|
-
|
|
32
|
-
.el-x-bubble-content-wrapper {
|
|
33
|
-
align-items: flex-end;
|
|
34
|
-
|
|
35
|
-
.el-x-bubble-content-corner {
|
|
36
|
-
border-start-end-radius: $--el-x-border-radius-base - 2px;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.el-x-bubble-no-style {
|
|
42
|
-
.el-x-bubble-content-wrapper {
|
|
43
|
-
.el-x-bubble-content {
|
|
44
|
-
background-color: transparent;
|
|
45
|
-
padding: 0;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.el-x-bubble-content-wrapper {
|
|
51
|
-
flex: auto;
|
|
52
|
-
display: flex;
|
|
53
|
-
flex-direction: column;
|
|
54
|
-
align-items: flex-start;
|
|
55
|
-
min-width: 0;
|
|
56
|
-
max-width: 100%;
|
|
57
|
-
|
|
58
|
-
.el-x-bubble-header,
|
|
59
|
-
.el-x-bubble-content,
|
|
60
|
-
.el-x-bubble-footer {
|
|
61
|
-
font-size: $--el-x-font-size-base;
|
|
62
|
-
color: $--el-x-text-color-primary;
|
|
63
|
-
line-height: $--el-x-font-line-height-primary;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// .el-x-bubble-header {
|
|
67
|
-
// margin-bottom: var();
|
|
68
|
-
// }
|
|
69
|
-
|
|
70
|
-
.el-x-bubble-content {
|
|
71
|
-
background-color: $--el-x-fill-color;
|
|
72
|
-
padding: $--el-x-padding-md $--el-x-padding-lg;
|
|
73
|
-
border-radius: $--el-x-border-radius-base + 4px;
|
|
74
|
-
position: relative;
|
|
75
|
-
box-sizing: border-box;
|
|
76
|
-
min-width: 0;
|
|
77
|
-
max-width: var(--bubble-content-max-width);
|
|
78
|
-
color: $--el-x-text-color-primary;
|
|
79
|
-
font-size: $--el-x-font-size-base;
|
|
80
|
-
line-height: $--el-x-font-line-height-primary;
|
|
81
|
-
// min-height: calc(#{$--el-x-padding-md} * 2 + #{$--el-x-font-line-height-primary} * #{$--el-x-font-size-base} );
|
|
82
|
-
word-break: break-word;
|
|
83
|
-
|
|
84
|
-
// 打字器没有内容时候展示高度
|
|
85
|
-
.no-content {
|
|
86
|
-
// height: 16px;
|
|
87
|
-
height: 0;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// 气泡圆角
|
|
92
|
-
.el-x-bubble-content-round {
|
|
93
|
-
border-radius: $--el-x-border-radius-round;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
// 气泡样式
|
|
97
|
-
.el-x-bubble-content-filled {
|
|
98
|
-
background-color: $--el-x-fill-color;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.el-x-bubble-content-borderless {
|
|
102
|
-
background-color: $--el-x-fill-color;
|
|
103
|
-
border: $--el-x-border-width solid $--el-x-border-color;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.el-x-bubble-content-outlined {
|
|
107
|
-
background: none;
|
|
108
|
-
border: $--el-x-border-width solid $--el-x-border-color;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.el-x-bubble-content-shadow {
|
|
112
|
-
background: none;
|
|
113
|
-
// box-shadow: var(--el-box-shadow-tertiary);
|
|
114
|
-
box-shadow: $--el-x-box-shadow-base;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.el-x-bubble-content-loading {
|
|
118
|
-
width: fit-content;
|
|
119
|
-
|
|
120
|
-
.el-x-bubble-loading-wrap {
|
|
121
|
-
display: flex;
|
|
122
|
-
justify-content: center;
|
|
123
|
-
align-items: center;
|
|
124
|
-
// height: 16px;
|
|
125
|
-
/* 盒子高度 */
|
|
126
|
-
gap: 5px;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.dot {
|
|
130
|
-
width: 5px;
|
|
131
|
-
height: 5px;
|
|
132
|
-
background-color: $--color-primary;
|
|
133
|
-
/* 点的颜色 */
|
|
134
|
-
border-radius: 50%;
|
|
135
|
-
/* 圆形 */
|
|
136
|
-
animation: wave 1s infinite ease-in-out;
|
|
137
|
-
/* 动画 */
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/* 波浪动画 */
|
|
141
|
-
@keyframes wave {
|
|
142
|
-
0%,
|
|
143
|
-
100% {
|
|
144
|
-
transform: translateY(-2px);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
50% {
|
|
148
|
-
transform: translateY(2px);
|
|
149
|
-
/* 上下波动 */
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.el-x-bubble-footer {
|
|
155
|
-
margin-top: $--el-x-padding-sm;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
1
|
+
@import '../theme/var.scss';
|
|
2
|
+
|
|
3
|
+
.el-x-bubble {
|
|
4
|
+
display: flex;
|
|
5
|
+
gap: var(--el-x-bubble-avatar-placeholder-gap);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.el-x-bubble-avatar-size {
|
|
9
|
+
::v-deep .el-avatar {
|
|
10
|
+
width: var(--el-x-bubble-avatar-placeholder-width);
|
|
11
|
+
height: var(--el-x-bubble-avatar-placeholder-height);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.el-x-bubble-avatar-placeholder {
|
|
16
|
+
width: var(--el-x-bubble-avatar-placeholder-width);
|
|
17
|
+
height: var(--el-x-bubble-avatar-placeholder-height);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.el-x-bubble-start {
|
|
21
|
+
.el-x-bubble-content-wrapper {
|
|
22
|
+
.el-x-bubble-content-corner {
|
|
23
|
+
border-start-start-radius: $--el-x-border-radius-base - 2px;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.el-x-bubble-end {
|
|
29
|
+
justify-content: end;
|
|
30
|
+
flex-direction: row-reverse;
|
|
31
|
+
|
|
32
|
+
.el-x-bubble-content-wrapper {
|
|
33
|
+
align-items: flex-end;
|
|
34
|
+
|
|
35
|
+
.el-x-bubble-content-corner {
|
|
36
|
+
border-start-end-radius: $--el-x-border-radius-base - 2px;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.el-x-bubble-no-style {
|
|
42
|
+
.el-x-bubble-content-wrapper {
|
|
43
|
+
.el-x-bubble-content {
|
|
44
|
+
background-color: transparent;
|
|
45
|
+
padding: 0;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.el-x-bubble-content-wrapper {
|
|
51
|
+
flex: auto;
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
align-items: flex-start;
|
|
55
|
+
min-width: 0;
|
|
56
|
+
max-width: 100%;
|
|
57
|
+
|
|
58
|
+
.el-x-bubble-header,
|
|
59
|
+
.el-x-bubble-content,
|
|
60
|
+
.el-x-bubble-footer {
|
|
61
|
+
font-size: $--el-x-font-size-base;
|
|
62
|
+
color: $--el-x-text-color-primary;
|
|
63
|
+
line-height: $--el-x-font-line-height-primary;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// .el-x-bubble-header {
|
|
67
|
+
// margin-bottom: var();
|
|
68
|
+
// }
|
|
69
|
+
|
|
70
|
+
.el-x-bubble-content {
|
|
71
|
+
background-color: $--el-x-fill-color;
|
|
72
|
+
padding: $--el-x-padding-md $--el-x-padding-lg;
|
|
73
|
+
border-radius: $--el-x-border-radius-base + 4px;
|
|
74
|
+
position: relative;
|
|
75
|
+
box-sizing: border-box;
|
|
76
|
+
min-width: 0;
|
|
77
|
+
max-width: var(--bubble-content-max-width);
|
|
78
|
+
color: $--el-x-text-color-primary;
|
|
79
|
+
font-size: $--el-x-font-size-base;
|
|
80
|
+
line-height: $--el-x-font-line-height-primary;
|
|
81
|
+
// min-height: calc(#{$--el-x-padding-md} * 2 + #{$--el-x-font-line-height-primary} * #{$--el-x-font-size-base} );
|
|
82
|
+
word-break: break-word;
|
|
83
|
+
|
|
84
|
+
// 打字器没有内容时候展示高度
|
|
85
|
+
.no-content {
|
|
86
|
+
// height: 16px;
|
|
87
|
+
height: 0;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// 气泡圆角
|
|
92
|
+
.el-x-bubble-content-round {
|
|
93
|
+
border-radius: $--el-x-border-radius-round;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// 气泡样式
|
|
97
|
+
.el-x-bubble-content-filled {
|
|
98
|
+
background-color: $--el-x-fill-color;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.el-x-bubble-content-borderless {
|
|
102
|
+
background-color: $--el-x-fill-color;
|
|
103
|
+
border: $--el-x-border-width solid $--el-x-border-color;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.el-x-bubble-content-outlined {
|
|
107
|
+
background: none;
|
|
108
|
+
border: $--el-x-border-width solid $--el-x-border-color;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.el-x-bubble-content-shadow {
|
|
112
|
+
background: none;
|
|
113
|
+
// box-shadow: var(--el-box-shadow-tertiary);
|
|
114
|
+
box-shadow: $--el-x-box-shadow-base;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.el-x-bubble-content-loading {
|
|
118
|
+
width: fit-content;
|
|
119
|
+
|
|
120
|
+
.el-x-bubble-loading-wrap {
|
|
121
|
+
display: flex;
|
|
122
|
+
justify-content: center;
|
|
123
|
+
align-items: center;
|
|
124
|
+
// height: 16px;
|
|
125
|
+
/* 盒子高度 */
|
|
126
|
+
gap: 5px;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.dot {
|
|
130
|
+
width: 5px;
|
|
131
|
+
height: 5px;
|
|
132
|
+
background-color: $--color-primary;
|
|
133
|
+
/* 点的颜色 */
|
|
134
|
+
border-radius: 50%;
|
|
135
|
+
/* 圆形 */
|
|
136
|
+
animation: wave 1s infinite ease-in-out;
|
|
137
|
+
/* 动画 */
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/* 波浪动画 */
|
|
141
|
+
@keyframes wave {
|
|
142
|
+
0%,
|
|
143
|
+
100% {
|
|
144
|
+
transform: translateY(-2px);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
50% {
|
|
148
|
+
transform: translateY(2px);
|
|
149
|
+
/* 上下波动 */
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.el-x-bubble-footer {
|
|
155
|
+
margin-top: $--el-x-padding-sm;
|
|
156
|
+
}
|
|
157
|
+
}
|