@longhongguo/form-create-ant-design-vue 3.3.31 → 3.3.33
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.33",
|
|
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
|
@@ -84,19 +84,12 @@ export default {
|
|
|
84
84
|
)
|
|
85
85
|
})
|
|
86
86
|
|
|
87
|
-
// 应用 componentStyle
|
|
88
|
-
//
|
|
89
|
-
// 但由于执行顺序限制,我们先在这里设置,parser 应该使用合并方式而不是覆盖
|
|
87
|
+
// 应用 componentStyle 到包裹组件的最顶层父容器(如 .fc-form-col)
|
|
88
|
+
// 这样在 Flex 或 Space 布局中,可以给子元素设置 flex: 1 等样式
|
|
90
89
|
if (ctx.rule.componentStyle && typeof ctx.rule.componentStyle === 'object') {
|
|
91
|
-
//
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
// 将 componentStyle 合并到 props.style,直接应用到组件元素本身
|
|
97
|
-
// 这样即使 parser 使用 {...existing, ...new} 的方式合并,componentStyle 也会被保留
|
|
98
|
-
const existingStyle = ctx.prop.props.style || {}
|
|
99
|
-
ctx.prop.props.style = {
|
|
90
|
+
// 将 componentStyle 合并到 prop.style,这会应用到包裹组件的容器上
|
|
91
|
+
const existingStyle = ctx.prop.style || {}
|
|
92
|
+
ctx.prop.style = {
|
|
100
93
|
...existingStyle,
|
|
101
94
|
...ctx.rule.componentStyle
|
|
102
95
|
}
|
package/src/parsers/flex.js
CHANGED
|
@@ -97,16 +97,20 @@ export default {
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
// 同时也合并到 props.style,确保样式生效
|
|
100
|
-
// 注意:保留 componentStyle(如果存在),它应该在最后应用,优先级最高
|
|
101
100
|
if (!ctx.prop.props) {
|
|
102
101
|
ctx.prop.props = {}
|
|
103
102
|
}
|
|
104
|
-
const componentStyle = ctx.rule.componentStyle || {}
|
|
105
103
|
ctx.prop.props.style = {
|
|
106
104
|
...existingPropsStyle,
|
|
107
|
-
...flexStyles
|
|
108
|
-
|
|
109
|
-
|
|
105
|
+
...flexStyles
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// componentStyle 应用到 prop.style(包裹容器),最后合并确保优先级最高
|
|
109
|
+
if (ctx.rule.componentStyle && typeof ctx.rule.componentStyle === 'object') {
|
|
110
|
+
ctx.prop.style = {
|
|
111
|
+
...ctx.prop.style,
|
|
112
|
+
...ctx.rule.componentStyle
|
|
113
|
+
}
|
|
110
114
|
}
|
|
111
115
|
|
|
112
116
|
// 确保 children 存在
|
package/src/parsers/space.js
CHANGED
|
@@ -37,13 +37,14 @@ export default {
|
|
|
37
37
|
if (!ctx.prop.props.style) {
|
|
38
38
|
ctx.prop.props.style = {}
|
|
39
39
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
ctx.prop.props.style = { ...ctx.prop.props.style, ...spaceStyles }
|
|
41
|
+
|
|
42
|
+
// componentStyle 应用到 prop.style(包裹容器),最后合并确保优先级最高
|
|
43
|
+
if (ctx.rule.componentStyle && typeof ctx.rule.componentStyle === 'object') {
|
|
44
|
+
ctx.prop.style = {
|
|
45
|
+
...ctx.prop.style,
|
|
46
|
+
...ctx.rule.componentStyle
|
|
47
|
+
}
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
// 确保 children 存在
|