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,8 +1,8 @@
|
|
|
1
|
-
import ElXConversations from './src/main.vue';
|
|
2
|
-
|
|
3
|
-
/* istanbul ignore next */
|
|
4
|
-
ElXConversations.install = function (Vue) {
|
|
5
|
-
Vue.component(ElXConversations.name, ElXConversations);
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export default ElXConversations;
|
|
1
|
+
import ElXConversations from './src/main.vue';
|
|
2
|
+
|
|
3
|
+
/* istanbul ignore next */
|
|
4
|
+
ElXConversations.install = function (Vue) {
|
|
5
|
+
Vue.component(ElXConversations.name, ElXConversations);
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export default ElXConversations;
|
|
@@ -43,16 +43,18 @@
|
|
|
43
43
|
class="el-x-conversation-label"
|
|
44
44
|
:class="{ 'text-gradient': isTextOverflow(item.label) }"
|
|
45
45
|
:style="labelStyle"
|
|
46
|
-
>{{ item.label }}</span
|
|
47
46
|
>
|
|
47
|
+
{{ item.label }}
|
|
48
|
+
</span>
|
|
48
49
|
</el-tooltip>
|
|
49
50
|
<span
|
|
50
51
|
v-else
|
|
51
52
|
class="el-x-conversation-label"
|
|
52
53
|
:class="{ 'text-gradient': isTextOverflow(item.label) }"
|
|
53
54
|
:style="labelStyle"
|
|
54
|
-
>{{ item.label }}</span
|
|
55
55
|
>
|
|
56
|
+
{{ item.label }}
|
|
57
|
+
</span>
|
|
56
58
|
</div>
|
|
57
59
|
</slot>
|
|
58
60
|
</div>
|
|
@@ -76,14 +78,6 @@
|
|
|
76
78
|
<el-dropdown
|
|
77
79
|
trigger="click"
|
|
78
80
|
:placement="menuPlacement"
|
|
79
|
-
:offset="menuOffset"
|
|
80
|
-
:teleported="menuTeleported"
|
|
81
|
-
:popper-class="
|
|
82
|
-
menuClassName
|
|
83
|
-
? `el-x-conversation-dropdown-menu ${menuClassName}`
|
|
84
|
-
: 'el-x-conversation-dropdown-menu'
|
|
85
|
-
"
|
|
86
|
-
:max-height="menuMaxHeight"
|
|
87
81
|
:disabled="item.disabled"
|
|
88
82
|
@visible-change="updateMenuStatus"
|
|
89
83
|
@command="onMenuCommand"
|
|
@@ -113,8 +107,9 @@
|
|
|
113
107
|
:divided="menuItem.divided"
|
|
114
108
|
:command="menuItem.command"
|
|
115
109
|
:style="menuItem.menuItemStyle"
|
|
116
|
-
>{{ menuItem.label }}</el-dropdown-item
|
|
117
110
|
>
|
|
111
|
+
{{ menuItem.label }}
|
|
112
|
+
</el-dropdown-item>
|
|
118
113
|
</slot>
|
|
119
114
|
</el-dropdown-menu>
|
|
120
115
|
</el-dropdown>
|
|
@@ -185,14 +180,7 @@
|
|
|
185
180
|
type: String,
|
|
186
181
|
default: 'bottom-start',
|
|
187
182
|
},
|
|
188
|
-
|
|
189
|
-
type: Number,
|
|
190
|
-
default: 50,
|
|
191
|
-
},
|
|
192
|
-
menuMaxHeight: {
|
|
193
|
-
type: Number,
|
|
194
|
-
default: undefined,
|
|
195
|
-
},
|
|
183
|
+
|
|
196
184
|
menuStyle: {
|
|
197
185
|
type: Object,
|
|
198
186
|
default: () => ({}),
|
|
@@ -201,14 +189,6 @@
|
|
|
201
189
|
type: Boolean,
|
|
202
190
|
default: false,
|
|
203
191
|
},
|
|
204
|
-
menuClassName: {
|
|
205
|
-
type: String,
|
|
206
|
-
default: '',
|
|
207
|
-
},
|
|
208
|
-
menuTeleported: {
|
|
209
|
-
type: Boolean,
|
|
210
|
-
default: true,
|
|
211
|
-
},
|
|
212
192
|
active: {
|
|
213
193
|
type: Boolean,
|
|
214
194
|
default: false,
|
|
@@ -306,17 +286,18 @@
|
|
|
306
286
|
// 延迟执行,确保菜单已经渲染完成
|
|
307
287
|
// 展开菜单时候 决定隐藏箭头
|
|
308
288
|
this.$nextTick(() => {
|
|
309
|
-
// 获取页面的所有
|
|
310
|
-
const dropdownMenu = document.querySelectorAll('.el-
|
|
289
|
+
// 获取页面的所有 el-dropdown-menu el-popper 组件
|
|
290
|
+
const dropdownMenu = document.querySelectorAll('.el-dropdown-menu.el-popper');
|
|
291
|
+
|
|
311
292
|
if (dropdownMenu.length === 0) {
|
|
312
293
|
return;
|
|
313
294
|
}
|
|
314
295
|
dropdownMenu.forEach(dropdownMenuItem => {
|
|
315
|
-
// 将它子元素中所有
|
|
296
|
+
// 将它子元素中所有 popper__arrow 元素的 display 设置为 none
|
|
316
297
|
// 如果 dropdownMenuItem 存在,且display 不为 none
|
|
317
298
|
if (dropdownMenuItem && dropdownMenuItem.style.display !== 'none') {
|
|
318
299
|
// 隐藏箭头
|
|
319
|
-
const arrows = dropdownMenuItem.querySelectorAll('.
|
|
300
|
+
const arrows = dropdownMenuItem.querySelectorAll('.popper__arrow');
|
|
320
301
|
if (arrows.length === 0) {
|
|
321
302
|
return;
|
|
322
303
|
}
|
|
@@ -325,9 +306,7 @@
|
|
|
325
306
|
});
|
|
326
307
|
|
|
327
308
|
// 设置 .el-dropdown-menu__item 悬停样式
|
|
328
|
-
const items = dropdownMenuItem.querySelectorAll(
|
|
329
|
-
'.el-dropdown-menu__item:not(.is-disabled)',
|
|
330
|
-
);
|
|
309
|
+
const items = dropdownMenuItem.querySelectorAll('.el-dropdown-menu__item');
|
|
331
310
|
if (items.length === 0) {
|
|
332
311
|
return;
|
|
333
312
|
}
|