vue-element-ui-x 1.0.1 → 1.0.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/lib/components/Attachments/index.js +11 -11
- package/lib/components/Bubble/index.js +30 -43
- package/lib/components/BubbleList/index.js +47 -77
- package/lib/components/Conversations/index.js +9 -9
- package/lib/components/FilesCard/index.js +1 -1
- package/lib/components/Prompts/index.js +21 -21
- package/lib/components/Sender/index.js +50 -49
- package/lib/components/Thinking/index.js +12 -18
- package/lib/components/ThoughtChain/index.js +23 -27
- package/lib/components/Typewriter/index.js +13 -17
- package/lib/components/Welcome/index.js +1 -1
- package/lib/index.common.js +1 -1
- package/lib/index.esm.js +1 -1
- package/lib/index.js +161 -196
- package/lib/index.umd.js +1 -1
- package/package.json +12 -9
- package/src/components/Attachments/src/main.vue +2 -10
- package/src/components/Bubble/src/main.vue +8 -19
- package/src/components/BubbleList/src/main.vue +2 -19
- package/src/components/Conversations/src/main.vue +0 -41
- package/src/components/Prompts/src/main.vue +248 -248
- package/src/components/Sender/src/components/LoadingButton.vue +37 -39
- package/src/components/Sender/src/components/SpeechLoadingButton.vue +41 -43
- package/src/components/Sender/src/main.vue +1 -0
- package/src/components/Thinking/src/main.vue +3 -4
- package/src/components/ThoughtChain/src/main.vue +1 -3
- package/src/components/Typewriter/src/main.vue +3 -7
- package/src/components/Welcome/src/main.vue +151 -151
- package/src/styles/Attachments.scss +236 -236
- package/src/styles/Bubble.scss +5 -4
- package/src/styles/BubbleList.scss +148 -148
- package/src/styles/Conversations.scss +1 -1
- package/src/styles/FilesCard.scss +222 -221
- package/src/styles/Prompts.scss +197 -195
- package/src/styles/Sender.scss +29 -18
- package/src/styles/Thinking.scss +36 -6
- package/src/styles/ThoughtChain.scss +113 -113
- package/src/styles/Typewriter.scss +66 -66
- package/src/styles/var.scss +4 -5
- package/src/theme/var.scss +183 -72
package/src/styles/Prompts.scss
CHANGED
|
@@ -1,195 +1,197 @@
|
|
|
1
|
-
@import '../theme/var.scss';
|
|
2
|
-
|
|
3
|
-
// 移动设备断点
|
|
4
|
-
$--mobile-breakpoint: 768px;
|
|
5
|
-
|
|
6
|
-
// Prompts 组件样式
|
|
7
|
-
.el-x-prompts {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
// RTL 支持
|
|
17
|
-
&.el-x-prompts-rtl {
|
|
18
|
-
direction: rtl;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// 标题样式
|
|
22
|
-
.el-x-prompts-title {
|
|
23
|
-
font-weight: normal;
|
|
24
|
-
font-size: $--el-x-font-size-medium;
|
|
25
|
-
color: $--color-text-secondary;
|
|
26
|
-
margin-top: 0;
|
|
27
|
-
margin-bottom: 0.5em;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// 列表样式
|
|
31
|
-
.el-x-prompts-list {
|
|
32
|
-
display: flex;
|
|
33
|
-
gap: $--el-x-padding-sm;
|
|
34
|
-
overflow-x: auto;
|
|
35
|
-
// 隐藏滚动条
|
|
36
|
-
scrollbar-width: none;
|
|
37
|
-
-ms-overflow-style: none;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
border: $--
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
.el-x-prompts-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
-
|
|
144
|
-
-webkit-box
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
}
|
|
1
|
+
@import '../theme/var.scss';
|
|
2
|
+
|
|
3
|
+
// 移动设备断点
|
|
4
|
+
$--mobile-breakpoint: 768px;
|
|
5
|
+
|
|
6
|
+
// Prompts 组件样式
|
|
7
|
+
.el-x-prompts {
|
|
8
|
+
max-width: 100%;
|
|
9
|
+
|
|
10
|
+
&,
|
|
11
|
+
& * {
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
// RTL 支持
|
|
17
|
+
&.el-x-prompts-rtl {
|
|
18
|
+
direction: rtl;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// 标题样式
|
|
22
|
+
.el-x-prompts-title {
|
|
23
|
+
font-weight: normal;
|
|
24
|
+
font-size: $--el-x-font-size-medium;
|
|
25
|
+
color: $--color-text-secondary;
|
|
26
|
+
margin-top: 0;
|
|
27
|
+
margin-bottom: 0.5em;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// 列表样式
|
|
31
|
+
.el-x-prompts-list {
|
|
32
|
+
display: flex;
|
|
33
|
+
gap: $--el-x-padding-sm;
|
|
34
|
+
overflow-x: auto;
|
|
35
|
+
// 隐藏滚动条
|
|
36
|
+
scrollbar-width: none;
|
|
37
|
+
-ms-overflow-style: none;
|
|
38
|
+
|
|
39
|
+
&::-webkit-scrollbar {
|
|
40
|
+
display: none;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
list-style: none;
|
|
44
|
+
padding-left: 0;
|
|
45
|
+
margin: 0;
|
|
46
|
+
align-items: stretch;
|
|
47
|
+
|
|
48
|
+
// 换行
|
|
49
|
+
&-wrap {
|
|
50
|
+
flex-wrap: wrap;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// 垂直排列
|
|
54
|
+
&-vertical {
|
|
55
|
+
flex-direction: column;
|
|
56
|
+
align-items: flex-start;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// 移动设备响应式
|
|
60
|
+
@media screen and (max-width: $--mobile-breakpoint) {
|
|
61
|
+
flex-wrap: wrap;
|
|
62
|
+
gap: 8px;
|
|
63
|
+
|
|
64
|
+
&-wrap {
|
|
65
|
+
justify-content: space-between;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// 项目样式
|
|
71
|
+
.el-x-prompts-item {
|
|
72
|
+
flex: none;
|
|
73
|
+
display: flex;
|
|
74
|
+
gap: 4px;
|
|
75
|
+
height: auto;
|
|
76
|
+
padding: $--el-x-padding-md $--el-x-padding-lg;
|
|
77
|
+
align-items: flex-start;
|
|
78
|
+
justify-content: flex-start;
|
|
79
|
+
background: $--color-white;
|
|
80
|
+
border-radius: $--el-x-border-radius-md;
|
|
81
|
+
transition: border $--all-transition, background $--all-transition;
|
|
82
|
+
border: $--border-width-base $--border-style-base $--border-color-lighter;
|
|
83
|
+
|
|
84
|
+
// 移动设备响应式
|
|
85
|
+
@media screen and (max-width: $--mobile-breakpoint) {
|
|
86
|
+
width: calc(50% - 4px); // 小屏幕上默认两列布局
|
|
87
|
+
min-width: 150px;
|
|
88
|
+
padding: $--el-x-padding-sm $--el-x-padding-md;
|
|
89
|
+
|
|
90
|
+
.el-x-prompts-list-wrap & {
|
|
91
|
+
width: calc(50% - 4px);
|
|
92
|
+
margin-bottom: 8px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.el-x-prompts-list-vertical & {
|
|
96
|
+
width: 100%;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&:not(.el-x-prompts-item-has-nest) {
|
|
101
|
+
&:hover {
|
|
102
|
+
cursor: pointer;
|
|
103
|
+
background: $--background-color-base;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&:active {
|
|
107
|
+
background: $--color-primary-light-9;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// 内容样式
|
|
112
|
+
.el-x-prompts-content {
|
|
113
|
+
flex: auto;
|
|
114
|
+
min-width: 0;
|
|
115
|
+
display: flex;
|
|
116
|
+
gap: 4px;
|
|
117
|
+
flex-direction: column;
|
|
118
|
+
align-items: flex-start;
|
|
119
|
+
|
|
120
|
+
// 移动设备响应式
|
|
121
|
+
@media screen and (max-width: $--mobile-breakpoint) {
|
|
122
|
+
width: 100%;
|
|
123
|
+
gap: 2px;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// 图标、标签和描述共同样式
|
|
128
|
+
.el-x-prompts-icon,
|
|
129
|
+
.el-x-prompts-label,
|
|
130
|
+
.el-x-prompts-desc {
|
|
131
|
+
margin: 0;
|
|
132
|
+
padding: 0;
|
|
133
|
+
font-size: $--el-x-font-size-base;
|
|
134
|
+
line-height: $--el-x-font-line-height-primary;
|
|
135
|
+
text-align: start;
|
|
136
|
+
white-space: normal;
|
|
137
|
+
|
|
138
|
+
// 移动设备响应式
|
|
139
|
+
@media screen and (max-width: $--mobile-breakpoint) {
|
|
140
|
+
font-size: 14px;
|
|
141
|
+
line-height: 1.4;
|
|
142
|
+
overflow: hidden;
|
|
143
|
+
text-overflow: ellipsis;
|
|
144
|
+
display: -webkit-box;
|
|
145
|
+
-webkit-line-clamp: 2;
|
|
146
|
+
-webkit-box-orient: vertical;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// 标签样式
|
|
151
|
+
.el-x-prompts-label {
|
|
152
|
+
color: $--color-text-primary;
|
|
153
|
+
font-weight: 500;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// 描述样式
|
|
157
|
+
.el-x-prompts-label+.el-x-prompts-desc {
|
|
158
|
+
color: $--color-text-secondary;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// 禁用状态
|
|
162
|
+
&.el-x-prompts-item-disabled {
|
|
163
|
+
pointer-events: none;
|
|
164
|
+
background: $--background-color-base;
|
|
165
|
+
|
|
166
|
+
.el-x-prompts-label,
|
|
167
|
+
.el-x-prompts-desc {
|
|
168
|
+
color: $--color-text-secondary;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// 嵌套样式
|
|
174
|
+
.el-x-prompts-item-has-nest {
|
|
175
|
+
>.el-x-prompts-content {
|
|
176
|
+
>.el-x-prompts-label {
|
|
177
|
+
font-size: $--font-size-large;
|
|
178
|
+
line-height: $--font-line-height-primary;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// 嵌套组件样式
|
|
184
|
+
&.el-x-prompts-nested {
|
|
185
|
+
margin-top: 5px;
|
|
186
|
+
align-self: stretch;
|
|
187
|
+
|
|
188
|
+
.el-x-prompts-list {
|
|
189
|
+
align-items: stretch;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.el-x-prompts-item {
|
|
193
|
+
border: 0;
|
|
194
|
+
background: $--background-color-base;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
package/src/styles/Sender.scss
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
@import '../theme/var.scss';
|
|
2
2
|
|
|
3
3
|
// 设置全局CSS变量默认值
|
|
4
|
-
:root {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
4
|
+
// :root {
|
|
5
|
+
// --el-x-sender-trigger-popover-width: fit-content;
|
|
6
|
+
// --el-x-sender-trigger-popover-left: 0px;
|
|
7
|
+
// }
|
|
8
8
|
|
|
9
9
|
$--el-x-sender-box-shadow-tertiary: 0 1px 2px 0 rgba(0, 0, 0, 0.03),
|
|
10
|
-
|
|
10
|
+
0 1px 6px -1px rgba(0, 0, 0, 0.02),
|
|
11
|
+
0 2px 4px 0 rgba(0, 0, 0, 0.02);
|
|
11
12
|
$--el-x-sender-input-font-size: 14px;
|
|
12
|
-
$--el-x-sender-header-animation-duration: 300ms;
|
|
13
|
+
// $--el-x-sender-header-animation-duration: 300ms;
|
|
13
14
|
$--el-x-border-width: $--border-width-base;
|
|
14
15
|
$--el-x-padding-xs: 8px;
|
|
15
16
|
$--el-x-padding-sm: 12px;
|
|
@@ -36,7 +37,7 @@ $--el-x-fill-color: $--background-color-base;
|
|
|
36
37
|
border-color: $--el-x-border-color;
|
|
37
38
|
border-width: 0;
|
|
38
39
|
border-style: solid;
|
|
39
|
-
transition: width
|
|
40
|
+
transition: width var(--el-x-sender-header-animation-duration);
|
|
40
41
|
|
|
41
42
|
&:after {
|
|
42
43
|
content: '';
|
|
@@ -68,25 +69,35 @@ $--el-x-fill-color: $--background-color-base;
|
|
|
68
69
|
padding: 0;
|
|
69
70
|
}
|
|
70
71
|
|
|
71
|
-
// 展开收起动画
|
|
72
|
+
// 展开收起动画 - calc-size:解决无法对某些非固定尺寸(如 auto、min-content、max-content 等)进行动画过渡的新特性
|
|
72
73
|
.slide-enter-active,
|
|
73
74
|
.slide-leave-active {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
height: calc-size(max-content, size);
|
|
76
|
+
opacity: 1;
|
|
77
|
+
transition:
|
|
78
|
+
height var(--el-x-sender-header-animation-duration),
|
|
79
|
+
opacity var(--el-x-sender-header-animation-duration),
|
|
80
|
+
border var(--el-x-sender-header-animation-duration);
|
|
77
81
|
overflow: hidden;
|
|
78
82
|
}
|
|
79
83
|
|
|
80
|
-
// .slide-enter-from,
|
|
81
|
-
// .slide-leave-to {
|
|
82
|
-
// height: 0;
|
|
83
|
-
// opacity: 0;
|
|
84
|
-
// }
|
|
85
|
-
|
|
86
84
|
.slide-enter,
|
|
87
85
|
.slide-leave-to {
|
|
88
86
|
height: 0;
|
|
89
|
-
opacity: 0;
|
|
87
|
+
opacity: 0 !important;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.slide-enter-to,
|
|
91
|
+
.slide-leave {
|
|
92
|
+
height: calc-size(max-content, size);
|
|
93
|
+
opacity: 1;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// 确保内部内容能够正确收缩
|
|
97
|
+
.slide-enter-active .el-x-sender-header-wrap,
|
|
98
|
+
.slide-leave-active .el-x-sender-header-wrap {
|
|
99
|
+
min-height: 0;
|
|
100
|
+
overflow: hidden;
|
|
90
101
|
}
|
|
91
102
|
|
|
92
103
|
.el-x-sender-header {
|
package/src/styles/Thinking.scss
CHANGED
|
@@ -66,18 +66,48 @@
|
|
|
66
66
|
transform: rotate(180deg);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
// .slide-enter-active,
|
|
70
|
+
// .slide-leave-active {
|
|
71
|
+
// transition: max-height var(--el-x-thinking-animation-duration) ease-out,
|
|
72
|
+
// transform var(--el-x-thinking-animation-duration) ease-out,
|
|
73
|
+
// opacity var(--el-x-thinking-animation-duration) ease-out;
|
|
74
|
+
// overflow: hidden;
|
|
75
|
+
// }
|
|
76
|
+
|
|
77
|
+
// .slide-enter,
|
|
78
|
+
// .slide-leave-to {
|
|
79
|
+
// max-height: 0;
|
|
80
|
+
// transform: translateY(-10px);
|
|
81
|
+
// opacity: 0;
|
|
82
|
+
// }
|
|
83
|
+
|
|
84
|
+
// .slide-enter-to,
|
|
85
|
+
// .slide-leave {
|
|
86
|
+
// max-height: 200px;
|
|
87
|
+
// transform: translateY(0);
|
|
88
|
+
// opacity: 1;
|
|
89
|
+
// }
|
|
69
90
|
.slide-enter-active,
|
|
70
91
|
.slide-leave-active {
|
|
71
|
-
height: max-content;
|
|
72
|
-
|
|
73
|
-
|
|
92
|
+
height: calc-size(max-content, size);
|
|
93
|
+
opacity: 1;
|
|
94
|
+
transition:
|
|
95
|
+
height var(--el-x-thinking-animation-duration),
|
|
96
|
+
opacity var(--el-x-thinking-animation-duration),
|
|
97
|
+
border var(--el-x-thinking-animation-duration);
|
|
74
98
|
overflow: hidden;
|
|
75
99
|
}
|
|
76
100
|
|
|
77
|
-
.slide-enter
|
|
101
|
+
.slide-enter,
|
|
78
102
|
.slide-leave-to {
|
|
79
|
-
height: 0
|
|
80
|
-
opacity: 0;
|
|
103
|
+
height: 0;
|
|
104
|
+
opacity: 0 !important;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.slide-enter-to,
|
|
108
|
+
.slide-leave {
|
|
109
|
+
height: calc-size(max-content, size);
|
|
110
|
+
opacity: 1;
|
|
81
111
|
}
|
|
82
112
|
|
|
83
113
|
.content-wrapper {
|