ecinc-cloud-moayxgl 9.5.0

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/index.js ADDED
@@ -0,0 +1,54 @@
1
+ // 导入单个组件
2
+
3
+ // index
4
+ import YxglIndex from './src/index'
5
+
6
+ // yxsp
7
+ import YxglYxsp from './src/yxsp/index'
8
+
9
+ // yxzy
10
+ import YxglYxzy from './src/yxzy/index'
11
+
12
+ // yygl
13
+ import YxglYygl from './src/yygl/index'
14
+ import YxglYyglWjdj from './src/yygl/wjdj/index'
15
+ import YxglYyglYydj from './src/yygl/yydj/index'
16
+
17
+ // yzgl
18
+ import YxglYzgl from './src/yzgl/index'
19
+
20
+ // zzsw
21
+ import YxglZzsw from './src/zzsw/index'
22
+
23
+
24
+ // 以对象的结构保存组件,便于遍历
25
+ const components = {
26
+ YxglIndex,
27
+ YxglYxsp,
28
+ YxglYxzy,
29
+ YxglYygl,
30
+ YxglYyglWjdj,
31
+ YxglYyglYydj,
32
+ YxglYzgl,
33
+ YxglZzsw
34
+ }
35
+ // 定义 install 方法
36
+ const install = function(Vue) {
37
+ if (install.installed) return
38
+ install.installed = true
39
+ // 遍历并注册全局组件
40
+ Object.keys(components).forEach(key => {
41
+ Vue.component(key, components[key])
42
+ })
43
+ }
44
+
45
+ if (typeof window !== 'undefined' && window.Vue) {
46
+ install(window.Vue)
47
+ }
48
+
49
+ export default {
50
+ // 导出的对象必须具备一个 install 方法
51
+ install,
52
+ // 组件列表
53
+ ...components
54
+ }