Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
najiu-admin-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
najiu-frontend
najiu-admin-template
Commits
c8ef82b2
Commit
c8ef82b2
authored
Nov 18, 2020
by
vben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(form): fix baseColProps not work
parent
cd35d3e0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
4 deletions
+15
-4
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+2
-0
FormItem.tsx
src/components/Form/src/FormItem.tsx
+5
-1
useAdvanced.ts
src/components/Form/src/hooks/useAdvanced.ts
+7
-2
BasicTable.vue
src/components/Table/src/BasicTable.vue
+1
-1
No files found.
CHANGELOG.zh_CN.md
View file @
c8ef82b2
...
...
@@ -17,6 +17,8 @@
-
修复表单 inputNumber 校验错误
-
修复表单默认值设置错误
-
修复菜单折叠按钮隐藏时占位问题
-
修复表单 baseColProps 不生效
## 2.0.0-rc.10 (2020-11-13)
...
...
src/components/Form/src/FormItem.tsx
View file @
c8ef82b2
...
...
@@ -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
;
...
...
src/components/Form/src/hooks/useAdvanced.ts
View file @
c8ef82b2
...
...
@@ -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
)
{
...
...
src/components/Table/src/BasicTable.vue
View file @
c8ef82b2
...
...
@@ -8,9 +8,9 @@
}"
>
<BasicForm
:submitOnReset=
"true"
v-bind=
"getFormProps"
v-if=
"getBindValues.useSearchForm"
:submitOnReset=
"true"
:submitButtonOptions=
"
{ loading }"
:tableAction="tableAction"
@register="registerForm"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment