vue-element-ui-x 1.0.41-beta → 1.0.43-beta
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/Sender/index.js +1 -1
- package/lib/components/ThoughtChain/index.js +30 -30
- package/lib/index.common.js +1 -1
- package/lib/index.esm.js +1 -1
- package/lib/index.js +774 -774
- package/lib/index.ssr.js +90 -0
- package/lib/index.umd.js +1 -1
- package/package.json +5 -5
- package/src/components/Attachments/index.js +0 -8
- package/src/components/Attachments/src/main.vue +0 -529
- package/src/components/Bubble/index.js +0 -6
- package/src/components/Bubble/src/main.vue +0 -288
- package/src/components/BubbleList/index.js +0 -8
- package/src/components/BubbleList/src/loading.vue +0 -75
- package/src/components/BubbleList/src/main.vue +0 -444
- package/src/components/Conversations/index.js +0 -8
- package/src/components/Conversations/src/components/item.vue +0 -350
- package/src/components/Conversations/src/main.vue +0 -587
- package/src/components/FilesCard/index.js +0 -8
- package/src/components/FilesCard/src/fileSvg/audio.vue +0 -38
- package/src/components/FilesCard/src/fileSvg/changeFileName.bat +0 -18
- package/src/components/FilesCard/src/fileSvg/code.vue +0 -35
- package/src/components/FilesCard/src/fileSvg/database.vue +0 -94
- package/src/components/FilesCard/src/fileSvg/excel.vue +0 -38
- package/src/components/FilesCard/src/fileSvg/file.vue +0 -40
- package/src/components/FilesCard/src/fileSvg/image.vue +0 -40
- package/src/components/FilesCard/src/fileSvg/index.js +0 -46
- package/src/components/FilesCard/src/fileSvg/link.vue +0 -54
- package/src/components/FilesCard/src/fileSvg/mark.vue +0 -38
- package/src/components/FilesCard/src/fileSvg/pdf.vue +0 -38
- package/src/components/FilesCard/src/fileSvg/ppt.vue +0 -38
- package/src/components/FilesCard/src/fileSvg/three.vue +0 -38
- package/src/components/FilesCard/src/fileSvg/txt.vue +0 -38
- package/src/components/FilesCard/src/fileSvg/unknown.vue +0 -54
- package/src/components/FilesCard/src/fileSvg/video.vue +0 -38
- package/src/components/FilesCard/src/fileSvg/word.vue +0 -38
- package/src/components/FilesCard/src/fileSvg/zip.vue +0 -38
- package/src/components/FilesCard/src/main.vue +0 -403
- package/src/components/FilesCard/src/options.js +0 -18
- package/src/components/Prompts/index.js +0 -8
- package/src/components/Prompts/src/main.vue +0 -248
- package/src/components/Sender/index.js +0 -8
- package/src/components/Sender/src/components/ClearButton.vue +0 -28
- package/src/components/Sender/src/components/Loading.vue +0 -53
- package/src/components/Sender/src/components/LoadingButton.vue +0 -37
- package/src/components/Sender/src/components/SendButton.vue +0 -26
- package/src/components/Sender/src/components/SpeechButton.vue +0 -24
- package/src/components/Sender/src/components/SpeechLoading.vue +0 -87
- package/src/components/Sender/src/components/SpeechLoadingButton.vue +0 -41
- package/src/components/Sender/src/main.vue +0 -803
- package/src/components/Thinking/index.js +0 -8
- package/src/components/Thinking/src/main.vue +0 -199
- package/src/components/ThoughtChain/index.js +0 -8
- package/src/components/ThoughtChain/src/main.vue +0 -291
- package/src/components/Typewriter/index.js +0 -8
- package/src/components/Typewriter/src/main.vue +0 -255
- package/src/components/Welcome/index.js +0 -8
- package/src/components/Welcome/src/main.vue +0 -151
- package/src/index.js +0 -104
- package/src/locale/index.js +0 -97
- package/src/locale/lang/ar.js +0 -18
- package/src/locale/lang/de.js +0 -18
- package/src/locale/lang/en.js +0 -18
- package/src/locale/lang/es.js +0 -18
- package/src/locale/lang/fr.js +0 -18
- package/src/locale/lang/index.js +0 -62
- package/src/locale/lang/it.js +0 -18
- package/src/locale/lang/ja.js +0 -18
- package/src/locale/lang/ko.js +0 -18
- package/src/locale/lang/pt-br.js +0 -18
- package/src/locale/lang/ru-RU.js +0 -18
- package/src/locale/lang/zh-CN.js +0 -18
- package/src/locale/lang/zh-TW.js +0 -18
- package/src/locale/mixin.js +0 -9
- package/src/mixins/index.js +0 -49
- package/src/mixins/recordMixin.js +0 -117
- package/src/mixins/sendMixin.js +0 -450
- package/src/mixins/streamMixin.js +0 -497
- package/src/styles/Attachments.scss +0 -236
- package/src/styles/Bubble.scss +0 -158
- package/src/styles/BubbleList.scss +0 -148
- package/src/styles/Conversations.scss +0 -283
- package/src/styles/FilesCard.scss +0 -222
- package/src/styles/Prompts.scss +0 -197
- package/src/styles/Sender.scss +0 -207
- package/src/styles/Thinking.scss +0 -142
- package/src/styles/ThoughtChain.scss +0 -113
- package/src/styles/Typewriter.scss +0 -66
- package/src/styles/Welcome.scss +0 -283
- package/src/theme/var.scss +0 -183
- package/src/utils/index.js +0 -199
- package/src/utils/scrollDetector.js +0 -34
|
@@ -1,288 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
v-if="!internalDestroyed"
|
|
4
|
-
class="el-x-bubble"
|
|
5
|
-
:class="{
|
|
6
|
-
'el-x-bubble-start': placement === 'start',
|
|
7
|
-
'el-x-bubble-end': placement === 'end',
|
|
8
|
-
'el-x-bubble-no-style': noStyle,
|
|
9
|
-
'el-x-bubble-is-typing': isTypingClass,
|
|
10
|
-
}"
|
|
11
|
-
:style="{
|
|
12
|
-
'--el-box-shadow-tertiary': `0 1px 2px 0 rgba(0, 0, 0, 0.03),
|
|
13
|
-
0 1px 6px -1px rgba(0, 0, 0, 0.02),
|
|
14
|
-
0 2px 4px 0 rgba(0, 0, 0, 0.02)`,
|
|
15
|
-
'--bubble-content-max-width': `${maxWidth}`,
|
|
16
|
-
'--el-x-bubble-avatar-placeholder-width': `${
|
|
17
|
-
$scopedSlots.avatar || $slots.avatar ? '' : avatarSize + 'px'
|
|
18
|
-
}`,
|
|
19
|
-
'--el-x-bubble-avatar-placeholder-height': `${
|
|
20
|
-
$scopedSlots.avatar || $slots.avatar ? '' : avatarSize + 'px'
|
|
21
|
-
}`,
|
|
22
|
-
'--el-x-bubble-avatar-placeholder-gap': `${avatarGap}px`,
|
|
23
|
-
}"
|
|
24
|
-
>
|
|
25
|
-
<!-- 头像 -->
|
|
26
|
-
<div
|
|
27
|
-
v-if="!($scopedSlots.avatar || $slots.avatar) && avatar"
|
|
28
|
-
class="el-x-bubble-avatar el-x-bubble-avatar-size"
|
|
29
|
-
>
|
|
30
|
-
<el-avatar
|
|
31
|
-
:size="0"
|
|
32
|
-
:src="avatar"
|
|
33
|
-
:shape="avatarShape"
|
|
34
|
-
:src-set="avatarSrcSet"
|
|
35
|
-
:alt="avatarAlt"
|
|
36
|
-
@error="avatarError"
|
|
37
|
-
/>
|
|
38
|
-
</div>
|
|
39
|
-
<!-- 头像属性进行占位 -->
|
|
40
|
-
<div
|
|
41
|
-
v-if="!($scopedSlots.avatar || $slots.avatar) && !avatar && avatarSize"
|
|
42
|
-
class="el-x-bubble-avatar-placeholder"
|
|
43
|
-
/>
|
|
44
|
-
|
|
45
|
-
<div
|
|
46
|
-
v-if="$scopedSlots.avatar || $slots.avatar"
|
|
47
|
-
class="el-x-bubble-avatar"
|
|
48
|
-
>
|
|
49
|
-
<slot name="avatar" />
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
<!-- 内容 -->
|
|
53
|
-
<div class="el-x-bubble-content-wrapper">
|
|
54
|
-
<!-- 头部内容 -->
|
|
55
|
-
<div
|
|
56
|
-
v-if="$scopedSlots.header || $slots.header"
|
|
57
|
-
class="el-x-bubble-header"
|
|
58
|
-
>
|
|
59
|
-
<slot name="header" />
|
|
60
|
-
</div>
|
|
61
|
-
|
|
62
|
-
<div
|
|
63
|
-
class="el-x-bubble-content"
|
|
64
|
-
:class="{
|
|
65
|
-
'el-x-bubble-content-loading': loading,
|
|
66
|
-
'el-x-bubble-content-round': shape === 'round' && !noStyle,
|
|
67
|
-
'el-x-bubble-content-corner': shape === 'corner' && !noStyle,
|
|
68
|
-
'el-x-bubble-content-filled': variant === 'filled' && !noStyle,
|
|
69
|
-
'el-x-bubble-content-borderless': variant === 'borderless' && !noStyle,
|
|
70
|
-
'el-x-bubble-content-outlined': variant === 'outlined' && !noStyle,
|
|
71
|
-
'el-x-bubble-content-shadow': variant === 'shadow' && !noStyle,
|
|
72
|
-
}"
|
|
73
|
-
>
|
|
74
|
-
<div
|
|
75
|
-
v-if="!loading"
|
|
76
|
-
class="el-typewriter"
|
|
77
|
-
:class="{
|
|
78
|
-
'no-content': !content,
|
|
79
|
-
}"
|
|
80
|
-
>
|
|
81
|
-
<el-x-typewriter
|
|
82
|
-
v-if="!($scopedSlots.content || $slots.content) && content"
|
|
83
|
-
ref="typewriterRef"
|
|
84
|
-
:typing="_typing"
|
|
85
|
-
:content="content"
|
|
86
|
-
:is-markdown="isMarkdown"
|
|
87
|
-
:is-fog="isFog"
|
|
88
|
-
@start="onStart"
|
|
89
|
-
@writing="onWriting"
|
|
90
|
-
@finish="onFinish"
|
|
91
|
-
/>
|
|
92
|
-
</div>
|
|
93
|
-
|
|
94
|
-
<!-- 内容-自定义 -->
|
|
95
|
-
<slot
|
|
96
|
-
v-if="!internalDestroyed && ($scopedSlots.content || $slots.content) && !loading"
|
|
97
|
-
name="content"
|
|
98
|
-
/>
|
|
99
|
-
|
|
100
|
-
<!-- 加载中-默认 -->
|
|
101
|
-
<div
|
|
102
|
-
v-if="loading && !($scopedSlots.loading || $slots.loading)"
|
|
103
|
-
class="el-x-bubble-loading-wrap"
|
|
104
|
-
>
|
|
105
|
-
<div
|
|
106
|
-
v-for="(_, index) in dots"
|
|
107
|
-
:key="index"
|
|
108
|
-
class="dot"
|
|
109
|
-
:style="{ animationDelay: `${index * 0.2}s` }"
|
|
110
|
-
/>
|
|
111
|
-
</div>
|
|
112
|
-
|
|
113
|
-
<!-- 加载中-自定义 -->
|
|
114
|
-
<div
|
|
115
|
-
v-if="loading && ($scopedSlots.loading || $slots.loading)"
|
|
116
|
-
class="el-x-bubble-loading-wrap"
|
|
117
|
-
>
|
|
118
|
-
<slot name="loading" />
|
|
119
|
-
</div>
|
|
120
|
-
</div>
|
|
121
|
-
|
|
122
|
-
<div
|
|
123
|
-
v-if="$scopedSlots.footer || $slots.footer"
|
|
124
|
-
class="el-x-bubble-footer"
|
|
125
|
-
>
|
|
126
|
-
<slot name="footer" />
|
|
127
|
-
</div>
|
|
128
|
-
</div>
|
|
129
|
-
</div>
|
|
130
|
-
</template>
|
|
131
|
-
<script>
|
|
132
|
-
import ElXTypewriter from '../../Typewriter/index';
|
|
133
|
-
|
|
134
|
-
export default {
|
|
135
|
-
name: 'ElXBubble',
|
|
136
|
-
components: { ElXTypewriter },
|
|
137
|
-
props: {
|
|
138
|
-
content: {
|
|
139
|
-
type: String,
|
|
140
|
-
default: '',
|
|
141
|
-
},
|
|
142
|
-
avatar: {
|
|
143
|
-
type: String,
|
|
144
|
-
default: '',
|
|
145
|
-
},
|
|
146
|
-
placement: {
|
|
147
|
-
type: String,
|
|
148
|
-
default: 'start',
|
|
149
|
-
},
|
|
150
|
-
variant: {
|
|
151
|
-
type: String,
|
|
152
|
-
default: 'filled',
|
|
153
|
-
},
|
|
154
|
-
maxWidth: {
|
|
155
|
-
type: String,
|
|
156
|
-
default: '500px',
|
|
157
|
-
},
|
|
158
|
-
avatarSize: {
|
|
159
|
-
type: Number,
|
|
160
|
-
default: 0,
|
|
161
|
-
},
|
|
162
|
-
avatarGap: {
|
|
163
|
-
type: Number,
|
|
164
|
-
default: 12,
|
|
165
|
-
},
|
|
166
|
-
avatarShape: {
|
|
167
|
-
type: String,
|
|
168
|
-
default: 'circle',
|
|
169
|
-
},
|
|
170
|
-
avatarSrcSet: {
|
|
171
|
-
type: String,
|
|
172
|
-
default: '',
|
|
173
|
-
},
|
|
174
|
-
avatarAlt: {
|
|
175
|
-
type: String,
|
|
176
|
-
default: '',
|
|
177
|
-
},
|
|
178
|
-
avatarFit: {
|
|
179
|
-
type: String,
|
|
180
|
-
default: 'cover',
|
|
181
|
-
},
|
|
182
|
-
noStyle: {
|
|
183
|
-
type: Boolean,
|
|
184
|
-
default: false,
|
|
185
|
-
},
|
|
186
|
-
typing: {
|
|
187
|
-
type: [Boolean, Object],
|
|
188
|
-
default: undefined,
|
|
189
|
-
},
|
|
190
|
-
loading: {
|
|
191
|
-
type: Boolean,
|
|
192
|
-
default: false,
|
|
193
|
-
},
|
|
194
|
-
shape: {
|
|
195
|
-
type: String,
|
|
196
|
-
default: '',
|
|
197
|
-
},
|
|
198
|
-
isMarkdown: {
|
|
199
|
-
type: Boolean,
|
|
200
|
-
default: false,
|
|
201
|
-
},
|
|
202
|
-
isFog: {
|
|
203
|
-
type: Boolean,
|
|
204
|
-
default: false,
|
|
205
|
-
},
|
|
206
|
-
},
|
|
207
|
-
data() {
|
|
208
|
-
return {
|
|
209
|
-
internalDestroyed: false,
|
|
210
|
-
isTypingClass: false,
|
|
211
|
-
};
|
|
212
|
-
},
|
|
213
|
-
computed: {
|
|
214
|
-
_step() {
|
|
215
|
-
if (typeof this.typing === 'object' && this.typing.step) return this.typing.step;
|
|
216
|
-
return 2;
|
|
217
|
-
},
|
|
218
|
-
_suffix() {
|
|
219
|
-
if (typeof this.typing === 'object' && this.typing.suffix) return this.typing.suffix;
|
|
220
|
-
return '|';
|
|
221
|
-
},
|
|
222
|
-
_interval() {
|
|
223
|
-
if (typeof this.typing === 'object' && this.typing.interval) return this.typing.interval;
|
|
224
|
-
return 50;
|
|
225
|
-
},
|
|
226
|
-
_typing() {
|
|
227
|
-
if (typeof this.typing === 'undefined') {
|
|
228
|
-
return false;
|
|
229
|
-
} else if (typeof this.typing === 'boolean') {
|
|
230
|
-
return this.typing;
|
|
231
|
-
} else {
|
|
232
|
-
return {
|
|
233
|
-
suffix: this._suffix,
|
|
234
|
-
step: this._step,
|
|
235
|
-
interval: this._interval,
|
|
236
|
-
};
|
|
237
|
-
}
|
|
238
|
-
},
|
|
239
|
-
dots() {
|
|
240
|
-
return [1, 2, 3];
|
|
241
|
-
},
|
|
242
|
-
},
|
|
243
|
-
watch: {
|
|
244
|
-
content(newVal, oldVal) {
|
|
245
|
-
if (newVal !== oldVal && this.internalDestroyed) {
|
|
246
|
-
this.restart();
|
|
247
|
-
}
|
|
248
|
-
},
|
|
249
|
-
},
|
|
250
|
-
methods: {
|
|
251
|
-
onStart(instance) {
|
|
252
|
-
this.$emit('start', instance);
|
|
253
|
-
},
|
|
254
|
-
onFinish(instance) {
|
|
255
|
-
this.isTypingClass = false;
|
|
256
|
-
this.$emit('finish', instance);
|
|
257
|
-
},
|
|
258
|
-
onWriting(instance) {
|
|
259
|
-
this.isTypingClass = true;
|
|
260
|
-
this.$emit('writing', instance);
|
|
261
|
-
},
|
|
262
|
-
avatarError(e) {
|
|
263
|
-
this.$emit('avatarError', e);
|
|
264
|
-
},
|
|
265
|
-
interrupt() {
|
|
266
|
-
this.$refs.typewriterRef && this.$refs.typewriterRef.interrupt();
|
|
267
|
-
},
|
|
268
|
-
continueTyping() {
|
|
269
|
-
this.$refs.typewriterRef && this.$refs.typewriterRef.continueTyping();
|
|
270
|
-
},
|
|
271
|
-
restart() {
|
|
272
|
-
this.internalDestroyed = false;
|
|
273
|
-
this.$refs.typewriterRef && this.$refs.typewriterRef.restart();
|
|
274
|
-
},
|
|
275
|
-
destroy() {
|
|
276
|
-
this.$refs.typewriterRef && this.$refs.typewriterRef.destroy();
|
|
277
|
-
this.internalDestroyed = true;
|
|
278
|
-
},
|
|
279
|
-
},
|
|
280
|
-
beforeDestroy() {
|
|
281
|
-
this.destroy();
|
|
282
|
-
},
|
|
283
|
-
};
|
|
284
|
-
</script>
|
|
285
|
-
|
|
286
|
-
<style lang="scss" scoped>
|
|
287
|
-
@import '../../../styles/Bubble.scss';
|
|
288
|
-
</style>
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
<script></script>
|
|
2
|
-
|
|
3
|
-
<template>
|
|
4
|
-
<svg
|
|
5
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
-
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
7
|
-
version="1.1"
|
|
8
|
-
width="704"
|
|
9
|
-
height="704"
|
|
10
|
-
viewBox="0 0 704 704"
|
|
11
|
-
>
|
|
12
|
-
<defs>
|
|
13
|
-
<filter
|
|
14
|
-
id="master_svg0_62_10054"
|
|
15
|
-
filterUnits="objectBoundingBox"
|
|
16
|
-
color-interpolation-filters="sRGB"
|
|
17
|
-
x="-0.030120481927710843"
|
|
18
|
-
y="-0.030120481927710843"
|
|
19
|
-
width="1.0602409638554218"
|
|
20
|
-
height="1.0602409638554218"
|
|
21
|
-
>
|
|
22
|
-
<feFlood
|
|
23
|
-
flood-opacity="0"
|
|
24
|
-
result="BackgroundImageFix"
|
|
25
|
-
/>
|
|
26
|
-
<feBlend
|
|
27
|
-
mode="normal"
|
|
28
|
-
in="SourceGraphic"
|
|
29
|
-
in2="BackgroundImageFix"
|
|
30
|
-
result="shape"
|
|
31
|
-
/>
|
|
32
|
-
<feGaussianBlur
|
|
33
|
-
stdDeviation="5"
|
|
34
|
-
result="effect1_foregroundBlur"
|
|
35
|
-
/>
|
|
36
|
-
</filter>
|
|
37
|
-
<linearGradient
|
|
38
|
-
id="master_svg1_62_10082"
|
|
39
|
-
x1="0.5"
|
|
40
|
-
y1="-0.13192443549633026"
|
|
41
|
-
x2="0.42319029569625854"
|
|
42
|
-
y2="1.368432641029358"
|
|
43
|
-
>
|
|
44
|
-
<stop
|
|
45
|
-
offset="9.145302325487137%"
|
|
46
|
-
stop-color="currentColor"
|
|
47
|
-
stop-opacity="1"
|
|
48
|
-
/>
|
|
49
|
-
<stop
|
|
50
|
-
offset="13.636428117752075%"
|
|
51
|
-
stop-color="currentColor"
|
|
52
|
-
stop-opacity="0.07539999485015869"
|
|
53
|
-
/>
|
|
54
|
-
<stop
|
|
55
|
-
offset="16.968481242656708%"
|
|
56
|
-
stop-color="currentColor"
|
|
57
|
-
stop-opacity="0"
|
|
58
|
-
/>
|
|
59
|
-
</linearGradient>
|
|
60
|
-
</defs>
|
|
61
|
-
<g
|
|
62
|
-
transform="matrix(0,1,-1,0,704,-664)"
|
|
63
|
-
filter="url(#master_svg0_62_10054)"
|
|
64
|
-
>
|
|
65
|
-
<path
|
|
66
|
-
d="M1016,684C1199.359,684,1348,535.359,1348,352C1348,168.641,1199.359,20,1016,20C832.641,20,684,168.641,684,352C684,535.359,832.641,684,1016,684ZM1016,32C1192.731,32,1336,175.269,1336,352C1336,528.731,1192.731,672,1016,672C839.269,672,696,528.731,696,352C696,175.269,839.269,32,1016,32Z"
|
|
67
|
-
fill-rule="evenodd"
|
|
68
|
-
fill="url(#master_svg1_62_10082)"
|
|
69
|
-
fill-opacity="1"
|
|
70
|
-
/>
|
|
71
|
-
</g>
|
|
72
|
-
</svg>
|
|
73
|
-
</template>
|
|
74
|
-
|
|
75
|
-
<style scoped></style>
|