@longhongguo/form-create-ant-design-vue 3.3.33 → 3.3.34

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": "@longhongguo/form-create-ant-design-vue",
3
- "version": "3.3.33",
3
+ "version": "3.3.34",
4
4
  "description": "AntDesignVue版本低代码表单|FormCreate 是一个可以通过 JSON 生成具有动态渲染、数据收集、验证和提交功能的低代码表单生成组件。支持6个UI框架,适配移动端,并且支持生成任何 Vue 组件。内置20种常用表单组件和自定义组件,再复杂的表单都可以轻松搞定。",
5
5
  "main": "./dist/form-create.min.js",
6
6
  "module": "./dist/form-create.esm.js",
@@ -462,7 +462,7 @@ export default {
462
462
  isFalse(col.show) ||
463
463
  shouldDisableCol
464
464
  ? item
465
- : this.makeCol(rule, uni, [item])
465
+ : this.makeCol(rule, uni, [item], ctx)
466
466
  },
467
467
  isTitle(rule) {
468
468
  if (this.options.form.title === false) return false
@@ -544,13 +544,16 @@ export default {
544
544
 
545
545
  return this.$r(_prop, children)
546
546
  },
547
- makeCol(rule, uni, children) {
547
+ makeCol(rule, uni, children, ctx) {
548
548
  const col = rule.col
549
+ // 将 componentStyle 应用到 col 容器上
550
+ const style = ctx?.prop?.style || {}
549
551
  return this.$r(
550
552
  {
551
553
  class: this.$render.mergeClass(col.class, 'fc-form-col'),
552
554
  type: 'col',
553
555
  props: col || { span: 24 },
556
+ style: style,
554
557
  key: `${uni}col`
555
558
  },
556
559
  children
@@ -249,8 +249,13 @@ export default {
249
249
 
250
250
  // 将 flex 容器包装在 col 中,确保它占满整行(span: 24)
251
251
  // 这样 flex 容器才能有足够的宽度,子项才能自适应展示
252
+ // 应用 componentStyle 到 col 容器(如果存在)
253
+ const componentStyle = ctx.rule.componentStyle || {}
252
254
  return ctx.vNode.col(
253
- { props: { span: 24 } },
255
+ {
256
+ props: { span: 24 },
257
+ style: componentStyle
258
+ },
254
259
  {
255
260
  default: () => [ctx.vNode.make('a-flex', prop, childrenNodes)]
256
261
  }
@@ -122,8 +122,13 @@ export default {
122
122
 
123
123
  // 将 space 容器包装在 col 中,确保它占满整行(span: 24)
124
124
  // 这样 space 容器才能有足够的宽度
125
+ // 应用 componentStyle 到 col 容器(如果存在)
126
+ const componentStyle = ctx.rule.componentStyle || {}
125
127
  return ctx.vNode.col(
126
- { props: { span: 24 } },
128
+ {
129
+ props: { span: 24 },
130
+ style: componentStyle
131
+ },
127
132
  {
128
133
  default: () => [ctx.vNode.make(prop.type, prop, childrenNodes)]
129
134
  }