Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ethan
/
ant-admin-pro
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 5b494cc8
authored
2018-01-24 14:17:20 +0800
by
ethanlamzs
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
带参数的路由功能
1 parent
44e7cda8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
src/common/router.js
src/routes/devutil/schoollist.js
src/routes/devutil/schoolmgr.js
src/common/router.js
View file @
5b494cc
...
...
@@ -162,7 +162,7 @@ export const getRouterData = (app) => {
'/devutil/schoollist'
:
{
component
:
dynamicWrapper
(
app
,
[
'schools'
],
()
=>
import
(
'../routes/devutil/schoollist'
)),
},
'/devutil/schoolmgr'
:
{
'/devutil/schoolmgr
/:schcode
'
:
{
component
:
dynamicWrapper
(
app
,
[
'linkman'
],
()
=>
import
(
'../routes/devutil/schoolmgr'
)),
},
// '/user/:id': {
...
...
src/routes/devutil/schoollist.js
View file @
5b494cc
import
React
,
{
PureComponent
,
Fragment
}
from
'react'
;
import
{
connect
}
from
'dva'
;
import
{
Link
}
from
'dva/router'
;
import
{
Row
,
Col
,
Card
,
Form
,
Input
,
Select
,
Icon
,
Button
,
Dropdown
,
Menu
,
InputNumber
,
DatePicker
,
Modal
,
message
}
from
'antd'
;
import
{
Table
,
Alert
,
Badge
,
Divider
}
from
'antd'
;
...
...
@@ -187,11 +188,14 @@ export default class linkmanadm extends PureComponent {
},
{
title
:
'操作'
,
render
:
()
=>
(
dataIndex
:
'schoolCode'
,
render
:
(
val
)
=>
(
<
Fragment
>
<
a
href
=
""
>
配置
<
/a
>
<
Divider
type
=
"vertical"
/>
<
a
href
=
"devutil/schoolmgr"
>
查看
<
/a
>
<
Link
to
=
{
`/devutil/schoolmgr/
${
val
}
`
}
className
=
{
styles
.
logo
}
key
=
"logo"
>
<
span
>
查看
<
/span
>
<
/Link
>
<
/Fragment
>
),
},
...
...
src/routes/devutil/schoolmgr.js
View file @
5b494cc
...
...
@@ -124,8 +124,6 @@ export default class schoolmgr extends Component{
const
{
linkman
:{
groups
}}
=
this
.
props
;
console
.
log
(
'render()'
);
return
<
div
>
<
Row
gutter
=
{
24
}
>
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment