@longhongguo/form-create-ant-design-vue 3.2.76 → 3.2.77
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/dist/form-create.css +5 -0
- package/dist/form-create.esm.css +5 -0
- package/dist/form-create.esm.js +2 -2
- package/dist/form-create.esm.js.map +1 -1
- package/dist/form-create.js +2 -2
- package/dist/form-create.js.map +1 -1
- package/package.json +1 -1
- package/src/parsers/flex.js +22 -0
- package/src/parsers/space.js +22 -0
- package/src/style/index.css +5 -0
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.77",
|
|
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
|
@@ -133,6 +133,28 @@ export default {
|
|
|
133
133
|
}
|
|
134
134
|
})
|
|
135
135
|
}
|
|
136
|
+
|
|
137
|
+
// 读取 resetMarginBottom 配置,用于重置包裹 flex 的 ant-form-item 的 margin-bottom
|
|
138
|
+
const resetMarginBottom =
|
|
139
|
+
props.resetMarginBottom ?? ctx.rule.resetMarginBottom ?? false
|
|
140
|
+
if (resetMarginBottom) {
|
|
141
|
+
// 将 class 添加到 wrap 配置中,使其应用到包裹 flex 的 ant-form-item 上
|
|
142
|
+
if (!ctx.rule.wrap) {
|
|
143
|
+
ctx.rule.wrap = {}
|
|
144
|
+
}
|
|
145
|
+
if (typeof ctx.rule.wrap === 'object' && !ctx.rule.wrap.class) {
|
|
146
|
+
ctx.rule.wrap.class = ''
|
|
147
|
+
}
|
|
148
|
+
const wrapClass = typeof ctx.rule.wrap === 'object'
|
|
149
|
+
? (ctx.rule.wrap.class || '').split(' ').filter(Boolean)
|
|
150
|
+
: []
|
|
151
|
+
if (!wrapClass.includes('_fc-reset-margin-bottom')) {
|
|
152
|
+
wrapClass.push('_fc-reset-margin-bottom')
|
|
153
|
+
if (typeof ctx.rule.wrap === 'object') {
|
|
154
|
+
ctx.rule.wrap.class = wrapClass.join(' ')
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
136
158
|
},
|
|
137
159
|
render(children, ctx) {
|
|
138
160
|
// 使用 Ant Design Vue 的 Flex 组件
|
package/src/parsers/space.js
CHANGED
|
@@ -67,6 +67,28 @@ export default {
|
|
|
67
67
|
}
|
|
68
68
|
})
|
|
69
69
|
}
|
|
70
|
+
|
|
71
|
+
// 读取 resetMarginBottom 配置,用于重置包裹 space 的 ant-form-item 的 margin-bottom
|
|
72
|
+
const resetMarginBottom =
|
|
73
|
+
props.resetMarginBottom ?? ctx.rule.resetMarginBottom ?? false
|
|
74
|
+
if (resetMarginBottom) {
|
|
75
|
+
// 将 class 添加到 wrap 配置中,使其应用到包裹 space 的 ant-form-item 上
|
|
76
|
+
if (!ctx.rule.wrap) {
|
|
77
|
+
ctx.rule.wrap = {}
|
|
78
|
+
}
|
|
79
|
+
if (typeof ctx.rule.wrap === 'object' && !ctx.rule.wrap.class) {
|
|
80
|
+
ctx.rule.wrap.class = ''
|
|
81
|
+
}
|
|
82
|
+
const wrapClass = typeof ctx.rule.wrap === 'object'
|
|
83
|
+
? (ctx.rule.wrap.class || '').split(' ').filter(Boolean)
|
|
84
|
+
: []
|
|
85
|
+
if (!wrapClass.includes('_fc-reset-margin-bottom')) {
|
|
86
|
+
wrapClass.push('_fc-reset-margin-bottom')
|
|
87
|
+
if (typeof ctx.rule.wrap === 'object') {
|
|
88
|
+
ctx.rule.wrap.class = wrapClass.join(' ')
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
70
92
|
},
|
|
71
93
|
render(children, ctx) {
|
|
72
94
|
// 使用 Ant Design Vue 的 Space 组件
|
package/src/style/index.css
CHANGED
|
@@ -533,3 +533,8 @@
|
|
|
533
533
|
.ant-flex._fc-flex-vertical > .ant-form-item {
|
|
534
534
|
width: var(--fc-child-width, 100%) !important;
|
|
535
535
|
}
|
|
536
|
+
|
|
537
|
+
/* Flex 和 Space 组件重置包裹它们的 ant-form-item 的 margin-bottom 的样式 */
|
|
538
|
+
.ant-form-item._fc-reset-margin-bottom {
|
|
539
|
+
margin-bottom: 0 !important;
|
|
540
|
+
}
|