Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yikao-react
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
yikao-react
Commits
f383824a
Commit
f383824a
authored
Apr 30, 2020
by
duanledexianxianxian
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync
parent
b058c2de
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
105 additions
and
51 deletions
+105
-51
config/router.config.js
config/router.config.js
+7
-1
src/pages/exam/basic.js
src/pages/exam/basic.js
+3
-3
src/pages/exam/components/item.js
src/pages/exam/components/item.js
+1
-1
src/pages/exam/question/list.js
src/pages/exam/question/list.js
+67
-44
src/pages/exam/question/list.less
src/pages/exam/question/list.less
+16
-2
src/pages/exam/question/single/index.js
src/pages/exam/question/single/index.js
+8
-0
src/pages/exam/question/single/index.less
src/pages/exam/question/single/index.less
+3
-0
No files found.
config/router.config.js
View file @
f383824a
...
...
@@ -60,10 +60,16 @@ export default [
},
{
key
:
'
315
'
,
path
:
'
/exam/question
L
ist
'
,
path
:
'
/exam/question
/l
ist
'
,
isFull
:
true
,
component
:
'
./exam/question/list
'
,
},
{
key
:
'
316
'
,
path
:
'
/exam/question/single
'
,
isFull
:
true
,
component
:
'
./exam/question/single
'
,
},
],
},
],
...
...
src/pages/exam/basic.js
View file @
f383824a
...
...
@@ -33,9 +33,9 @@ const Index = () => {
console
.
log
(
id
);
};
const
onClickButton
=
id
=>
{
router
.
push
(
'
/exam/questionList
'
);
const
onClickButton
=
(
id
,
e
)
=>
{
e
.
preventDefault
()
return
router
.
push
(
'
/exam/question/list
'
);
};
...
...
src/pages/exam/components/item.js
View file @
f383824a
...
...
@@ -42,7 +42,7 @@ const Index = ({
/>
<
div
className
=
{
styles
.
label
}
>
分享
<
/div>
<
/div>
<
Button
type
=
"
primary
"
onClick
=
{(
)
=>
onClickButton
(
id
)}
>
<
Button
type
=
"
primary
"
onClick
=
{(
e
)
=>
onClickButton
(
id
,
e
)}
>
{
buttonLable
}
<
/Button>
<
/div>
...
...
src/pages/exam/question/list.js
View file @
f383824a
import
React
from
'
react
'
;
import
styles
from
'
./list.less
'
;
import
router
from
'
umi/router
'
;
const
images
=
[
{
image
:
''
,
title
:
''
,
key
:
'
single
'
,
image
:
'
/images/danxuanti.png
'
,
title
:
'
单选题
'
,
},
{
image
:
''
,
title
:
''
,
key
:
'
multiple
'
,
image
:
'
/images/duoxuanti.png
'
,
title
:
'
多选题
'
,
},
{
image
:
''
,
title
:
''
,
key
:
'
judgment
'
,
image
:
'
/images/panduanti.png
'
,
title
:
'
判断题
'
,
},
{
image
:
''
,
title
:
''
,
key
:
'
completion
'
,
image
:
'
/images/tiankongti.png
'
,
title
:
'
填空题
'
,
},
{
image
:
''
,
title
:
''
,
key
:
'
short
'
,
image
:
'
/images/jiandati.png
'
,
title
:
'
简答题
'
,
},
{
image
:
''
,
title
:
''
,
key
:
'
caseChoice
'
,
image
:
'
/images/anlixuanzeti.png
'
,
title
:
'
案例选择题
'
,
},
{
image
:
''
,
title
:
''
,
key
:
'
caseMultiple
'
,
image
:
'
/images/mingcijieshi.png
'
,
title
:
'
名词解释
'
,
},
{
image
:
''
,
title
:
''
,
key
:
'
b1
'
,
image
:
'
/images/b1tixing.png
'
,
title
:
'
B1题型
'
,
},
{
image
:
''
,
title
:
''
,
key
:
'
argumentation
'
,
image
:
'
/images/lunshuti.png
'
,
title
:
'
论述题
'
,
},
{
key
:
'
analytical
'
,
image
:
'
/images/fenxiti.png
'
,
title
:
'
分析题
'
,
},
];
const
Index
=
()
=>
{
return
(
<
div
className
=
{
styles
.
root
}
>
<
div
className
=
{
styles
.
row
}
>
<
div
>
<
img
src
=
{
'
/images/danxuanti.png
'
}
alt
=
""
><
/img
>
<
span
>
单选题
<
/span
>
<
/div
>
const
goPage
=
key
=>
{
router
.
push
(
`/exam/question/
${
key
}
`
);
};
<
img
src
=
{
'
/images/duoxuanti.png
'
}
alt
=
""
><
/img
>
<
img
src
=
{
'
/images/panduanti.png
'
}
alt
=
""
><
/img
>
<
/div
>
<
div
className
=
{
styles
.
row
}
>
<
img
src
=
{
'
/images/tiankongti.png
'
}
alt
=
""
><
/img
>
<
img
src
=
{
'
/images/jiandati.png
'
}
alt
=
""
><
/img
>
<
img
src
=
{
'
/images/anlixuanzeti.png
'
}
alt
=
""
><
/img
>
<
/div
>
<
div
className
=
{
styles
.
row
}
>
<
img
src
=
{
'
/images/mingcijieshi.png
'
}
alt
=
""
><
/img
>
<
img
src
=
{
'
/images/b1tixing.png
'
}
alt
=
""
><
/img
>
<
img
src
=
{
'
/images/lunshuti.png
'
}
alt
=
""
><
/img
>
<
/div
>
<
div
className
=
{
styles
.
row
}
>
<
img
src
=
{
'
/images/fenxiti.png
'
}
alt
=
""
><
/img
>
<
/div
>
const
renderMenu
=
()
=>
{
const
menus
=
[];
for
(
let
i
=
0
;
i
<
images
.
length
;
)
{
if
(
i
%
3
===
0
)
{
console
.
log
(
i
)
console
.
log
(
images
[
i
])
console
.
log
(
images
[
i
+
1
])
console
.
log
(
images
[
i
+
2
])
menus
.
push
(
<
div
className
=
{
styles
.
row
}
key
=
{
i
}
>
<
div
className
=
{
styles
.
col
}
key
=
{
images
[
i
].
key
}
>
<
img
src
=
{
images
[
i
].
image
}
alt
=
""
onClick
=
{()
=>
goPage
(
images
[
i
].
key
)}
/
>
<
span
>
{
images
[
i
].
title
}
<
/span
>
<
/div
>
{
i
+
1
<
images
.
length
&&
<
div
className
=
{
styles
.
col
}
key
=
{
images
[
i
+
1
].
key
}
>
<
img
src
=
{
images
[
i
+
1
].
image
}
alt
=
""
onClick
=
{()
=>
goPage
(
images
[
i
+
1
].
key
)}
/
>
<
span
>
{
images
[
i
+
1
].
title
}
<
/span
>
<
/div>
}
{
i
+
2
<
images
.
length
&&
<
div
className
=
{
styles
.
col
}
key
=
{
images
[
i
+
2
].
key
}
>
<
img
src
=
{
images
[
i
+
2
].
image
}
alt
=
""
onClick
=
{()
=>
goPage
(
images
[
i
+
2
].
key
)}
/
>
<
span
>
{
images
[
i
+
2
].
title
}
<
/span
>
<
/div>
}
<
/div>
,
);
}
i
+=
3
;
}
return
menus
;
};
const
Index
=
()
=>
{
return
<
div
className
=
{
styles
.
root
}
>
{
renderMenu
()}
<
/div>
;
};
export
default
Index
;
src/pages/exam/question/list.less
View file @
f383824a
.root{
display: flex;
flex-direction: column;
padding-top: 8px;
.row{
display: flex;
justify-content: space-between;
padding: 0px 8px;
.col{
position: relative;
img{
padding: 4px 4px;
}
span{
margin-left: -20px;
width: 100px;
position: absolute;
left: 50%;
right: 50%;
bottom: 18px;
color: #FFFFFF;
}
}
}
}
\ No newline at end of file
src/pages/exam/question/single/index.js
0 → 100644
View file @
f383824a
import
React
from
"
react
"
;
import
styles
from
"
./index.less
"
;
const
Index
=
()
=>
{
return
<
div
className
=
{
styles
.
root
}
>
hello
wolrd
<
/div>
;
};
export
default
Index
;
\ No newline at end of file
src/pages/exam/question/single/index.less
0 → 100644
View file @
f383824a
.root{
}
\ No newline at end of file
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