vue-element-ui-x 0.1.0 → 0.1.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/README.md +109 -27
- package/lib/index.js +2 -2
- package/lib/mixins.js +2 -2
- package/package.json +1 -1
- package/src/mixins/sendMixin.js +1 -1
- package/src/mixins/streamMixin.js +1 -1
package/README.md
CHANGED
|
@@ -1,47 +1,129 @@
|
|
|
1
|
-
# Element
|
|
1
|
+
# Element-UI-X
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**开箱即用的企业级 AI 组件库(基于 Vue 2.x + Element-Ui)**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
<div align="center">
|
|
6
|
+
<img src="https://element-ui-x.com/demo/demo.png" /> 
|
|
7
|
+
<img src="https://element-ui-x.com/demo/demo1.png" /> 
|
|
8
|
+
<img src="https://element-ui-x.com/demo/demo2.png" /> 
|
|
9
|
+
<img src="https://element-ui-x.com/demo/demo3.png" /> 
|
|
10
|
+
<img src="https://element-ui-x.com/demo/demo4.png" /> 
|
|
11
|
+
<img src="https://element-ui-x.com/demo/demo5.png" /> 
|
|
12
|
+
<img src="https://element-ui-x.com/demo/demo6.png" /> 
|
|
13
|
+
<img src="https://element-ui-x.com/demo/demo7.png" /> 
|
|
14
|
+
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
## 📢 快速链接
|
|
18
|
+
|
|
19
|
+
| 资源类型 | <div style="width: 300px;" >链接</div> |
|
|
20
|
+
| ------------ | -------------------------------------------------------------- |
|
|
21
|
+
| **文档** | [📖 开发文档](https://element-ui-x.com/) |
|
|
22
|
+
| **在线演示** | [👁️ 在线预览](https://demo.element-ui-x.com) |
|
|
23
|
+
| **代码仓库** | [🐙 GitHub](https://github.com/worryzyy/element-ui-x) |
|
|
24
|
+
| **NPM 包** | [📦 npm](https://www.npmjs.com/package/vue-element-ui-x) |
|
|
25
|
+
| **问题反馈** | [🐛 提交 Bug](https://github.com/worryzyy/element-ui-x/issues) |
|
|
26
|
+
| **交流讨论** | [🐒 交流群]() |
|
|
27
|
+
|
|
28
|
+
## 🛠️ 核心特性
|
|
29
|
+
|
|
30
|
+
- ✨ **企业级 AI 组件**:内置聊天机器人、语音交互等场景化组件
|
|
31
|
+
- 🚀 **零配置集成**:基于 Element-UI 设计体系,开箱即用
|
|
32
|
+
- 📦 **按需加载**
|
|
33
|
+
|
|
34
|
+
## 📦 安装
|
|
6
35
|
|
|
7
36
|
```bash
|
|
8
|
-
|
|
37
|
+
# NPM
|
|
38
|
+
npm install vue-element-ui-x
|
|
39
|
+
|
|
40
|
+
# PNPM(推荐)
|
|
41
|
+
pnpm install vue-element-ui-x
|
|
42
|
+
|
|
43
|
+
# Yarn
|
|
44
|
+
yarn install vue-element-ui-x
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## 📚 使用案例
|
|
49
|
+
|
|
50
|
+
1. **按需引入**
|
|
51
|
+
|
|
52
|
+
```vue
|
|
53
|
+
<script>
|
|
54
|
+
import { ElXTypewriter } from 'vue-element-ui-x';
|
|
55
|
+
</script>
|
|
56
|
+
|
|
57
|
+
<template>
|
|
58
|
+
<div
|
|
59
|
+
style="display: flex; flex-direction: column; height: 230px; justify-content: space-between;"
|
|
60
|
+
>
|
|
61
|
+
<el-x-typewriter
|
|
62
|
+
content="这是一个基础打字效果演示,展示Typewriter组件的基本功能。"
|
|
63
|
+
:typing="true"
|
|
64
|
+
ref="basicDemo"
|
|
65
|
+
/>
|
|
66
|
+
</div>
|
|
67
|
+
</template>
|
|
9
68
|
```
|
|
10
69
|
|
|
11
|
-
|
|
70
|
+
2. **全局引入**
|
|
12
71
|
|
|
13
|
-
```
|
|
72
|
+
```ts
|
|
73
|
+
// main.ts
|
|
14
74
|
import Vue from 'vue';
|
|
15
75
|
import ElementUI from 'element-ui';
|
|
76
|
+
import './assets/styles/reset.css';
|
|
77
|
+
import 'element-ui/lib/theme-chalk/index.css';
|
|
78
|
+
|
|
16
79
|
import ElementUIX from 'vue-element-ui-x';
|
|
80
|
+
import App from './App.vue';
|
|
81
|
+
import router from './router';
|
|
17
82
|
|
|
18
|
-
// 确保已安装Element UI 2.15.x
|
|
19
83
|
Vue.use(ElementUI);
|
|
20
84
|
Vue.use(ElementUIX);
|
|
85
|
+
|
|
86
|
+
Vue.config.productionTip = false;
|
|
87
|
+
|
|
88
|
+
new Vue({
|
|
89
|
+
router,
|
|
90
|
+
el: '#app',
|
|
91
|
+
render: h => h(App),
|
|
92
|
+
});
|
|
21
93
|
```
|
|
22
94
|
|
|
23
|
-
##
|
|
95
|
+
## 🌟 已实现 组件 和 Mixins
|
|
96
|
+
|
|
97
|
+
| 组件名 | 描述 | 文档链接 |
|
|
98
|
+
| ---------------------- | ----------------- | ----------------------------------------------------------------- |
|
|
99
|
+
| `Typewriter` | 打字动画组件 | [📄 文档](https://element-ui-x.com/components/typewriter.html) |
|
|
100
|
+
| `Bubble` | 气泡消息组件 | [📄 文档](https://element-ui-x.com/components/bubble.html) |
|
|
101
|
+
| `BubbleList` | 气泡消息列表 | [📄 文档](https://element-ui-x.com/components/bubbleList.html) |
|
|
102
|
+
| `Conversations` | 会话管理组件 | [📄 文档](https://element-ui-x.com/components/conversations.html) |
|
|
103
|
+
| `Welcome` | 欢迎组件 | [📄 文档](https://element-ui-x.com/components/welcome.html) |
|
|
104
|
+
| `Prompts ` | 提示集组件 | [📄 文档](https://element-ui-x.com/components/prompts.html) |
|
|
105
|
+
| `FilesCard` | 文件卡片组件 | [📄 文档](https://element-ui-x.com/components/filesCard.html) |
|
|
106
|
+
| `Attachments` | 上传附件组件 | [📄 文档](https://element-ui-x.com/components/attachments.html) |
|
|
107
|
+
| `Sender` | 智能输入框 | [📄 文档](https://element-ui-x.com/components/sender.html) |
|
|
108
|
+
| `Thinking` | 思考中组件 | [📄 文档](https://element-ui-x.com/components/thinking.html) |
|
|
109
|
+
| `ThoughtChain` | 思考链组件 | [📄 文档](https://element-ui-x.com/components/thoughtChain.html) |
|
|
110
|
+
| `recordMixin` | 语音识别 Mixins | [📄 文档](https://element-ui-x.com/components/record-mixins.html) |
|
|
111
|
+
| `streamMixin` | 流模式接口 Mixins | [📄 文档](https://element-ui-x.com/components/stream-mixins.html) |
|
|
112
|
+
| `sendMixin & XRequest` | 流模式 Mixins | [📄 文档](https://element-ui-x.com/components/send-mixins.html) |
|
|
113
|
+
|
|
114
|
+
## 🎯 开发计划 (每周更新)
|
|
115
|
+
|
|
116
|
+
🎀 我们会在 issue 、交流群 等多方面收集大家的遇到的问题,和需求场景,制定短期和长期的开发计划,查看详情请移步 👉 **[开发计划](https://element-ui-x.com/roadmap.html)**
|
|
24
117
|
|
|
25
|
-
|
|
26
|
-
- 要求用户项目已安装 Element UI 2.15.x
|
|
27
|
-
- 如果用户项目没有 Element UI,会自动安装 peerDependencies 中指定的版本
|
|
28
|
-
- 避免重复安装,节省项目体积
|
|
118
|
+
## 🤝 参与贡献
|
|
29
119
|
|
|
30
|
-
|
|
120
|
+
1. **Fork 仓库** → 2. **创建 Feature 分支** → 3. **提交 Pull Request**
|
|
31
121
|
|
|
32
|
-
-
|
|
33
|
-
- Bubble.vue
|
|
34
|
-
- BubbleList.vue
|
|
35
|
-
- Conversations.vue
|
|
36
|
-
- Welcome.vue
|
|
37
|
-
- Prompts.vue
|
|
38
|
-
- FilesCard.vue
|
|
39
|
-
- Attachments.vue
|
|
40
|
-
- Sender.vue
|
|
41
|
-
- MentionSender.vue
|
|
42
|
-
- Thinking.vue
|
|
43
|
-
- ThoughtChain.vue
|
|
122
|
+
详情可以移步 👉 **[开发指南](https://element-ui-x.com/guide/installation.html)**
|
|
44
123
|
|
|
45
|
-
|
|
124
|
+
欢迎:
|
|
46
125
|
|
|
47
|
-
|
|
126
|
+
- 🐛 Bug 修复
|
|
127
|
+
- 💡 新功能提案
|
|
128
|
+
- 📝 文档完善
|
|
129
|
+
- 🎨 样式优化
|
package/lib/index.js
CHANGED
|
@@ -32555,7 +32555,7 @@ class XRequest {
|
|
|
32555
32555
|
}
|
|
32556
32556
|
|
|
32557
32557
|
/**
|
|
32558
|
-
* sendMixin -
|
|
32558
|
+
* sendMixin -
|
|
32559
32559
|
* 用于处理发送操作管理请求状态的 mixin,支持可选的中止功能,同时支持 Promise 和 SSE(服务端事件)
|
|
32560
32560
|
*/
|
|
32561
32561
|
const sendMixin = {
|
|
@@ -32879,7 +32879,7 @@ function XStream(options, signal) {
|
|
|
32879
32879
|
}
|
|
32880
32880
|
|
|
32881
32881
|
/**
|
|
32882
|
-
* streamMixin -
|
|
32882
|
+
* streamMixin -
|
|
32883
32883
|
* 用于处理流式数据的 mixin,支持 SSE 数据解析和中断功能
|
|
32884
32884
|
* @namespace streamMixin
|
|
32885
32885
|
* @type {Object}
|
package/lib/mixins.js
CHANGED
|
@@ -399,7 +399,7 @@ class XRequest {
|
|
|
399
399
|
}
|
|
400
400
|
|
|
401
401
|
/**
|
|
402
|
-
* sendMixin -
|
|
402
|
+
* sendMixin -
|
|
403
403
|
* 用于处理发送操作管理请求状态的 mixin,支持可选的中止功能,同时支持 Promise 和 SSE(服务端事件)
|
|
404
404
|
*/
|
|
405
405
|
const sendMixin = {
|
|
@@ -723,7 +723,7 @@ function XStream(options, signal) {
|
|
|
723
723
|
}
|
|
724
724
|
|
|
725
725
|
/**
|
|
726
|
-
* streamMixin -
|
|
726
|
+
* streamMixin -
|
|
727
727
|
* 用于处理流式数据的 mixin,支持 SSE 数据解析和中断功能
|
|
728
728
|
* @namespace streamMixin
|
|
729
729
|
* @type {Object}
|
package/package.json
CHANGED
package/src/mixins/sendMixin.js
CHANGED