@xilonglab/vue-main 1.3.27 → 1.3.28

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.28",
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>
@@ -117,7 +117,7 @@ const { refs, api, params, obj, chartOptions, total } = inject('injections')
117
117
  <!-- 支持通过 slot 属性使用插槽 -->
118
118
  <slot
119
119
  v-if="col.slot"
120
- :name="col.slot"
120
+ :name="`${col.prop}_col`"
121
121
  />
122
122
  <!-- 支持直接指定组件引用 -->
123
123
  <component
@@ -189,7 +189,25 @@ const { refs, api, params, obj, chartOptions, total } = inject('injections')
189
189
  :columns="columns"
190
190
  :handler="handler"
191
191
  >
192
- <slot name="items" />
192
+ <template v-for="col in columns" :key="col.prop">
193
+ <xl-form-col
194
+ v-if="col.form"
195
+ :span="col.form.span"
196
+ :l="col.label"
197
+ :p="col.prop"
198
+ >
199
+ <slot
200
+ v-if="col.slot"
201
+ :name="`${col.prop}_form`"
202
+ />
203
+ <component
204
+ v-else
205
+ :is="`xl-${col.form.type || 'input'}`"
206
+ v-model="obj[col.prop]"
207
+ v-bind="col.form || {}"
208
+ />
209
+ </xl-form-col>
210
+ </template>
193
211
  </xl-data-form-dialog>
194
212
  <slot name="others" />
195
213
  <xl-message-dialog l="确认删除?" :ref="refs.deleteDialog" @confirm="() => api.delete()" />