@xilonglab/vue-main 1.3.27 → 1.3.29

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.27",
3
+ "version": "1.3.29",
4
4
  "description": "xilong vue main",
5
5
  "main": "packages/index.js",
6
6
  "scripts": {
@@ -78,11 +78,8 @@ defineExpose({
78
78
  :label-width="`${labelWidth}px`"
79
79
  >
80
80
  <el-row>
81
- <xl-dialog-columns
82
- :columns="columns"
83
- :obj="obj"/>
81
+ <slot />
84
82
  </el-row>
85
- <slot />
86
83
  </el-form>
87
84
  </xl-dialog>
88
85
  </template>
@@ -116,9 +116,10 @@ const { refs, api, params, obj, chartOptions, total } = inject('injections')
116
116
  <template v-if="!col.hidden">
117
117
  <!-- 支持通过 slot 属性使用插槽 -->
118
118
  <slot
119
- v-if="col.slot"
120
- :name="col.slot"
119
+ v-if="col.type === 'slot'"
120
+ :name="`${col.prop}-col`"
121
121
  />
122
+
122
123
  <!-- 支持直接指定组件引用 -->
123
124
  <component
124
125
  v-else-if="col.component"
@@ -189,7 +190,25 @@ const { refs, api, params, obj, chartOptions, total } = inject('injections')
189
190
  :columns="columns"
190
191
  :handler="handler"
191
192
  >
192
- <slot name="items" />
193
+ <template v-for="col in columns" :key="col.prop">
194
+ <xl-form-col
195
+ v-if="col.form"
196
+ :span="col.form.span"
197
+ :l="col.label"
198
+ :p="col.prop"
199
+ >
200
+ <slot
201
+ v-if="col.type === 'slot'"
202
+ :name="`${col.prop}-form`"
203
+ />
204
+ <component
205
+ v-else
206
+ :is="`xl-${col.form.type || 'input'}`"
207
+ v-model="obj[col.prop]"
208
+ v-bind="col.form || {}"
209
+ />
210
+ </xl-form-col>
211
+ </template>
193
212
  </xl-data-form-dialog>
194
213
  <slot name="others" />
195
214
  <xl-message-dialog l="确认删除?" :ref="refs.deleteDialog" @confirm="() => api.delete()" />