@xilonglab/vue-main 0.8.16 → 0.8.18

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xilonglab/vue-main",
3
- "version": "0.8.16",
3
+ "version": "0.8.18",
4
4
  "description": "xilong vue main",
5
5
  "main": "packages/index.js",
6
6
  "scripts": {
package/packages/index.js CHANGED
@@ -1,19 +1,127 @@
1
- const imports = import.meta.globEager('./**/*.vue');
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 XlImagePreviewDialog from './dialog/XlImagePreviewDialog.vue'
39
+ import XlMessageDialog from './dialog/XlMessageDialog.vue'
40
+ import XlReviewDialog from './dialog/XlReviewDialog.vue'
41
+
42
+ // Main Components
43
+ import XlDataView from './main/XlDataView.vue'
44
+ import XlDataReview from './main/XlDataReview.vue'
45
+ import XlDataFormDialog from './main/XlDataFormDialog.vue'
46
+ import XlDataReviewDialog from './main/XlDataReviewDialog.vue'
47
+ import XlNavBar from './main/XlNavBar.vue'
48
+ import XlTabView from './main/XlTabView.vue'
49
+ import XlToolBar from './main/XlToolBar.vue'
50
+ import XlVerticalMenu from './main/XlVerticalMenu.vue'
51
+ import XlStatusIndicator from './main/XlStatusIndicator.vue'
52
+ import XlUpdateIndicator from './main/XlUpdateIndicator.vue'
53
+ import XlAutoSaver from './main/XlAutoSaver.vue'
54
+ import XlLoginForm from './main/XlLoginForm.vue'
55
+
56
+ const components = [
57
+ XlSideBar,
58
+ XlControlBar,
59
+ XlBreadcrumb,
60
+ // Buttons
61
+ XlAsyncButton,
62
+ XlButton,
63
+ XlDeleteButton,
64
+ XlEditButton,
65
+ XlIconButton,
66
+ XlUploadButton,
67
+ // Forms
68
+ XlCascader,
69
+ XlCheckbox,
70
+ XlDate,
71
+ XlFormCol,
72
+ XlFormRow,
73
+ XlImageInput,
74
+ XlInput,
75
+ XlMapSelect,
76
+ XlNumber,
77
+ XlRadio,
78
+ XlRawSelect,
79
+ XlRegion,
80
+ XlSearchSelect,
81
+ XlSelect,
82
+ XlSwitch,
83
+ XlTabRadio,
84
+ XlTags,
85
+ XlTextarea,
86
+ XlTime,
87
+ // Dialogs
88
+ XlDialog,
89
+ XlFormDialog,
90
+ XlStateDialog,
91
+ XlImagePreviewDialog,
92
+ XlMessageDialog,
93
+ XlReviewDialog,
94
+ // Main Components
95
+ XlDataView,
96
+ XlDataReview,
97
+ XlDataFormDialog,
98
+ XlDataReviewDialog,
99
+ XlNavBar,
100
+ XlTabView,
101
+ XlToolBar,
102
+ XlVerticalMenu,
103
+ XlStatusIndicator,
104
+ XlUpdateIndicator,
105
+ XlAutoSaver,
106
+ XlLoginForm
107
+ ];
2
108
 
3
109
  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
- }
110
+ components.forEach((component) => {
111
+ app.component(component.name, component);
112
+ });
11
113
  };
12
114
 
13
- if (typeof window !== 'undefined' && window.Vue) {
14
- install(window.Vue)
15
- }
115
+ let componentsJson = {}
116
+ components.forEach(component => {
117
+ const componentName = component.name
118
+ component.install = function (app) {
119
+ app.component(componentName, component)
120
+ }
121
+ componentsJson[componentName] = component
122
+ })
16
123
 
17
124
  export default {
18
- install
125
+ install,
126
+ ...componentsJson
19
127
  }
@@ -65,6 +65,22 @@ defineExpose({
65
65
  <xl-dialog class="xl-data-form-dialog" :ref="refs.dialog" :title="chinese" :width="width" :validate="validate"
66
66
  :callback="callback" @finish="emits('finish')">
67
67
  <el-form :ref="refs.form" :model="obj" :rules="rules" :label-width="`${labelWidth}px`">
68
+ <el-row>
69
+ <template v-for="col in columns" :key="col.prop">
70
+ <xl-form-col
71
+ v-if="col.form"
72
+ :span="col.form.span"
73
+ :l="col.label"
74
+ :p="col.prop"
75
+ >
76
+ <component
77
+ :is="`xl-${col.form.type || 'input'}`"
78
+ v-model="obj.value[col.prop]"
79
+ v-bind="col.form || {}"
80
+ />
81
+ </xl-form-col>
82
+ </template>
83
+ </el-row>
68
84
  <slot />
69
85
  </el-form>
70
86
  </xl-dialog>
File without changes