@longhongguo/form-create-ant-design-vue 3.3.36 → 3.3.38
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.
|
|
3
|
+
"version": "3.3.38",
|
|
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/core/manager.js
CHANGED
|
@@ -86,16 +86,13 @@ export default {
|
|
|
86
86
|
|
|
87
87
|
// 应用 componentStyle 到包裹组件的最顶层父容器(如 .fc-form-col)
|
|
88
88
|
// 这样在 Flex 或 Space 布局中,可以给子元素设置 flex: 1 等样式
|
|
89
|
+
// 注意:componentStyle 是独立的,不合并到 prop.style,避免应用到组件本身
|
|
89
90
|
if (
|
|
90
91
|
ctx.rule.componentStyle &&
|
|
91
92
|
typeof ctx.rule.componentStyle === 'object'
|
|
92
93
|
) {
|
|
93
|
-
// 将 componentStyle
|
|
94
|
-
|
|
95
|
-
ctx.prop.style = {
|
|
96
|
-
...existingStyle,
|
|
97
|
-
...ctx.rule.componentStyle
|
|
98
|
-
}
|
|
94
|
+
// 将 componentStyle 独立存储,在 makeCol 时单独应用
|
|
95
|
+
ctx._componentStyle = ctx.rule.componentStyle
|
|
99
96
|
}
|
|
100
97
|
|
|
101
98
|
// 预览模式下:对 upload 组件设置 disabled
|
|
@@ -549,14 +546,14 @@ export default {
|
|
|
549
546
|
},
|
|
550
547
|
makeCol(rule, uni, children, ctx) {
|
|
551
548
|
const col = rule.col
|
|
552
|
-
// 将 componentStyle
|
|
553
|
-
const
|
|
549
|
+
// 将 componentStyle 独立应用到 col 容器上,不和 prop.style 混用
|
|
550
|
+
const componentStyle = ctx?._componentStyle || {}
|
|
554
551
|
return this.$r(
|
|
555
552
|
{
|
|
556
553
|
class: this.$render.mergeClass(col.class, 'fc-form-col'),
|
|
557
554
|
type: 'col',
|
|
558
555
|
props: col || { span: 24 },
|
|
559
|
-
style:
|
|
556
|
+
style: componentStyle,
|
|
560
557
|
key: `${uni}col`
|
|
561
558
|
},
|
|
562
559
|
children
|
package/src/parsers/flex.js
CHANGED
|
@@ -244,9 +244,13 @@ export default {
|
|
|
244
244
|
|
|
245
245
|
// 将 flex 容器包装在 col 中,确保它占满整行(span: 24)
|
|
246
246
|
// 这样 flex 容器才能有足够的宽度,子项才能自适应展示
|
|
247
|
-
// componentStyle
|
|
247
|
+
// componentStyle 独立应用到 col 容器,不和 prop.style 混用
|
|
248
|
+
const componentStyle = ctx._componentStyle || {}
|
|
248
249
|
return ctx.vNode.col(
|
|
249
|
-
{
|
|
250
|
+
{
|
|
251
|
+
props: { span: 24 },
|
|
252
|
+
style: componentStyle
|
|
253
|
+
},
|
|
250
254
|
{
|
|
251
255
|
default: () => [ctx.vNode.make('a-flex', prop, childrenNodes)]
|
|
252
256
|
}
|
package/src/parsers/space.js
CHANGED
|
@@ -117,9 +117,13 @@ export default {
|
|
|
117
117
|
|
|
118
118
|
// 将 space 容器包装在 col 中,确保它占满整行(span: 24)
|
|
119
119
|
// 这样 space 容器才能有足够的宽度
|
|
120
|
-
// componentStyle
|
|
120
|
+
// componentStyle 独立应用到 col 容器,不和 prop.style 混用
|
|
121
|
+
const componentStyle = ctx._componentStyle || {}
|
|
121
122
|
return ctx.vNode.col(
|
|
122
|
-
{
|
|
123
|
+
{
|
|
124
|
+
props: { span: 24 },
|
|
125
|
+
style: componentStyle
|
|
126
|
+
},
|
|
123
127
|
{
|
|
124
128
|
default: () => [ctx.vNode.make(prop.type, prop, childrenNodes)]
|
|
125
129
|
}
|