@longhongguo/form-create-ant-design-vue 3.2.69 → 3.2.70
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.70",
|
|
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/spin.js
CHANGED
|
@@ -153,23 +153,20 @@ export default {
|
|
|
153
153
|
ctx.prop.props?.containerMode ??
|
|
154
154
|
true
|
|
155
155
|
|
|
156
|
-
// children
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
let spinChildren
|
|
160
|
-
if (containerMode) {
|
|
161
|
-
// 容器模式:总是渲染 children,即使为空
|
|
162
|
-
spinChildren = children && Array.isArray(children) ? children : []
|
|
163
|
-
} else {
|
|
164
|
-
// 独立模式:不渲染 children
|
|
165
|
-
spinChildren = undefined
|
|
156
|
+
// 如果不是容器模式,不渲染 children,直接使用 defaultRender
|
|
157
|
+
if (!containerMode) {
|
|
158
|
+
return ctx.$render.defaultRender(ctx, undefined)
|
|
166
159
|
}
|
|
167
160
|
|
|
161
|
+
// 容器模式:使用传入的 children 参数
|
|
162
|
+
// children 参数已经是渲染好的 vnodes,直接传递给 a-spin
|
|
163
|
+
const childrenNodes = children && Array.isArray(children) ? children : (children || [])
|
|
164
|
+
|
|
168
165
|
// 将 spin 容器包装在 col 中,确保它占满整行(span: 24)
|
|
169
166
|
return ctx.vNode.col(
|
|
170
167
|
{ props: { span: 24 } },
|
|
171
168
|
{
|
|
172
|
-
default: () => [ctx.vNode.make('a-spin', ctx.prop,
|
|
169
|
+
default: () => [ctx.vNode.make('a-spin', ctx.prop, childrenNodes)]
|
|
173
170
|
}
|
|
174
171
|
)
|
|
175
172
|
}
|