@xilonglab/vue-main 1.3.8 → 1.3.9

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": "1.3.8",
3
+ "version": "1.3.9",
4
4
  "description": "xilong vue main",
5
5
  "main": "packages/index.js",
6
6
  "scripts": {
@@ -78,24 +78,9 @@ defineExpose({
78
78
  :label-width="`${labelWidth}px`"
79
79
  >
80
80
  <el-row>
81
- <template v-for="col in columns" :key="col.prop">
82
- <slot
83
- v-if="col.slot"
84
- :name="col.slot"
85
- />
86
- <xl-form-col
87
- v-else-if="col.form"
88
- :span="col.form.span"
89
- :l="col.label"
90
- :p="col.prop"
91
- >
92
- <component
93
- :is="`xl-${col.form.type || 'input'}`"
94
- v-model="obj[col.prop]"
95
- v-bind="col.form || {}"
96
- />
97
- </xl-form-col>
98
- </template>
81
+ <xl-dialog-columns
82
+ :columns="columns"
83
+ :obj="obj"/>
99
84
  </el-row>
100
85
  <slot />
101
86
  </el-form>
@@ -0,0 +1,36 @@
1
+ <script setup>
2
+ defineOptions({ name: "XlDialogColumns" })
3
+
4
+ const props = defineProps({
5
+ columns: {
6
+ type: Array,
7
+ default: () => [],
8
+ },
9
+ obj: {
10
+ type: Object,
11
+ default: () => ({}),
12
+ },
13
+ });
14
+ </script>
15
+
16
+ <template>
17
+ <template v-for="col in columns" :key="col.prop">
18
+ <slot
19
+ v-if="col.slot"
20
+ :name="col.slot"
21
+ />
22
+ <xl-form-col
23
+ v-else-if="col.form"
24
+ :span="col.form.span"
25
+ :l="col.label"
26
+ :p="col.prop"
27
+ >
28
+ <component
29
+ :is="`xl-${col.form.type || 'input'}`"
30
+ v-model="obj[col.prop]"
31
+ v-bind="col.form || {}"
32
+ />
33
+ </xl-form-col>
34
+ </template>
35
+ </template>
36
+