@xilonglab/vue-main 0.8.9 → 0.8.16

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/packages/index.js +10 -134
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xilonglab/vue-main",
3
- "version": "0.8.9",
3
+ "version": "0.8.16",
4
4
  "description": "xilong vue main",
5
5
  "main": "packages/index.js",
6
6
  "scripts": {
package/packages/index.js CHANGED
@@ -1,143 +1,19 @@
1
- import XlSideBar from './XlSideBar.vue'
2
- import XlControlBar from './XlControlBar.vue'
3
- import XlBreadcrumb from './XlBreadcrumb.vue'
4
-
5
- // Button Components
6
- import XlAsyncButton from './button/XlAsyncButton.vue'
7
- import XlButton from './button/XlButton.vue'
8
- import XlDeleteButton from './button/XlDeleteButton.vue'
9
- import XlEditButton from './button/XlEditButton.vue'
10
- import XlIconButton from './button/XlIconButton.vue'
11
- import XlUploadButton from './button/XlUploadButton.vue'
12
-
13
- // Form Components
14
- import XlCascader from './form/XlCascader.vue'
15
- import XlCheckbox from './form/XlCheckbox.vue'
16
- import XlDate from './form/XlDate.vue'
17
- import XlFormCol from './form/XlFormCol.vue'
18
- import XlFormRow from './form/XlFormRow.vue'
19
- import XlImageInput from './form/XlImageInput.vue'
20
- import XlInput from './form/XlInput.vue'
21
- import XlMapSelect from './form/XlMapSelect.vue'
22
- import XlNumber from './form/XlNumber.vue'
23
- import XlRadio from './form/XlRadio.vue'
24
- import XlRawSelect from './form/XlRawSelect.vue'
25
- import XlRegion from './form/XlRegion.vue'
26
- import XlSearchSelect from './form/XlSearchSelect.vue'
27
- import XlSelect from './form/XlSelect.vue'
28
- import XlSwitch from './form/XlSwitch.vue'
29
- import XlTabRadio from './form/XlTabRadio.vue'
30
- import XlTags from './form/XlTags.vue'
31
- import XlTextarea from './form/XlTextarea.vue'
32
- import XlTime from './form/XlTime.vue'
33
-
34
- // Dialog Components
35
- // import XlDialog from './dialog/XlDialog.vue'
36
- // import XlFormDialog from './dialog/XlFormDialog.vue'
37
- // import XlStateDialog from './dialog/XlStateDialog.vue'
38
- // import XlEditReviewDialog from './dialog/XlEditReviewDialog.vue'
39
- // import XlImagePreviewDialog from './dialog/XlImagePreviewDialog.vue'
40
- // import XlMessageDialog from './dialog/XlMessageDialog.vue'
41
- // import XlReviewDialog from './dialog/XlReviewDialog.vue'
42
-
43
- // Main Components
44
- // import XlDataView from './main/XlDataView.vue'
45
- // import XlTableFormDialog from './main/XlTableFormDialog.vue'
46
- // import XlNavBar from './main/XlNavBar.vue'
47
- // import XlTabView from './main/XlTabView.vue'
48
- // import XlToolBar from './main/XlToolBar.vue'
49
- // import XlVerticalMenu from './main/XlVerticalMenu.vue'
50
- // import XlStatusIndicator from './main/XlStatusIndicator.vue'
51
- // import XlUpdateIndicator from './main/XlUpdateIndicator.vue'
52
- // import XlAutoSaver from './main/XlAutoSaver.vue'
53
- // import XlLoginForm from './main/XlLoginForm.vue'
54
-
55
- const components = [
56
- XlSideBar,
57
- XlControlBar,
58
- XlBreadcrumb,
59
- // Buttons
60
- XlAsyncButton,
61
- XlButton,
62
- XlDeleteButton,
63
- XlEditButton,
64
- XlIconButton,
65
- XlUploadButton,
66
- // Forms
67
- XlCascader,
68
- XlCheckbox,
69
- XlDate,
70
- XlFormCol,
71
- XlFormRow,
72
- XlImageInput,
73
- XlInput,
74
- XlMapSelect,
75
- XlNumber,
76
- XlRadio,
77
- XlRawSelect,
78
- XlRegion,
79
- XlSearchSelect,
80
- XlSelect,
81
- XlSwitch,
82
- XlTabRadio,
83
- XlTags,
84
- XlTextarea,
85
- XlTime,
86
- // Dialogs
87
- // XlDialog,
88
- // XlFormDialog,
89
- // XlStateDialog,
90
- // XlEditReviewDialog,
91
- // XlImagePreviewDialog,
92
- // XlMessageDialog,
93
- // XlReviewDialog,
94
- // // Main Components
95
- // XlDataView,
96
- // XlTableFormDialog,
97
- // XlNavBar,
98
- // XlTabView,
99
- // XlToolBar,
100
- // XlVerticalMenu,
101
- // XlStatusIndicator,
102
- // XlUpdateIndicator,
103
- // XlAutoSaver,
104
- // XlLoginForm
105
- ];
106
-
107
- // const install = (app) => {
108
- // components.forEach((component) => {
109
- // app.component(component.name, component);
110
- // });
111
- // };
112
-
113
1
  const imports = import.meta.globEager('./**/*.vue');
114
- export default {
115
- install(app) {
116
- for (const path in imports) {
117
- const component = imports[path];
118
- const regex = /\.\/\w+\/(\w+)\.vue$/;
119
- const match = path.match(regex);
120
- const name = match ? match[1] : null;
121
- app.component(name, component.default);
122
- }
123
- },
124
- };
125
-
126
- // let componentsJson = {}
127
- // components.forEach(component => {
128
- // const componentName = component.name
129
- // component.install = function (app) {
130
- // app.component(componentName, component)
131
- // }
132
- // componentsJson[componentName] = component
133
- // })
134
2
 
3
+ const install = (app) => {
4
+ for (const path in imports) {
5
+ const component = imports[path];
6
+ const regex = /\.\/\w+\/(\w+)\.vue$/;
7
+ const match = path.match(regex);
8
+ const name = match ? match[1] : null;
9
+ app.component(name, component.default);
10
+ }
11
+ };
135
12
 
136
13
  if (typeof window !== 'undefined' && window.Vue) {
137
14
  install(window.Vue)
138
15
  }
139
16
 
140
17
  export default {
141
- install,
142
- // ...componentsJson
18
+ install
143
19
  }