vue-element-ui-x 0.1.4 → 0.1.5

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +19 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-element-ui-x",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "基于Vue 2 + Element UI的AI聊天组件库",
5
5
  "main": "lib/index.common.js",
6
6
  "module": "lib/index.esm.js",
package/src/index.js CHANGED
@@ -35,14 +35,6 @@ const install = function (Vue) {
35
35
  });
36
36
  };
37
37
 
38
- // 默认导出(完整引入)
39
- export default {
40
- version: '1.0.0',
41
- install,
42
- customMixins,
43
- ...components,
44
- };
45
-
46
38
  // 具名导出(按需引入)- 组件
47
39
  export {
48
40
  ElXAttachments,
@@ -61,3 +53,22 @@ export {
61
53
 
62
54
  // 具名导出(按需引入)- Mixins
63
55
  export { customMixins, streamMixin, sendMixin, recordMixin };
56
+
57
+ // 默认导出(完整引入)
58
+ const ElementUIX = {
59
+ version: '1.0.0',
60
+ install,
61
+ };
62
+
63
+ // 将组件添加到默认导出对象中
64
+ components.forEach(component => {
65
+ ElementUIX[component.name] = component;
66
+ });
67
+
68
+ // 添加mixins
69
+ ElementUIX.customMixins = customMixins;
70
+ ElementUIX.streamMixin = streamMixin;
71
+ ElementUIX.sendMixin = sendMixin;
72
+ ElementUIX.recordMixin = recordMixin;
73
+
74
+ export default ElementUIX;