Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
0c620316
Commit
0c620316
authored
Jun 03, 2021
by
chenshu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修复
parent
effbafa7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
8 deletions
+45
-8
src/components/XMTable.jsx
+37
-0
src/modules/teach-tool/paper-manage/components/SelectQuestionList.jsx
+8
-8
No files found.
src/components/XMTable.jsx
0 → 100644
View file @
0c620316
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Empty
,
ConfigProvider
,
Table
}
from
'antd'
;
function
XMTable
(
props
)
{
const
[
empty
,
setEmpty
]
=
useState
(
props
.
renderEmpty
||
{});
const
[
data
,
setData
]
=
useState
({});
useEffect
(()
=>
{
setEmpty
(
props
.
renderEmpty
)
delete
props
.
renderEmpty
;
setData
(
props
);
},
[
props
]);
// 自定义表格空状态
function
customizeRenderEmpty
()
{
return
(
<
Empty
image=
{
empty
.
image
||
Empty
.
PRESENTED_IMAGE_SIMPLE
}
imageStyle=
{
{
height
:
150
,
}
}
description=
{
empty
.
description
}
></
Empty
>
);
};
return
(
<
ConfigProvider
renderEmpty=
{
customizeRenderEmpty
}
>
<
Table
{
...
data
}
/>
</
ConfigProvider
>
)
}
export
default
XMTable
;
\ No newline at end of file
src/modules/teach-tool/paper-manage/components/SelectQuestionList.jsx
View file @
0c620316
...
...
@@ -154,6 +154,14 @@ class SelectQuestionList extends Component {
parseColumns
=
()
=>
{
const
columns
=
[
{
title
:
"题型"
,
key
:
"questionTypeEnum"
,
dataIndex
:
"questionTypeEnum"
,
render
:
(
val
)
=>
{
return
questionTypeEnum
[
val
];
},
},
{
title
:
"题目"
,
key
:
"questionStem"
,
dataIndex
:
"questionStem"
,
...
...
@@ -180,14 +188,6 @@ class SelectQuestionList extends Component {
},
},
{
title
:
"题型"
,
key
:
"questionTypeEnum"
,
dataIndex
:
"questionTypeEnum"
,
render
:
(
val
)
=>
{
return
questionTypeEnum
[
val
];
},
},
{
title
:
"正确率"
,
key
:
"accuracy"
,
dataIndex
:
"accuracy"
,
...
...
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