提交 c8ef82b2 编写于 作者: V vben

fix(form): fix baseColProps not work

上级 cd35d3e0
......@@ -17,6 +17,8 @@
- 修复表单 inputNumber 校验错误
- 修复表单默认值设置错误
- 修复菜单折叠按钮隐藏时占位问题
- 修复表单 baseColProps 不生效
## 2.0.0-rc.10 (2020-11-13)
......
......@@ -91,7 +91,11 @@ export default defineComponent({
function getShow() {
const { show, ifShow } = props.schema;
const { showAdvancedButton } = props.formProps;
const itemIsAdvanced = showAdvancedButton ? !!props.schema.isAdvanced : true;
const itemIsAdvanced = showAdvancedButton
? isBoolean(props.schema.isAdvanced)
? props.schema.isAdvanced
: true
: true;
let isShow = true;
let isIfShow = true;
......
......@@ -132,6 +132,8 @@ export default function ({
function updateAdvanced() {
let itemColSum = 0;
let realItemColSum = 0;
const { baseColProps = {} } = unref(getProps);
for (const schema of unref(getSchema)) {
const { show, colProps } = schema;
let isShow = true;
......@@ -152,8 +154,11 @@ export default function ({
});
}
if (isShow && colProps) {
const { itemColSum: sum, isAdvanced } = getAdvanced(colProps, itemColSum);
if (isShow && (colProps || baseColProps)) {
const { itemColSum: sum, isAdvanced } = getAdvanced(
{ ...baseColProps, ...colProps },
itemColSum
);
itemColSum = sum || 0;
if (isAdvanced) {
......
......@@ -8,9 +8,9 @@
}"
>
<BasicForm
:submitOnReset="true"
v-bind="getFormProps"
v-if="getBindValues.useSearchForm"
:submitOnReset="true"
:submitButtonOptions="{ loading }"
:tableAction="tableAction"
@register="registerForm"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册