vue-element-ui-x 0.1.8-beta → 0.1.10-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/Attachments/index.js +229 -237
- package/lib/components/Bubble/index.js +47 -34
- package/lib/components/BubbleList/index.js +57 -49
- package/lib/components/Conversations/index.js +32 -69
- package/lib/components/FilesCard/index.js +207 -211
- package/lib/components/Prompts/index.js +21 -21
- package/lib/components/Sender/index.js +18 -18
- package/lib/components/Think/index.js +1 -1
- package/lib/components/Thinking/index.js +1 -1
- package/lib/components/ThoughtChain/index.js +60 -47
- package/lib/components/Typewriter/index.js +46 -33
- 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 +479 -427
- 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/Attachments/src/main.vue +10 -10
- 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 +622 -635
- 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/main.vue +4 -8
- 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/Sender/src/main.vue +4 -3
- package/src/components/Think/index.js +8 -8
- package/src/components/Think/src/main.vue +190 -190
- package/src/components/Thinking/index.js +8 -8
- package/src/components/ThoughtChain/index.js +8 -8
- package/src/components/ThoughtChain/src/main.vue +293 -293
- 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/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/Think.scss +134 -134
- package/src/styles/ThoughtChain.scss +113 -113
- package/src/styles/Typewriter.scss +66 -66
- package/src/theme/var.scss +72 -72
- package/lib/attachments.js +0 -3082
- package/lib/bubble-list.js +0 -13840
- package/lib/bubble.js +0 -13125
- package/lib/conversations.js +0 -18825
- package/lib/files-card.js +0 -2471
- package/lib/mixins.js +0 -1016
- package/lib/prompts.js +0 -832
- package/lib/sender.js +0 -1911
- package/lib/think.js +0 -799
- package/lib/thinking.js +0 -809
- package/lib/thought-chain.js +0 -30391
- package/lib/typewriter.js +0 -12788
- package/lib/welcome.js +0 -755
- package/src/styles/button.scss +0 -302
- package/src/styles/var.scss +0 -1052
|
@@ -1,151 +1,151 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
:class="containerClass"
|
|
4
|
-
:style="styleConfig"
|
|
5
|
-
class="el-x-welcome"
|
|
6
|
-
>
|
|
7
|
-
<!-- image -->
|
|
8
|
-
<slot name="image">
|
|
9
|
-
<div
|
|
10
|
-
v-if="hasIcon"
|
|
11
|
-
:class="iconClass"
|
|
12
|
-
:style="styles && styles.icon"
|
|
13
|
-
class="el-x-welcome-icon"
|
|
14
|
-
>
|
|
15
|
-
<el-image
|
|
16
|
-
:src="icon"
|
|
17
|
-
class="icon-image"
|
|
18
|
-
/>
|
|
19
|
-
</div>
|
|
20
|
-
</slot>
|
|
21
|
-
|
|
22
|
-
<div class="content-wrapper">
|
|
23
|
-
<!-- extra -->
|
|
24
|
-
<div
|
|
25
|
-
v-if="hasTitleOrExtra"
|
|
26
|
-
class="title-wrapper"
|
|
27
|
-
>
|
|
28
|
-
<div
|
|
29
|
-
v-if="title"
|
|
30
|
-
:class="titleClass"
|
|
31
|
-
:style="styles && styles.title"
|
|
32
|
-
class="el-x-welcome-title"
|
|
33
|
-
>
|
|
34
|
-
{{ title }}
|
|
35
|
-
</div>
|
|
36
|
-
<div
|
|
37
|
-
v-if="hasExtraOrSlot"
|
|
38
|
-
:class="extraClass"
|
|
39
|
-
:style="styles && styles.extra"
|
|
40
|
-
class="el-x-welcome-extra"
|
|
41
|
-
>
|
|
42
|
-
<slot name="extra">{{ extra }}</slot>
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
|
-
<!-- description -->
|
|
47
|
-
<div
|
|
48
|
-
v-if="hasDescription"
|
|
49
|
-
:class="descriptionClass"
|
|
50
|
-
:style="styles && styles.description"
|
|
51
|
-
class="el-x-welcome-description"
|
|
52
|
-
>
|
|
53
|
-
{{ description }}
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
</template>
|
|
58
|
-
|
|
59
|
-
<script>
|
|
60
|
-
export default {
|
|
61
|
-
name: 'ElXWelcome',
|
|
62
|
-
props: {
|
|
63
|
-
className: {
|
|
64
|
-
type: String,
|
|
65
|
-
default: '',
|
|
66
|
-
},
|
|
67
|
-
rootClassName: {
|
|
68
|
-
type: String,
|
|
69
|
-
default: '',
|
|
70
|
-
},
|
|
71
|
-
variant: {
|
|
72
|
-
type: String,
|
|
73
|
-
default: 'filled',
|
|
74
|
-
validator: value => ['filled', 'borderless'].includes(value),
|
|
75
|
-
},
|
|
76
|
-
direction: {
|
|
77
|
-
type: String,
|
|
78
|
-
default: 'ltr',
|
|
79
|
-
validator: value => ['ltr', 'rtl'].includes(value),
|
|
80
|
-
},
|
|
81
|
-
classNames: {
|
|
82
|
-
type: Object,
|
|
83
|
-
default: () => ({}),
|
|
84
|
-
},
|
|
85
|
-
icon: {
|
|
86
|
-
type: String,
|
|
87
|
-
default: '',
|
|
88
|
-
},
|
|
89
|
-
title: {
|
|
90
|
-
type: String,
|
|
91
|
-
default: '',
|
|
92
|
-
},
|
|
93
|
-
extra: {
|
|
94
|
-
type: [String, Object],
|
|
95
|
-
default: '',
|
|
96
|
-
},
|
|
97
|
-
description: {
|
|
98
|
-
type: String,
|
|
99
|
-
default: '',
|
|
100
|
-
},
|
|
101
|
-
styleConfig: {
|
|
102
|
-
type: Object,
|
|
103
|
-
default: () => ({}),
|
|
104
|
-
},
|
|
105
|
-
styles: {
|
|
106
|
-
type: Object,
|
|
107
|
-
default: () => ({}),
|
|
108
|
-
},
|
|
109
|
-
},
|
|
110
|
-
computed: {
|
|
111
|
-
hasIcon() {
|
|
112
|
-
return !!this.icon;
|
|
113
|
-
},
|
|
114
|
-
hasTitleOrExtra() {
|
|
115
|
-
return !!this.title || !!this.extra;
|
|
116
|
-
},
|
|
117
|
-
hasExtraOrSlot() {
|
|
118
|
-
return !!this.extra || !!this.$slots.extra;
|
|
119
|
-
},
|
|
120
|
-
hasDescription() {
|
|
121
|
-
return !!this.description;
|
|
122
|
-
},
|
|
123
|
-
containerClass() {
|
|
124
|
-
return [
|
|
125
|
-
this.className,
|
|
126
|
-
this.rootClassName,
|
|
127
|
-
`el-x-welcome-${this.variant}`,
|
|
128
|
-
{
|
|
129
|
-
'el-x-welcome-rtl': this.direction === 'rtl',
|
|
130
|
-
},
|
|
131
|
-
];
|
|
132
|
-
},
|
|
133
|
-
iconClass() {
|
|
134
|
-
return this.classNames && this.classNames.icon;
|
|
135
|
-
},
|
|
136
|
-
titleClass() {
|
|
137
|
-
return this.classNames && this.classNames.title;
|
|
138
|
-
},
|
|
139
|
-
extraClass() {
|
|
140
|
-
return this.classNames && this.classNames.extra;
|
|
141
|
-
},
|
|
142
|
-
descriptionClass() {
|
|
143
|
-
return this.classNames && this.classNames.description;
|
|
144
|
-
},
|
|
145
|
-
},
|
|
146
|
-
};
|
|
147
|
-
</script>
|
|
148
|
-
|
|
149
|
-
<style lang="scss" scoped>
|
|
150
|
-
@import '../../../styles/Welcome.scss';
|
|
151
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:class="containerClass"
|
|
4
|
+
:style="styleConfig"
|
|
5
|
+
class="el-x-welcome"
|
|
6
|
+
>
|
|
7
|
+
<!-- image -->
|
|
8
|
+
<slot name="image">
|
|
9
|
+
<div
|
|
10
|
+
v-if="hasIcon"
|
|
11
|
+
:class="iconClass"
|
|
12
|
+
:style="styles && styles.icon"
|
|
13
|
+
class="el-x-welcome-icon"
|
|
14
|
+
>
|
|
15
|
+
<el-image
|
|
16
|
+
:src="icon"
|
|
17
|
+
class="icon-image"
|
|
18
|
+
/>
|
|
19
|
+
</div>
|
|
20
|
+
</slot>
|
|
21
|
+
|
|
22
|
+
<div class="content-wrapper">
|
|
23
|
+
<!-- extra -->
|
|
24
|
+
<div
|
|
25
|
+
v-if="hasTitleOrExtra"
|
|
26
|
+
class="title-wrapper"
|
|
27
|
+
>
|
|
28
|
+
<div
|
|
29
|
+
v-if="title"
|
|
30
|
+
:class="titleClass"
|
|
31
|
+
:style="styles && styles.title"
|
|
32
|
+
class="el-x-welcome-title"
|
|
33
|
+
>
|
|
34
|
+
{{ title }}
|
|
35
|
+
</div>
|
|
36
|
+
<div
|
|
37
|
+
v-if="hasExtraOrSlot"
|
|
38
|
+
:class="extraClass"
|
|
39
|
+
:style="styles && styles.extra"
|
|
40
|
+
class="el-x-welcome-extra"
|
|
41
|
+
>
|
|
42
|
+
<slot name="extra">{{ extra }}</slot>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<!-- description -->
|
|
47
|
+
<div
|
|
48
|
+
v-if="hasDescription"
|
|
49
|
+
:class="descriptionClass"
|
|
50
|
+
:style="styles && styles.description"
|
|
51
|
+
class="el-x-welcome-description"
|
|
52
|
+
>
|
|
53
|
+
{{ description }}
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</template>
|
|
58
|
+
|
|
59
|
+
<script>
|
|
60
|
+
export default {
|
|
61
|
+
name: 'ElXWelcome',
|
|
62
|
+
props: {
|
|
63
|
+
className: {
|
|
64
|
+
type: String,
|
|
65
|
+
default: '',
|
|
66
|
+
},
|
|
67
|
+
rootClassName: {
|
|
68
|
+
type: String,
|
|
69
|
+
default: '',
|
|
70
|
+
},
|
|
71
|
+
variant: {
|
|
72
|
+
type: String,
|
|
73
|
+
default: 'filled',
|
|
74
|
+
validator: value => ['filled', 'borderless'].includes(value),
|
|
75
|
+
},
|
|
76
|
+
direction: {
|
|
77
|
+
type: String,
|
|
78
|
+
default: 'ltr',
|
|
79
|
+
validator: value => ['ltr', 'rtl'].includes(value),
|
|
80
|
+
},
|
|
81
|
+
classNames: {
|
|
82
|
+
type: Object,
|
|
83
|
+
default: () => ({}),
|
|
84
|
+
},
|
|
85
|
+
icon: {
|
|
86
|
+
type: String,
|
|
87
|
+
default: '',
|
|
88
|
+
},
|
|
89
|
+
title: {
|
|
90
|
+
type: String,
|
|
91
|
+
default: '',
|
|
92
|
+
},
|
|
93
|
+
extra: {
|
|
94
|
+
type: [String, Object],
|
|
95
|
+
default: '',
|
|
96
|
+
},
|
|
97
|
+
description: {
|
|
98
|
+
type: String,
|
|
99
|
+
default: '',
|
|
100
|
+
},
|
|
101
|
+
styleConfig: {
|
|
102
|
+
type: Object,
|
|
103
|
+
default: () => ({}),
|
|
104
|
+
},
|
|
105
|
+
styles: {
|
|
106
|
+
type: Object,
|
|
107
|
+
default: () => ({}),
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
computed: {
|
|
111
|
+
hasIcon() {
|
|
112
|
+
return !!this.icon;
|
|
113
|
+
},
|
|
114
|
+
hasTitleOrExtra() {
|
|
115
|
+
return !!this.title || !!this.extra;
|
|
116
|
+
},
|
|
117
|
+
hasExtraOrSlot() {
|
|
118
|
+
return !!this.extra || !!this.$slots.extra;
|
|
119
|
+
},
|
|
120
|
+
hasDescription() {
|
|
121
|
+
return !!this.description;
|
|
122
|
+
},
|
|
123
|
+
containerClass() {
|
|
124
|
+
return [
|
|
125
|
+
this.className,
|
|
126
|
+
this.rootClassName,
|
|
127
|
+
`el-x-welcome-${this.variant}`,
|
|
128
|
+
{
|
|
129
|
+
'el-x-welcome-rtl': this.direction === 'rtl',
|
|
130
|
+
},
|
|
131
|
+
];
|
|
132
|
+
},
|
|
133
|
+
iconClass() {
|
|
134
|
+
return this.classNames && this.classNames.icon;
|
|
135
|
+
},
|
|
136
|
+
titleClass() {
|
|
137
|
+
return this.classNames && this.classNames.title;
|
|
138
|
+
},
|
|
139
|
+
extraClass() {
|
|
140
|
+
return this.classNames && this.classNames.extra;
|
|
141
|
+
},
|
|
142
|
+
descriptionClass() {
|
|
143
|
+
return this.classNames && this.classNames.description;
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
};
|
|
147
|
+
</script>
|
|
148
|
+
|
|
149
|
+
<style lang="scss" scoped>
|
|
150
|
+
@import '../../../styles/Welcome.scss';
|
|
151
|
+
</style>
|
package/src/mixins/sendMixin.js
CHANGED
|
@@ -44,6 +44,9 @@ export class XRequest {
|
|
|
44
44
|
signal,
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
+
// 用于存储跨 chunk 的不完整数据
|
|
48
|
+
let buffer = '';
|
|
49
|
+
|
|
47
50
|
return fetch(this._baseURL + url, fetchOptions)
|
|
48
51
|
.then(res => res.body)
|
|
49
52
|
.then(async body => {
|
|
@@ -60,6 +63,10 @@ export class XRequest {
|
|
|
60
63
|
done = streamDone;
|
|
61
64
|
|
|
62
65
|
if (streamDone) {
|
|
66
|
+
// 处理缓冲区中剩余的数据
|
|
67
|
+
if (buffer.trim()) {
|
|
68
|
+
this.processBufferData(buffer);
|
|
69
|
+
}
|
|
63
70
|
this._onFinish && this._onFinish(this._messages);
|
|
64
71
|
return;
|
|
65
72
|
}
|
|
@@ -68,17 +75,23 @@ export class XRequest {
|
|
|
68
75
|
const chunk = decoder.decode(value, {
|
|
69
76
|
stream: true,
|
|
70
77
|
});
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
// console.log('chunk:', chunk);
|
|
79
|
+
// 将新数据添加到缓冲区
|
|
80
|
+
buffer += chunk;
|
|
81
|
+
|
|
82
|
+
// 处理缓冲区中的完整行
|
|
83
|
+
buffer = this.processBuffer(buffer);
|
|
84
|
+
// const chunkUse = chunk.startsWith('data: ') ? chunk.slice(6) : chunk;
|
|
85
|
+
|
|
86
|
+
// try {
|
|
87
|
+
// const res = this._transformer ? this._transformer(chunkUse) : chunkUse;
|
|
88
|
+
// this._messages.push(res);
|
|
89
|
+
// this._onMessage && this._onMessage(res);
|
|
90
|
+
// } catch (error) {
|
|
91
|
+
// this._onError && this._onError(error);
|
|
92
|
+
// this._controller && this._controller.abort();
|
|
93
|
+
// return Promise.reject(error);
|
|
94
|
+
// }
|
|
82
95
|
}
|
|
83
96
|
}
|
|
84
97
|
})
|
|
@@ -91,6 +104,86 @@ export class XRequest {
|
|
|
91
104
|
this._controller && this._controller.abort();
|
|
92
105
|
});
|
|
93
106
|
}
|
|
107
|
+
/**
|
|
108
|
+
* 处理缓冲区数据,提取完整的行
|
|
109
|
+
* @param {string} buffer - 缓冲区数据
|
|
110
|
+
* @returns {string} 剩余的不完整数据
|
|
111
|
+
*/
|
|
112
|
+
processBuffer(buffer) {
|
|
113
|
+
const lines = buffer.split('\n');
|
|
114
|
+
// console.log('lines:', lines);
|
|
115
|
+
// 保留最后一行(可能不完整)
|
|
116
|
+
const remainingData = lines.pop();
|
|
117
|
+
|
|
118
|
+
// 处理完整的行
|
|
119
|
+
for (const line of lines) {
|
|
120
|
+
this.processLine(line);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
return remainingData || '';
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* 处理单行数据
|
|
128
|
+
* @param {string} line - 单行数据
|
|
129
|
+
*/
|
|
130
|
+
processLine(line) {
|
|
131
|
+
// 跳过空行
|
|
132
|
+
if (!line.trim()) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// 处理 data: 开头的行
|
|
137
|
+
if (line.startsWith('data: ')) {
|
|
138
|
+
const dataContent = line.slice(6);
|
|
139
|
+
|
|
140
|
+
// 检查是否是结束标识
|
|
141
|
+
if (dataContent.trim() === '[DONE]') {
|
|
142
|
+
this._isFinished = true;
|
|
143
|
+
this._onFinish && this._onFinish(this._messages);
|
|
144
|
+
this.abort();
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// 跳过空数据
|
|
149
|
+
if (!dataContent.trim()) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
try {
|
|
154
|
+
// 尝试解析和处理数据
|
|
155
|
+
let processedData;
|
|
156
|
+
try {
|
|
157
|
+
// 首先尝试作为 JSON 解析
|
|
158
|
+
processedData = JSON.parse(dataContent);
|
|
159
|
+
} catch {
|
|
160
|
+
// 如果不是 JSON,使用原始数据
|
|
161
|
+
processedData = dataContent;
|
|
162
|
+
}
|
|
163
|
+
// console.log('processedData:', processedData, processedData.answer);
|
|
164
|
+
|
|
165
|
+
const res = this._transformer ? this._transformer(processedData) : processedData;
|
|
166
|
+
this._messages.push(res);
|
|
167
|
+
this._onMessage && this._onMessage(res);
|
|
168
|
+
} catch (error) {
|
|
169
|
+
console.error('Error processing line:', line, error);
|
|
170
|
+
this._onError && this._onError(error);
|
|
171
|
+
this._controller && this._controller.abort();
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
// 可以在这里处理其他类型的行(如果需要)
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* 处理缓冲区中剩余的数据(在流结束时调用)
|
|
179
|
+
* @param {string} buffer - 剩余的缓冲区数据
|
|
180
|
+
*/
|
|
181
|
+
processBufferData(buffer) {
|
|
182
|
+
const lines = buffer.split('\n');
|
|
183
|
+
for (const line of lines) {
|
|
184
|
+
this.processLine(line);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
94
187
|
|
|
95
188
|
_sendWithSSE(url, options = {}) {
|
|
96
189
|
const es = new EventSource(this._baseURL + url, {
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview
|
|
3
|
-
*
|
|
4
|
-
* @author Element UI X Team
|
|
5
|
-
* @version 1.0.0
|
|
2
|
+
* @fileoverview 流式数据处理 Mixin
|
|
3
|
+
* 支持 SSE 数据解析和中断功能
|
|
6
4
|
*/
|
|
7
5
|
|
|
8
6
|
/**
|
|
@@ -189,7 +187,7 @@ function XStream(options, signal) {
|
|
|
189
187
|
}
|
|
190
188
|
|
|
191
189
|
/**
|
|
192
|
-
* streamMixin
|
|
190
|
+
* streamMixin
|
|
193
191
|
* 用于处理流式数据的 mixin,支持 SSE 数据解析和中断功能
|
|
194
192
|
* @namespace streamMixin
|
|
195
193
|
* @type {Object}
|