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 [
...
@@ -60,10 +60,16 @@ export default [
},
},
{
{
key
:
'
315
'
,
key
:
'
315
'
,
path
:
'
/exam/question
L
ist
'
,
path
:
'
/exam/question
/l
ist
'
,
isFull
:
true
,
isFull
:
true
,
component
:
'
./exam/question/list
'
,
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 = () => {
...
@@ -33,9 +33,9 @@ const Index = () => {
console
.
log
(
id
);
console
.
log
(
id
);
};
};
const
onClickButton
=
id
=>
{
const
onClickButton
=
(
id
,
e
)
=>
{
router
.
push
(
'
/exam/questionList
'
);
e
.
preventDefault
()
return
router
.
push
(
'
/exam/question/list
'
);
};
};
...
...
src/pages/exam/components/item.js
View file @
f383824a
...
@@ -42,7 +42,7 @@ const Index = ({
...
@@ -42,7 +42,7 @@ const Index = ({
/>
/>
<
div
className
=
{
styles
.
label
}
>
分享
<
/div>
<
div
className
=
{
styles
.
label
}
>
分享
<
/div>
<
/div>
<
/div>
<
Button
type
=
"
primary
"
onClick
=
{(
)
=>
onClickButton
(
id
)}
>
<
Button
type
=
"
primary
"
onClick
=
{(
e
)
=>
onClickButton
(
id
,
e
)}
>
{
buttonLable
}
{
buttonLable
}
<
/Button>
<
/Button>
<
/div>
<
/div>
...
...
src/pages/exam/question/list.js
View file @
f383824a
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
styles
from
'
./list.less
'
;
import
styles
from
'
./list.less
'
;
import
router
from
'
umi/router
'
;
const
images
=
[
const
images
=
[
{
{
image
:
''
,
key
:
'
single
'
,
title
:
''
,
image
:
'
/images/danxuanti.png
'
,
title
:
'
单选题
'
,
},
},
{
{
image
:
''
,
key
:
'
multiple
'
,
title
:
''
,
image
:
'
/images/duoxuanti.png
'
,
title
:
'
多选题
'
,
},
},
{
{
image
:
''
,
key
:
'
judgment
'
,
title
:
''
,
image
:
'
/images/panduanti.png
'
,
title
:
'
判断题
'
,
},
},
{
{
image
:
''
,
key
:
'
completion
'
,
title
:
''
,
image
:
'
/images/tiankongti.png
'
,
title
:
'
填空题
'
,
},
},
{
{
image
:
''
,
key
:
'
short
'
,
title
:
''
,
image
:
'
/images/jiandati.png
'
,
title
:
'
简答题
'
,
},
},
{
{
image
:
''
,
key
:
'
caseChoice
'
,
title
:
''
,
image
:
'
/images/anlixuanzeti.png
'
,
title
:
'
案例选择题
'
,
},
},
{
{
image
:
''
,
key
:
'
caseMultiple
'
,
title
:
''
,
image
:
'
/images/mingcijieshi.png
'
,
title
:
'
名词解释
'
,
},
},
{
{
image
:
''
,
key
:
'
b1
'
,
title
:
''
,
image
:
'
/images/b1tixing.png
'
,
title
:
'
B1题型
'
,
},
},
{
{
image
:
''
,
key
:
'
argumentation
'
,
title
:
''
,
image
:
'
/images/lunshuti.png
'
,
title
:
'
论述题
'
,
},
{
key
:
'
analytical
'
,
image
:
'
/images/fenxiti.png
'
,
title
:
'
分析题
'
,
},
},
];
];
const
Index
=
()
=>
{
const
goPage
=
key
=>
{
return
(
router
.
push
(
`/exam/question/
${
key
}
`
);
<
div
className
=
{
styles
.
root
}
>
};
<
div
className
=
{
styles
.
row
}
>
<
div
>
<
img
src
=
{
'
/images/danxuanti.png
'
}
alt
=
""
><
/img
>
<
span
>
单选题
<
/span
>
<
/div
>
<
img
src
=
{
'
/images/duoxuanti.png
'
}
alt
=
""
><
/img
>
const
renderMenu
=
()
=>
{
<
img
src
=
{
'
/images/panduanti.png
'
}
alt
=
""
><
/img
>
const
menus
=
[];
<
/div
>
for
(
let
i
=
0
;
i
<
images
.
length
;
)
{
<
div
className
=
{
styles
.
row
}
>
if
(
i
%
3
===
0
)
{
<
img
src
=
{
'
/images/tiankongti.png
'
}
alt
=
""
><
/img
>
console
.
log
(
i
)
<
img
src
=
{
'
/images/jiandati.png
'
}
alt
=
""
><
/img
>
console
.
log
(
images
[
i
])
<
img
src
=
{
'
/images/anlixuanzeti.png
'
}
alt
=
""
><
/img
>
console
.
log
(
images
[
i
+
1
])
<
/div
>
console
.
log
(
images
[
i
+
2
])
<
div
className
=
{
styles
.
row
}
>
menus
.
push
(
<
img
src
=
{
'
/images/mingcijieshi.png
'
}
alt
=
""
><
/img
>
<
div
className
=
{
styles
.
row
}
key
=
{
i
}
>
<
img
src
=
{
'
/images/b1tixing.png
'
}
alt
=
""
><
/img
>
<
div
className
=
{
styles
.
col
}
key
=
{
images
[
i
].
key
}
>
<
img
src
=
{
'
/images/lunshuti.png
'
}
alt
=
""
><
/img
>
<
img
src
=
{
images
[
i
].
image
}
alt
=
""
onClick
=
{()
=>
goPage
(
images
[
i
].
key
)}
/
>
<
/div
>
<
span
>
{
images
[
i
].
title
}
<
/span
>
<
div
className
=
{
styles
.
row
}
>
<
img
src
=
{
'
/images/fenxiti.png
'
}
alt
=
""
><
/img
>
<
/div
>
<
/div
>
<
/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
;
export
default
Index
;
src/pages/exam/question/list.less
View file @
f383824a
.root{
.root{
display: flex;
display: flex;
flex-direction: column;
flex-direction: column;
padding-top: 8px;
.row{
.row{
display: flex;
display: flex;
justify-content: space-between;
justify-content: space-between;
padding: 0px 8px;
padding: 0px 8px;
.col{
position: relative;
img{
img{
padding: 4px 4px;
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