@longhongguo/form-create-ant-design-vue 3.2.56 → 3.2.57
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.2.
|
|
3
|
+
"version": "3.2.57",
|
|
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",
|
package/src/parsers/flex.js
CHANGED
|
@@ -70,6 +70,30 @@ export default {
|
|
|
70
70
|
if (!ctx.rule.children) {
|
|
71
71
|
ctx.rule.children = []
|
|
72
72
|
}
|
|
73
|
+
|
|
74
|
+
// 为 flex 容器的所有子组件设置 col: false,避免被 a-col 包装
|
|
75
|
+
// 这样可以确保子组件直接作为 flex 子项,而不是占满整行
|
|
76
|
+
if (ctx.rule.children && Array.isArray(ctx.rule.children)) {
|
|
77
|
+
ctx.rule.children.forEach((child) => {
|
|
78
|
+
if (
|
|
79
|
+
child &&
|
|
80
|
+
typeof child === 'object' &&
|
|
81
|
+
!child.type === 'DragTool' &&
|
|
82
|
+
!child.type === 'DragBox'
|
|
83
|
+
) {
|
|
84
|
+
// 只有当 col 未设置或为默认值时才设置
|
|
85
|
+
if (child.col === undefined || child.col === null) {
|
|
86
|
+
child.col = false
|
|
87
|
+
} else if (
|
|
88
|
+
child.col &&
|
|
89
|
+
typeof child.col === 'object' &&
|
|
90
|
+
child.col.show !== false
|
|
91
|
+
) {
|
|
92
|
+
child.col.show = false
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
})
|
|
96
|
+
}
|
|
73
97
|
},
|
|
74
98
|
render(children, ctx) {
|
|
75
99
|
// 使用 Ant Design Vue 的 Flex 组件
|