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
|
@@ -76,11 +76,11 @@
|
|
|
76
76
|
const grammar = Prism.languages[lang];
|
|
77
77
|
if (grammar) {
|
|
78
78
|
const highlighted = Prism.highlight(code, grammar, lang);
|
|
79
|
-
return
|
|
79
|
+
return highlighted;
|
|
80
80
|
}
|
|
81
|
-
return
|
|
81
|
+
return code;
|
|
82
82
|
} catch {
|
|
83
|
-
return
|
|
83
|
+
return code;
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
86
|
}),
|
|
@@ -158,7 +158,6 @@
|
|
|
158
158
|
},
|
|
159
159
|
mounted() {
|
|
160
160
|
this.initMarkdownPlugins();
|
|
161
|
-
this.updateFogColor();
|
|
162
161
|
this.$nextTick(() => {
|
|
163
162
|
Prism.highlightAll();
|
|
164
163
|
});
|
|
@@ -240,9 +239,6 @@
|
|
|
240
239
|
progress: this.typingProgress,
|
|
241
240
|
};
|
|
242
241
|
},
|
|
243
|
-
updateFogColor() {
|
|
244
|
-
// 实现雾化颜色更新逻辑
|
|
245
|
-
},
|
|
246
242
|
},
|
|
247
243
|
};
|
|
248
244
|
</script>
|
|
@@ -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>
|