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
16ecf718
Commit
16ecf718
authored
Apr 24, 2021
by
Vben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(table): submitButtonOptions not work,fix #531
parent
ca717602
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
BasicTable.vue
src/components/Table/src/BasicTable.vue
+1
-2
useTableForm.ts
src/components/Table/src/hooks/useTableForm.ts
+4
-1
No files found.
src/components/Table/src/BasicTable.vue
View file @
16ecf718
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
submitOnReset
submitOnReset
v-bind=
"getFormProps"
v-bind=
"getFormProps"
v-if=
"getBindValues.useSearchForm"
v-if=
"getBindValues.useSearchForm"
:submitButtonOptions=
"
{ loading: getLoading }"
:tableAction=
"tableAction"
:tableAction=
"tableAction"
@
register=
"registerForm"
@
register=
"registerForm"
@
submit=
"handleSearchInfoChange"
@
submit=
"handleSearchInfoChange"
...
@@ -182,7 +181,7 @@
...
@@ -182,7 +181,7 @@
replaceFormSlotKey
,
replaceFormSlotKey
,
getFormSlotKeys
,
getFormSlotKeys
,
handleSearchInfoChange
,
handleSearchInfoChange
,
}
=
useTableForm
(
getProps
,
slots
,
fetch
);
}
=
useTableForm
(
getProps
,
slots
,
fetch
,
getLoading
);
const
getBindValues
=
computed
(()
=>
{
const
getBindValues
=
computed
(()
=>
{
const
dataSource
=
unref
(
getDataSourceRef
);
const
dataSource
=
unref
(
getDataSourceRef
);
...
...
src/components/Table/src/hooks/useTableForm.ts
View file @
16ecf718
...
@@ -6,14 +6,17 @@ import { isFunction } from '/@/utils/is';
...
@@ -6,14 +6,17 @@ import { isFunction } from '/@/utils/is';
export
function
useTableForm
(
export
function
useTableForm
(
propsRef
:
ComputedRef
<
BasicTableProps
>
,
propsRef
:
ComputedRef
<
BasicTableProps
>
,
slots
:
Slots
,
slots
:
Slots
,
fetch
:
(
opt
?:
FetchParams
|
undefined
)
=>
Promise
<
void
>
fetch
:
(
opt
?:
FetchParams
|
undefined
)
=>
Promise
<
void
>
,
getLoading
:
ComputedRef
<
boolean
|
undefined
>
)
{
)
{
const
getFormProps
=
computed
(
const
getFormProps
=
computed
(
():
Partial
<
FormProps
>
=>
{
():
Partial
<
FormProps
>
=>
{
const
{
formConfig
}
=
unref
(
propsRef
);
const
{
formConfig
}
=
unref
(
propsRef
);
const
{
submitButtonOptions
}
=
formConfig
||
{};
return
{
return
{
showAdvancedButton
:
true
,
showAdvancedButton
:
true
,
...
formConfig
,
...
formConfig
,
submitButtonOptions
:
{
loading
:
unref
(
getLoading
),
...
submitButtonOptions
},
compact
:
true
,
compact
:
true
,
};
};
}
}
...
...
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