Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ems3.3
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
wuhao
ems3.3
Commits
0f387267
Commit
0f387267
authored
Sep 19, 2023
by
左玲玲
😬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1723
parent
e2fb5688
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
mtable.jsx
src/components/AutoTable/mtable.jsx
+10
-1
No files found.
src/components/AutoTable/mtable.jsx
View file @
0f387267
...
...
@@ -57,6 +57,14 @@ const Mtable = (props) => {
//调用接口
const
request
=
async
(
params
,
sort
,
filter
)
=>
{
if
(
!
path
)
return
;
for
(
let
i
in
params
)
{
let
itemType
=
columns
.
filter
(
it
=>
it
.
key
==
i
)?.[
0
]?.
valueType
??
''
;
if
(
itemType
&&
(
itemType
==
'dateTimeRange'
||
itemType
==
'dateRange'
||
itemType
==
'timeRange'
||
itemType
==
'checkbox'
))
{
if
(
params
[
i
]
===
''
)
{
params
[
i
]
=
undefined
;
}
}
}
let
newparams
=
{
...
extraparams
,
//父组件传参
...
params
,
...
...
@@ -68,6 +76,7 @@ const Mtable = (props) => {
delete
newparams
.
pageIndex
;
delete
newparams
.
pageSize
;
}
const
result
=
await
doFetch
({
url
:
path
,
params
:
newparams
});
//分页结果
let
data
=
result
?.
data
?.
page
?.
list
,
...
...
@@ -424,7 +433,7 @@ const Mtable = (props) => {
}
search=
{
{
filterType
:
'light'
,
//轻量模式
placement
:
'bottomLeft'
,
placement
:
'bottomLeft'
}
}
/>
);
...
...
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