vue-element-ui-x 0.2.2 → 1.0.1
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 +8 -8
- package/lib/components/Bubble/index.js +116 -113
- package/lib/components/BubbleList/index.js +137 -134
- package/lib/components/Conversations/index.js +14176 -14176
- package/lib/components/FilesCard/index.js +4 -4
- package/lib/components/Prompts/index.js +4 -4
- package/lib/components/Sender/index.js +1594 -1448
- package/lib/components/Thinking/index.js +155 -15
- package/lib/components/ThoughtChain/index.js +121 -118
- package/lib/components/Typewriter/index.js +111 -108
- package/lib/components/Welcome/index.js +4 -4
- package/lib/index.common.js +1 -1
- package/lib/index.esm.js +1 -1
- package/lib/index.js +688 -225
- package/lib/index.umd.js +1 -1
- package/lib/locale/index.js +97 -0
- package/lib/locale/lang/ar-SA.js +18 -0
- package/lib/locale/lang/ar-SA.umd.js +26 -0
- package/lib/locale/lang/ar.js +18 -0
- package/lib/locale/lang/ar.umd.js +26 -0
- package/lib/locale/lang/de-DE.js +18 -0
- package/lib/locale/lang/de-DE.umd.js +26 -0
- package/lib/locale/lang/de.js +18 -0
- package/lib/locale/lang/de.umd.js +26 -0
- package/lib/locale/lang/en.js +18 -0
- package/lib/locale/lang/en.umd.js +26 -0
- package/lib/locale/lang/es-ES.js +18 -0
- package/lib/locale/lang/es-ES.umd.js +26 -0
- package/lib/locale/lang/es.js +18 -0
- package/lib/locale/lang/es.umd.js +26 -0
- package/lib/locale/lang/fr-FR.js +18 -0
- package/lib/locale/lang/fr-FR.umd.js +26 -0
- package/lib/locale/lang/fr.js +18 -0
- package/lib/locale/lang/fr.umd.js +26 -0
- package/lib/locale/lang/index.js +50 -0
- package/lib/locale/lang/it-IT.js +18 -0
- package/lib/locale/lang/it-IT.umd.js +26 -0
- package/lib/locale/lang/it.js +18 -0
- package/lib/locale/lang/it.umd.js +26 -0
- package/lib/locale/lang/ja-JP.js +18 -0
- package/lib/locale/lang/ja-JP.umd.js +26 -0
- package/lib/locale/lang/ja.js +18 -0
- package/lib/locale/lang/ja.umd.js +26 -0
- package/lib/locale/lang/ko-KR.js +18 -0
- package/lib/locale/lang/ko-KR.umd.js +26 -0
- package/lib/locale/lang/ko.js +18 -0
- package/lib/locale/lang/ko.umd.js +26 -0
- package/lib/locale/lang/pt-BR.js +18 -0
- package/lib/locale/lang/pt-BR.umd.js +26 -0
- package/lib/locale/lang/ru-RU.js +18 -0
- package/lib/locale/lang/ru-RU.umd.js +26 -0
- package/lib/locale/lang/zh-CN.js +18 -0
- package/lib/locale/lang/zh-CN.umd.js +26 -0
- package/lib/locale/lang/zh-TW.js +18 -0
- package/lib/locale/lang/zh-TW.umd.js +26 -0
- package/lib/locale/mixin.js +9 -0
- package/package.json +6 -4
- package/src/components/Bubble/src/main.vue +299 -299
- package/src/components/Sender/src/main.vue +12 -3
- package/src/components/Thinking/src/main.vue +10 -5
- package/src/index.js +23 -6
- package/src/locale/index.js +97 -0
- package/src/locale/lang/ar.js +18 -0
- package/src/locale/lang/de.js +18 -0
- package/src/locale/lang/en.js +18 -0
- package/src/locale/lang/es.js +18 -0
- package/src/locale/lang/fr.js +18 -0
- package/src/locale/lang/index.js +62 -0
- package/src/locale/lang/it.js +18 -0
- package/src/locale/lang/ja.js +18 -0
- package/src/locale/lang/ko.js +18 -0
- package/src/locale/lang/pt-br.js +18 -0
- package/src/locale/lang/ru-RU.js +18 -0
- package/src/locale/lang/zh-CN.js +18 -0
- package/src/locale/lang/zh-TW.js +18 -0
- package/src/locale/mixin.js +9 -0
- package/src/styles/Conversations.scss +260 -260
- package/src/styles/Sender.scss +196 -199
package/src/styles/Sender.scss
CHANGED
|
@@ -1,199 +1,196 @@
|
|
|
1
|
-
@import '../theme/var.scss';
|
|
2
|
-
|
|
3
|
-
// 设置全局CSS变量默认值
|
|
4
|
-
:root {
|
|
5
|
-
--el-x-sender-trigger-popover-width: fit-content;
|
|
6
|
-
--el-x-sender-trigger-popover-left: 0px;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
$--el-x-sender-box-shadow-tertiary: 0 1px 2px 0 rgba(0, 0, 0, 0.03),
|
|
10
|
-
0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02);
|
|
11
|
-
$--el-x-sender-input-font-size: 14px;
|
|
12
|
-
$--el-x-sender-header-animation-duration: 300ms;
|
|
13
|
-
$--el-x-border-width: $--border-width-base;
|
|
14
|
-
$--el-x-padding-xs: 8px;
|
|
15
|
-
$--el-x-padding-sm: 12px;
|
|
16
|
-
$--el-x-padding: 16px;
|
|
17
|
-
$--el-x-transition-duration: 0.3s;
|
|
18
|
-
$--el-x-color-primary: $--color-primary;
|
|
19
|
-
$--el-x-color-white: $--color-white;
|
|
20
|
-
$--el-x-box-shadow: $--box-shadow-base;
|
|
21
|
-
$--el-x-border-color: $--border-color-base;
|
|
22
|
-
$--el-x-text-color-primary: $--color-text-primary;
|
|
23
|
-
$--el-x-font-line-height-primary: $--font-line-height-primary;
|
|
24
|
-
$--el-x-fill-color: $--background-color-base;
|
|
25
|
-
|
|
26
|
-
.el-x-sender {
|
|
27
|
-
width: 100%;
|
|
28
|
-
display: flex;
|
|
29
|
-
flex-direction: column;
|
|
30
|
-
|
|
31
|
-
position: relative;
|
|
32
|
-
box-sizing: border-box;
|
|
33
|
-
box-shadow: $--el-x-sender-box-shadow-tertiary;
|
|
34
|
-
transition: background $--el-x-transition-duration;
|
|
35
|
-
border-radius: calc(#{$--border-radius-base} * 2);
|
|
36
|
-
border-color: $--el-x-border-color;
|
|
37
|
-
border-width: 0;
|
|
38
|
-
border-style: solid;
|
|
39
|
-
transition: width $--el-x-sender-header-animation-duration;
|
|
40
|
-
|
|
41
|
-
&:after {
|
|
42
|
-
content: '';
|
|
43
|
-
position: absolute;
|
|
44
|
-
inset: 0;
|
|
45
|
-
pointer-events: none;
|
|
46
|
-
transition: border-color $--el-x-transition-duration;
|
|
47
|
-
border-radius: inherit;
|
|
48
|
-
border-style: inherit;
|
|
49
|
-
border-color: inherit;
|
|
50
|
-
border-width: $--el-x-border-width;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
&:focus-within {
|
|
54
|
-
box-shadow: $--el-x-box-shadow;
|
|
55
|
-
border-color: $--el-x-color-primary;
|
|
56
|
-
|
|
57
|
-
&::after {
|
|
58
|
-
border-width: 2px;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.el-x-sender-header-wrap {
|
|
63
|
-
display: flex;
|
|
64
|
-
flex-direction: column;
|
|
65
|
-
gap: $--el-x-padding-xs;
|
|
66
|
-
width: 100%;
|
|
67
|
-
margin: 0;
|
|
68
|
-
padding: 0;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// 展开收起动画
|
|
72
|
-
.slide-enter-active,
|
|
73
|
-
.slide-leave-active {
|
|
74
|
-
transition: height $--el-x-sender-header-animation-duration,
|
|
75
|
-
opacity $--el-x-sender-header-animation-duration,
|
|
76
|
-
border $--el-x-sender-header-animation-duration;
|
|
77
|
-
overflow: hidden;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// .slide-enter-from,
|
|
81
|
-
// .slide-leave-to {
|
|
82
|
-
// height: 0;
|
|
83
|
-
// opacity: 0;
|
|
84
|
-
// }
|
|
85
|
-
|
|
86
|
-
.slide-enter,
|
|
87
|
-
.slide-leave-to {
|
|
88
|
-
height: 0;
|
|
89
|
-
opacity: 0;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.el-x-sender-header {
|
|
93
|
-
border-bottom-width: $--el-x-border-width;
|
|
94
|
-
border-bottom-style: solid;
|
|
95
|
-
border-bottom-color: $--el-x-border-color;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.el-x-sender-content {
|
|
99
|
-
display: flex;
|
|
100
|
-
gap: $--el-x-padding-xs;
|
|
101
|
-
width: 100%;
|
|
102
|
-
padding-block: $--el-x-padding-sm;
|
|
103
|
-
padding-inline-start: $--el-x-padding;
|
|
104
|
-
padding-inline-end: $--el-x-padding-sm;
|
|
105
|
-
box-sizing: border-box;
|
|
106
|
-
align-items: flex-end;
|
|
107
|
-
|
|
108
|
-
// 前缀
|
|
109
|
-
.el-x-sender-prefix {
|
|
110
|
-
flex: none;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// 输入框
|
|
114
|
-
.el-x-sender-input {
|
|
115
|
-
height: 100%;
|
|
116
|
-
display: flex;
|
|
117
|
-
align-items: center;
|
|
118
|
-
align-self: center;
|
|
119
|
-
|
|
120
|
-
::v-deep .el-textarea__inner {
|
|
121
|
-
padding: 0;
|
|
122
|
-
margin: 0;
|
|
123
|
-
color: $--el-x-text-color-primary;
|
|
124
|
-
font-size: $--el-x-sender-input-font-size;
|
|
125
|
-
line-height: $--el-x-font-line-height-primary;
|
|
126
|
-
list-style: none;
|
|
127
|
-
position: relative;
|
|
128
|
-
display: inline-block;
|
|
129
|
-
box-sizing: border-box;
|
|
130
|
-
width: 100%;
|
|
131
|
-
min-width: 0;
|
|
132
|
-
max-width: 100%;
|
|
133
|
-
height: auto;
|
|
134
|
-
min-height: auto !important;
|
|
135
|
-
border-radius: 0;
|
|
136
|
-
border: none;
|
|
137
|
-
flex: auto;
|
|
138
|
-
align-self: center;
|
|
139
|
-
vertical-align: bottom;
|
|
140
|
-
resize: none;
|
|
141
|
-
background-color: transparent;
|
|
142
|
-
transition: all $--el-x-transition-duration, height 0s;
|
|
143
|
-
box-shadow: none !important;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// 操作列表
|
|
148
|
-
.el-x-sender-action-list-presets {
|
|
149
|
-
display: flex;
|
|
150
|
-
gap: $--el-x-padding-xs;
|
|
151
|
-
flex-direction: row-reverse;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
// 变体样式 --variant
|
|
156
|
-
.content-variant-updown {
|
|
157
|
-
display: flex;
|
|
158
|
-
flex-direction: column;
|
|
159
|
-
align-items: initial;
|
|
160
|
-
|
|
161
|
-
.el-x-sender-updown-wrap {
|
|
162
|
-
display: flex;
|
|
163
|
-
justify-content: space-between;
|
|
164
|
-
gap: 8px;
|
|
165
|
-
|
|
166
|
-
// 前缀
|
|
167
|
-
.el-x-sender-prefix {
|
|
168
|
-
flex: initial;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.el-x-sender-action-list {
|
|
172
|
-
margin-left: auto;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
// 底部容器
|
|
178
|
-
.el-x-sender-footer {
|
|
179
|
-
border-top-width: $--el-x-border-width;
|
|
180
|
-
border-top-style: solid;
|
|
181
|
-
border-top-color: $--el-x-border-color;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.el-x-sender-disabled {
|
|
186
|
-
background-color: $--el-x-fill-color;
|
|
187
|
-
pointer-events: none;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.el-x-sender-trigger-popover {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
width: var(--el-x-sender-trigger-popover-width) !important;
|
|
198
|
-
margin-left: var(--el-x-sender-trigger-popover-left) !important;
|
|
199
|
-
}
|
|
1
|
+
@import '../theme/var.scss';
|
|
2
|
+
|
|
3
|
+
// 设置全局CSS变量默认值
|
|
4
|
+
:root {
|
|
5
|
+
--el-x-sender-trigger-popover-width: fit-content;
|
|
6
|
+
--el-x-sender-trigger-popover-left: 0px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
$--el-x-sender-box-shadow-tertiary: 0 1px 2px 0 rgba(0, 0, 0, 0.03),
|
|
10
|
+
0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02);
|
|
11
|
+
$--el-x-sender-input-font-size: 14px;
|
|
12
|
+
$--el-x-sender-header-animation-duration: 300ms;
|
|
13
|
+
$--el-x-border-width: $--border-width-base;
|
|
14
|
+
$--el-x-padding-xs: 8px;
|
|
15
|
+
$--el-x-padding-sm: 12px;
|
|
16
|
+
$--el-x-padding: 16px;
|
|
17
|
+
$--el-x-transition-duration: 0.3s;
|
|
18
|
+
$--el-x-color-primary: $--color-primary;
|
|
19
|
+
$--el-x-color-white: $--color-white;
|
|
20
|
+
$--el-x-box-shadow: $--box-shadow-base;
|
|
21
|
+
$--el-x-border-color: $--border-color-base;
|
|
22
|
+
$--el-x-text-color-primary: $--color-text-primary;
|
|
23
|
+
$--el-x-font-line-height-primary: $--font-line-height-primary;
|
|
24
|
+
$--el-x-fill-color: $--background-color-base;
|
|
25
|
+
|
|
26
|
+
.el-x-sender {
|
|
27
|
+
width: 100%;
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
|
|
31
|
+
position: relative;
|
|
32
|
+
box-sizing: border-box;
|
|
33
|
+
box-shadow: $--el-x-sender-box-shadow-tertiary;
|
|
34
|
+
transition: background $--el-x-transition-duration;
|
|
35
|
+
border-radius: calc(#{$--border-radius-base} * 2);
|
|
36
|
+
border-color: $--el-x-border-color;
|
|
37
|
+
border-width: 0;
|
|
38
|
+
border-style: solid;
|
|
39
|
+
transition: width $--el-x-sender-header-animation-duration;
|
|
40
|
+
|
|
41
|
+
&:after {
|
|
42
|
+
content: '';
|
|
43
|
+
position: absolute;
|
|
44
|
+
inset: 0;
|
|
45
|
+
pointer-events: none;
|
|
46
|
+
transition: border-color $--el-x-transition-duration;
|
|
47
|
+
border-radius: inherit;
|
|
48
|
+
border-style: inherit;
|
|
49
|
+
border-color: inherit;
|
|
50
|
+
border-width: $--el-x-border-width;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&:focus-within {
|
|
54
|
+
box-shadow: $--el-x-box-shadow;
|
|
55
|
+
border-color: $--el-x-color-primary;
|
|
56
|
+
|
|
57
|
+
&::after {
|
|
58
|
+
border-width: 2px;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.el-x-sender-header-wrap {
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-direction: column;
|
|
65
|
+
gap: $--el-x-padding-xs;
|
|
66
|
+
width: 100%;
|
|
67
|
+
margin: 0;
|
|
68
|
+
padding: 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// 展开收起动画
|
|
72
|
+
.slide-enter-active,
|
|
73
|
+
.slide-leave-active {
|
|
74
|
+
transition: height $--el-x-sender-header-animation-duration,
|
|
75
|
+
opacity $--el-x-sender-header-animation-duration,
|
|
76
|
+
border $--el-x-sender-header-animation-duration;
|
|
77
|
+
overflow: hidden;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// .slide-enter-from,
|
|
81
|
+
// .slide-leave-to {
|
|
82
|
+
// height: 0;
|
|
83
|
+
// opacity: 0;
|
|
84
|
+
// }
|
|
85
|
+
|
|
86
|
+
.slide-enter,
|
|
87
|
+
.slide-leave-to {
|
|
88
|
+
height: 0;
|
|
89
|
+
opacity: 0;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.el-x-sender-header {
|
|
93
|
+
border-bottom-width: $--el-x-border-width;
|
|
94
|
+
border-bottom-style: solid;
|
|
95
|
+
border-bottom-color: $--el-x-border-color;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.el-x-sender-content {
|
|
99
|
+
display: flex;
|
|
100
|
+
gap: $--el-x-padding-xs;
|
|
101
|
+
width: 100%;
|
|
102
|
+
padding-block: $--el-x-padding-sm;
|
|
103
|
+
padding-inline-start: $--el-x-padding;
|
|
104
|
+
padding-inline-end: $--el-x-padding-sm;
|
|
105
|
+
box-sizing: border-box;
|
|
106
|
+
align-items: flex-end;
|
|
107
|
+
|
|
108
|
+
// 前缀
|
|
109
|
+
.el-x-sender-prefix {
|
|
110
|
+
flex: none;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// 输入框
|
|
114
|
+
.el-x-sender-input {
|
|
115
|
+
height: 100%;
|
|
116
|
+
display: flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
align-self: center;
|
|
119
|
+
|
|
120
|
+
::v-deep .el-textarea__inner {
|
|
121
|
+
padding: 0;
|
|
122
|
+
margin: 0;
|
|
123
|
+
color: $--el-x-text-color-primary;
|
|
124
|
+
font-size: $--el-x-sender-input-font-size;
|
|
125
|
+
line-height: $--el-x-font-line-height-primary;
|
|
126
|
+
list-style: none;
|
|
127
|
+
position: relative;
|
|
128
|
+
display: inline-block;
|
|
129
|
+
box-sizing: border-box;
|
|
130
|
+
width: 100%;
|
|
131
|
+
min-width: 0;
|
|
132
|
+
max-width: 100%;
|
|
133
|
+
height: auto;
|
|
134
|
+
min-height: auto !important;
|
|
135
|
+
border-radius: 0;
|
|
136
|
+
border: none;
|
|
137
|
+
flex: auto;
|
|
138
|
+
align-self: center;
|
|
139
|
+
vertical-align: bottom;
|
|
140
|
+
resize: none;
|
|
141
|
+
background-color: transparent;
|
|
142
|
+
transition: all $--el-x-transition-duration, height 0s;
|
|
143
|
+
box-shadow: none !important;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// 操作列表
|
|
148
|
+
.el-x-sender-action-list-presets {
|
|
149
|
+
display: flex;
|
|
150
|
+
gap: $--el-x-padding-xs;
|
|
151
|
+
flex-direction: row-reverse;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// 变体样式 --variant
|
|
156
|
+
.content-variant-updown {
|
|
157
|
+
display: flex;
|
|
158
|
+
flex-direction: column;
|
|
159
|
+
align-items: initial;
|
|
160
|
+
|
|
161
|
+
.el-x-sender-updown-wrap {
|
|
162
|
+
display: flex;
|
|
163
|
+
justify-content: space-between;
|
|
164
|
+
gap: 8px;
|
|
165
|
+
|
|
166
|
+
// 前缀
|
|
167
|
+
.el-x-sender-prefix {
|
|
168
|
+
flex: initial;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.el-x-sender-action-list {
|
|
172
|
+
margin-left: auto;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// 底部容器
|
|
178
|
+
.el-x-sender-footer {
|
|
179
|
+
border-top-width: $--el-x-border-width;
|
|
180
|
+
border-top-style: solid;
|
|
181
|
+
border-top-color: $--el-x-border-color;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.el-x-sender-disabled {
|
|
186
|
+
background-color: $--el-x-fill-color;
|
|
187
|
+
pointer-events: none;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
::v-deep .el-x-sender-trigger-popover {
|
|
191
|
+
max-width: calc(100% - 54px) !important;
|
|
192
|
+
|
|
193
|
+
// 应用自定义变量(如果存在)
|
|
194
|
+
width: var(--el-x-sender-trigger-popover-width) !important;
|
|
195
|
+
margin-left: var(--el-x-sender-trigger-popover-left) !important;
|
|
196
|
+
}
|