mirror of
https://github.com/vbenjs/vben-admin-thin-next.git
synced 2025-01-23 09:40:22 +08:00
fix(form): fix baseColProps not work
This commit is contained in:
parent
cd35d3e0d1
commit
c8ef82b2c1
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user