vue-element-ui-x 0.1.9-beta → 0.2.0
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 +4 -4
- package/lib/components/Bubble/index.js +47 -34
- package/lib/components/BubbleList/index.js +65 -59
- package/lib/components/Conversations/index.js +29 -66
- package/lib/components/FilesCard/index.js +1 -1
- package/lib/components/Prompts/index.js +23 -23
- package/lib/components/Sender/index.js +6 -6
- package/lib/components/Think/index.js +1 -1
- package/lib/components/Thinking/index.js +5 -5
- package/lib/components/ThoughtChain/index.js +52 -41
- package/lib/components/Typewriter/index.js +46 -33
- package/lib/components/Welcome/index.js +5 -5
- package/lib/index.common.js +1 -1
- package/lib/index.esm.js +1 -1
- package/lib/index.js +266 -463
- package/lib/index.umd.js +1 -1
- package/lib/mixins/index.js +105 -16
- package/package.json +1 -1
- package/src/components/Attachments/index.js +8 -8
- package/src/components/Bubble/index.js +6 -6
- package/src/components/Bubble/src/main.vue +299 -299
- package/src/components/BubbleList/index.js +8 -8
- package/src/components/BubbleList/src/loading.vue +75 -75
- package/src/components/BubbleList/src/main.vue +461 -466
- package/src/components/Conversations/index.js +8 -8
- package/src/components/Conversations/src/components/item.vue +13 -34
- package/src/components/Conversations/src/main.vue +4 -18
- package/src/components/FilesCard/index.js +8 -8
- package/src/components/FilesCard/src/fileSvg/audio.vue +38 -38
- package/src/components/FilesCard/src/fileSvg/code.vue +35 -35
- package/src/components/FilesCard/src/fileSvg/database.vue +94 -94
- package/src/components/FilesCard/src/fileSvg/excel.vue +38 -38
- package/src/components/FilesCard/src/fileSvg/file.vue +40 -40
- package/src/components/FilesCard/src/fileSvg/image.vue +40 -40
- package/src/components/FilesCard/src/fileSvg/index.js +46 -46
- package/src/components/FilesCard/src/fileSvg/link.vue +54 -54
- package/src/components/FilesCard/src/fileSvg/mark.vue +38 -38
- package/src/components/FilesCard/src/fileSvg/pdf.vue +38 -38
- package/src/components/FilesCard/src/fileSvg/ppt.vue +38 -38
- package/src/components/FilesCard/src/fileSvg/three.vue +38 -38
- package/src/components/FilesCard/src/fileSvg/txt.vue +38 -38
- package/src/components/FilesCard/src/fileSvg/unknown.vue +54 -54
- package/src/components/FilesCard/src/fileSvg/video.vue +38 -38
- package/src/components/FilesCard/src/fileSvg/word.vue +38 -38
- package/src/components/FilesCard/src/fileSvg/zip.vue +38 -38
- package/src/components/FilesCard/src/options.js +18 -18
- package/src/components/Prompts/index.js +8 -8
- package/src/components/Prompts/src/main.vue +248 -248
- package/src/components/Sender/index.js +8 -8
- package/src/components/Sender/src/components/ClearButton.vue +28 -28
- package/src/components/Sender/src/components/Loading.vue +53 -53
- package/src/components/Sender/src/components/LoadingButton.vue +39 -39
- package/src/components/Sender/src/components/SendButton.vue +26 -26
- package/src/components/Sender/src/components/SpeechButton.vue +24 -24
- package/src/components/Sender/src/components/SpeechLoading.vue +87 -87
- package/src/components/Sender/src/components/SpeechLoadingButton.vue +43 -43
- package/src/components/Thinking/index.js +8 -8
- package/src/components/ThoughtChain/index.js +8 -8
- package/src/components/Typewriter/index.js +8 -8
- package/src/components/Typewriter/src/main.vue +10 -2
- package/src/components/Welcome/index.js +8 -8
- package/src/components/Welcome/src/main.vue +151 -151
- package/src/index.js +0 -2
- package/src/mixins/recordMixin.js +0 -1
- package/src/mixins/sendMixin.js +104 -11
- package/src/mixins/streamMixin.js +3 -5
- package/src/styles/Attachments.scss +236 -236
- package/src/styles/Bubble.scss +157 -157
- package/src/styles/BubbleList.scss +148 -148
- package/src/styles/Conversations.scss +260 -260
- package/src/styles/FilesCard.scss +221 -221
- package/src/styles/Prompts.scss +195 -195
- package/src/styles/Sender.scss +199 -199
- package/src/styles/Thinking.scss +2 -2
- package/src/styles/ThoughtChain.scss +113 -113
- package/src/styles/Typewriter.scss +66 -66
- package/src/theme/var.scss +72 -72
- package/src/components/Think/index.js +0 -8
- package/src/components/Think/src/main.vue +0 -190
- package/src/styles/Think.scss +0 -134
- package/src/styles/button.scss +0 -302
- package/src/styles/var.scss +0 -1052
package/src/styles/Prompts.scss
CHANGED
|
@@ -1,195 +1,195 @@
|
|
|
1
|
-
@import '../theme/var.scss';
|
|
2
|
-
|
|
3
|
-
// 移动设备断点
|
|
4
|
-
$--mobile-breakpoint: 768px;
|
|
5
|
-
|
|
6
|
-
// Prompts 组件样式
|
|
7
|
-
.el-x-prompts {
|
|
8
|
-
// 基础样式
|
|
9
|
-
&,
|
|
10
|
-
& * {
|
|
11
|
-
box-sizing: border-box;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
max-width: 100%;
|
|
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
|
-
&::-webkit-scrollbar {
|
|
39
|
-
display: none;
|
|
40
|
-
}
|
|
41
|
-
list-style: none;
|
|
42
|
-
padding-left: 0;
|
|
43
|
-
margin: 0;
|
|
44
|
-
align-items: stretch;
|
|
45
|
-
|
|
46
|
-
// 换行
|
|
47
|
-
&-wrap {
|
|
48
|
-
flex-wrap: wrap;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// 垂直排列
|
|
52
|
-
&-vertical {
|
|
53
|
-
flex-direction: column;
|
|
54
|
-
align-items: flex-start;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// 移动设备响应式
|
|
58
|
-
@media screen and (max-width: $--mobile-breakpoint) {
|
|
59
|
-
flex-wrap: wrap;
|
|
60
|
-
gap: 8px;
|
|
61
|
-
|
|
62
|
-
&-wrap {
|
|
63
|
-
justify-content: space-between;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// 项目样式
|
|
69
|
-
.el-x-prompts-item {
|
|
70
|
-
flex: none;
|
|
71
|
-
display: flex;
|
|
72
|
-
gap: 4px;
|
|
73
|
-
height: auto;
|
|
74
|
-
padding: $--el-x-padding-md $--el-x-padding-lg;
|
|
75
|
-
align-items: flex-start;
|
|
76
|
-
justify-content: flex-start;
|
|
77
|
-
background: $--color-white;
|
|
78
|
-
border-radius: $--el-x-border-radius-md;
|
|
79
|
-
transition: border $--all-transition, background $--all-transition;
|
|
80
|
-
border: $--border-width-base $--border-style-base $--border-color-lighter;
|
|
81
|
-
|
|
82
|
-
// 移动设备响应式
|
|
83
|
-
@media screen and (max-width: $--mobile-breakpoint) {
|
|
84
|
-
width: calc(50% - 4px); // 小屏幕上默认两列布局
|
|
85
|
-
min-width: 150px;
|
|
86
|
-
padding: $--el-x-padding-sm $--el-x-padding-md;
|
|
87
|
-
|
|
88
|
-
.el-x-prompts-list-wrap & {
|
|
89
|
-
width: calc(50% - 4px);
|
|
90
|
-
margin-bottom: 8px;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.el-x-prompts-list-vertical & {
|
|
94
|
-
width: 100%;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
&:not(.el-x-prompts-item-has-nest) {
|
|
99
|
-
&:hover {
|
|
100
|
-
cursor: pointer;
|
|
101
|
-
background: $--background-color-base;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
&:active {
|
|
105
|
-
background: $--color-primary-light-9;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// 内容样式
|
|
110
|
-
.el-x-prompts-content {
|
|
111
|
-
flex: auto;
|
|
112
|
-
min-width: 0;
|
|
113
|
-
display: flex;
|
|
114
|
-
gap: 4px;
|
|
115
|
-
flex-direction: column;
|
|
116
|
-
align-items: flex-start;
|
|
117
|
-
|
|
118
|
-
// 移动设备响应式
|
|
119
|
-
@media screen and (max-width: $--mobile-breakpoint) {
|
|
120
|
-
width: 100%;
|
|
121
|
-
gap: 2px;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// 图标、标签和描述共同样式
|
|
126
|
-
.el-x-prompts-icon,
|
|
127
|
-
.el-x-prompts-label,
|
|
128
|
-
.el-x-prompts-desc {
|
|
129
|
-
margin: 0;
|
|
130
|
-
padding: 0;
|
|
131
|
-
font-size: $--el-x-font-size-base;
|
|
132
|
-
line-height: $--el-x-font-line-height-primary;
|
|
133
|
-
text-align: start;
|
|
134
|
-
white-space: normal;
|
|
135
|
-
|
|
136
|
-
// 移动设备响应式
|
|
137
|
-
@media screen and (max-width: $--mobile-breakpoint) {
|
|
138
|
-
font-size: 14px;
|
|
139
|
-
line-height: 1.4;
|
|
140
|
-
overflow: hidden;
|
|
141
|
-
text-overflow: ellipsis;
|
|
142
|
-
display: -webkit-box;
|
|
143
|
-
-webkit-line-clamp: 2;
|
|
144
|
-
-webkit-box-orient: vertical;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
// 标签样式
|
|
149
|
-
.el-x-prompts-label {
|
|
150
|
-
color: $--color-text-primary;
|
|
151
|
-
font-weight: 500;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
// 描述样式
|
|
155
|
-
.el-x-prompts-label + .el-x-prompts-desc {
|
|
156
|
-
color: $--color-text-secondary;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
// 禁用状态
|
|
160
|
-
&.el-x-prompts-item-disabled {
|
|
161
|
-
pointer-events: none;
|
|
162
|
-
background: $--background-color-base;
|
|
163
|
-
|
|
164
|
-
.el-x-prompts-label,
|
|
165
|
-
.el-x-prompts-desc {
|
|
166
|
-
color: $--color-text-secondary;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
// 嵌套样式
|
|
172
|
-
.el-x-prompts-item-has-nest {
|
|
173
|
-
> .el-x-prompts-content {
|
|
174
|
-
> .el-x-prompts-label {
|
|
175
|
-
font-size: $--font-size-large;
|
|
176
|
-
line-height: $--font-line-height-primary;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
// 嵌套组件样式
|
|
182
|
-
&.el-x-prompts-nested {
|
|
183
|
-
margin-top: 5px;
|
|
184
|
-
align-self: stretch;
|
|
185
|
-
|
|
186
|
-
.el-x-prompts-list {
|
|
187
|
-
align-items: stretch;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.el-x-prompts-item {
|
|
191
|
-
border: 0;
|
|
192
|
-
background: $--background-color-base;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
}
|
|
1
|
+
@import '../theme/var.scss';
|
|
2
|
+
|
|
3
|
+
// 移动设备断点
|
|
4
|
+
$--mobile-breakpoint: 768px;
|
|
5
|
+
|
|
6
|
+
// Prompts 组件样式
|
|
7
|
+
.el-x-prompts {
|
|
8
|
+
// 基础样式
|
|
9
|
+
&,
|
|
10
|
+
& * {
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
max-width: 100%;
|
|
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
|
+
&::-webkit-scrollbar {
|
|
39
|
+
display: none;
|
|
40
|
+
}
|
|
41
|
+
list-style: none;
|
|
42
|
+
padding-left: 0;
|
|
43
|
+
margin: 0;
|
|
44
|
+
align-items: stretch;
|
|
45
|
+
|
|
46
|
+
// 换行
|
|
47
|
+
&-wrap {
|
|
48
|
+
flex-wrap: wrap;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// 垂直排列
|
|
52
|
+
&-vertical {
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
align-items: flex-start;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// 移动设备响应式
|
|
58
|
+
@media screen and (max-width: $--mobile-breakpoint) {
|
|
59
|
+
flex-wrap: wrap;
|
|
60
|
+
gap: 8px;
|
|
61
|
+
|
|
62
|
+
&-wrap {
|
|
63
|
+
justify-content: space-between;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// 项目样式
|
|
69
|
+
.el-x-prompts-item {
|
|
70
|
+
flex: none;
|
|
71
|
+
display: flex;
|
|
72
|
+
gap: 4px;
|
|
73
|
+
height: auto;
|
|
74
|
+
padding: $--el-x-padding-md $--el-x-padding-lg;
|
|
75
|
+
align-items: flex-start;
|
|
76
|
+
justify-content: flex-start;
|
|
77
|
+
background: $--color-white;
|
|
78
|
+
border-radius: $--el-x-border-radius-md;
|
|
79
|
+
transition: border $--all-transition, background $--all-transition;
|
|
80
|
+
border: $--border-width-base $--border-style-base $--border-color-lighter;
|
|
81
|
+
|
|
82
|
+
// 移动设备响应式
|
|
83
|
+
@media screen and (max-width: $--mobile-breakpoint) {
|
|
84
|
+
width: calc(50% - 4px); // 小屏幕上默认两列布局
|
|
85
|
+
min-width: 150px;
|
|
86
|
+
padding: $--el-x-padding-sm $--el-x-padding-md;
|
|
87
|
+
|
|
88
|
+
.el-x-prompts-list-wrap & {
|
|
89
|
+
width: calc(50% - 4px);
|
|
90
|
+
margin-bottom: 8px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.el-x-prompts-list-vertical & {
|
|
94
|
+
width: 100%;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&:not(.el-x-prompts-item-has-nest) {
|
|
99
|
+
&:hover {
|
|
100
|
+
cursor: pointer;
|
|
101
|
+
background: $--background-color-base;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&:active {
|
|
105
|
+
background: $--color-primary-light-9;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// 内容样式
|
|
110
|
+
.el-x-prompts-content {
|
|
111
|
+
flex: auto;
|
|
112
|
+
min-width: 0;
|
|
113
|
+
display: flex;
|
|
114
|
+
gap: 4px;
|
|
115
|
+
flex-direction: column;
|
|
116
|
+
align-items: flex-start;
|
|
117
|
+
|
|
118
|
+
// 移动设备响应式
|
|
119
|
+
@media screen and (max-width: $--mobile-breakpoint) {
|
|
120
|
+
width: 100%;
|
|
121
|
+
gap: 2px;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// 图标、标签和描述共同样式
|
|
126
|
+
.el-x-prompts-icon,
|
|
127
|
+
.el-x-prompts-label,
|
|
128
|
+
.el-x-prompts-desc {
|
|
129
|
+
margin: 0;
|
|
130
|
+
padding: 0;
|
|
131
|
+
font-size: $--el-x-font-size-base;
|
|
132
|
+
line-height: $--el-x-font-line-height-primary;
|
|
133
|
+
text-align: start;
|
|
134
|
+
white-space: normal;
|
|
135
|
+
|
|
136
|
+
// 移动设备响应式
|
|
137
|
+
@media screen and (max-width: $--mobile-breakpoint) {
|
|
138
|
+
font-size: 14px;
|
|
139
|
+
line-height: 1.4;
|
|
140
|
+
overflow: hidden;
|
|
141
|
+
text-overflow: ellipsis;
|
|
142
|
+
display: -webkit-box;
|
|
143
|
+
-webkit-line-clamp: 2;
|
|
144
|
+
-webkit-box-orient: vertical;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// 标签样式
|
|
149
|
+
.el-x-prompts-label {
|
|
150
|
+
color: $--color-text-primary;
|
|
151
|
+
font-weight: 500;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// 描述样式
|
|
155
|
+
.el-x-prompts-label + .el-x-prompts-desc {
|
|
156
|
+
color: $--color-text-secondary;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// 禁用状态
|
|
160
|
+
&.el-x-prompts-item-disabled {
|
|
161
|
+
pointer-events: none;
|
|
162
|
+
background: $--background-color-base;
|
|
163
|
+
|
|
164
|
+
.el-x-prompts-label,
|
|
165
|
+
.el-x-prompts-desc {
|
|
166
|
+
color: $--color-text-secondary;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// 嵌套样式
|
|
172
|
+
.el-x-prompts-item-has-nest {
|
|
173
|
+
> .el-x-prompts-content {
|
|
174
|
+
> .el-x-prompts-label {
|
|
175
|
+
font-size: $--font-size-large;
|
|
176
|
+
line-height: $--font-line-height-primary;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// 嵌套组件样式
|
|
182
|
+
&.el-x-prompts-nested {
|
|
183
|
+
margin-top: 5px;
|
|
184
|
+
align-self: stretch;
|
|
185
|
+
|
|
186
|
+
.el-x-prompts-list {
|
|
187
|
+
align-items: stretch;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.el-x-prompts-item {
|
|
191
|
+
border: 0;
|
|
192
|
+
background: $--background-color-base;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|