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
P
pro-blocks
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
pro-blocks
Commits
ac17ede7
Commit
ac17ede7
authored
Mar 29, 2019
by
陈帅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AccountSettings is finsh
parent
a037aca0
Changes
42
Hide whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
221 additions
and
134 deletions
+221
-134
AccountCenter/.umirc.js
AccountCenter/.umirc.js
+0
-13
AccountCenter/src/model.ts
AccountCenter/src/model.ts
+1
-1
AccountSettings/.umirc.js
AccountSettings/.umirc.js
+0
-18
AccountSettings/jsconfig.json
AccountSettings/jsconfig.json
+0
-10
AccountSettings/src/_mock.ts
AccountSettings/src/_mock.ts
+5
-2
AccountSettings/src/components/GeographicView.tsx
AccountSettings/src/components/GeographicView.tsx
+79
-37
AccountSettings/src/components/PhoneView.tsx
AccountSettings/src/components/PhoneView.tsx
+8
-3
AccountSettings/src/components/base.tsx
AccountSettings/src/components/base.tsx
+27
-11
AccountSettings/src/components/binding.tsx
AccountSettings/src/components/binding.tsx
+1
-1
AccountSettings/src/components/notification.tsx
AccountSettings/src/components/notification.tsx
+6
-3
AccountSettings/src/components/security.tsx
AccountSettings/src/components/security.tsx
+12
-10
AccountSettings/src/data.d.ts
AccountSettings/src/data.d.ts
+56
-0
AccountSettings/src/index.tsx
AccountSettings/src/index.tsx
+1
-1
AccountSettings/src/locales/en-US.ts
AccountSettings/src/locales/en-US.ts
+0
-0
AccountSettings/src/locales/zh-CN.ts
AccountSettings/src/locales/zh-CN.ts
+0
-0
AccountSettings/src/locales/zh-TW.ts
AccountSettings/src/locales/zh-TW.ts
+0
-0
AccountSettings/src/model.ts
AccountSettings/src/model.ts
+0
-0
AccountSettings/src/service.ts
AccountSettings/src/service.ts
+1
-1
AdvancedForm/src/components/PageHeaderWrapper/index.js
AdvancedForm/src/components/PageHeaderWrapper/index.js
+1
-1
AdvancedProfile/src/components/PageHeaderWrapper/index.js
AdvancedProfile/src/components/PageHeaderWrapper/index.js
+1
-1
Analysis/src/components/IntroduceRow.js
Analysis/src/components/IntroduceRow.js
+1
-1
Analysis/src/components/OfflineData.js
Analysis/src/components/OfflineData.js
+1
-1
Analysis/src/components/ProportionSales.js
Analysis/src/components/ProportionSales.js
+1
-1
Analysis/src/components/SalesCard.js
Analysis/src/components/SalesCard.js
+1
-1
Analysis/src/components/TopSearch.js
Analysis/src/components/TopSearch.js
+1
-1
BasicForm/src/components/PageHeaderWrapper/index.js
BasicForm/src/components/PageHeaderWrapper/index.js
+1
-1
BasicForm/src/index.js
BasicForm/src/index.js
+1
-1
BasicList/src/index.js
BasicList/src/index.js
+1
-1
BasicProfile/src/components/PageHeaderWrapper/index.js
BasicProfile/src/components/PageHeaderWrapper/index.js
+1
-1
CardList/src/components/PageHeaderWrapper/index.js
CardList/src/components/PageHeaderWrapper/index.js
+1
-1
Monitor/src/index.js
Monitor/src/index.js
+1
-1
ResultFail/src/index.js
ResultFail/src/index.js
+1
-1
ResultSuccess/src/index.js
ResultSuccess/src/index.js
+1
-1
SearchListApplications/src/components/PageHeaderWrapper/index.js
...istApplications/src/components/PageHeaderWrapper/index.js
+1
-1
SearchListArticles/src/components/PageHeaderWrapper/index.js
SearchListArticles/src/components/PageHeaderWrapper/index.js
+1
-1
SearchListProjects/src/components/PageHeaderWrapper/index.js
SearchListProjects/src/components/PageHeaderWrapper/index.js
+1
-1
StepForm/src/components/PageHeaderWrapper/index.js
StepForm/src/components/PageHeaderWrapper/index.js
+1
-1
UserLogin/src/index.js
UserLogin/src/index.js
+1
-1
UserRegister/src/index.js
UserRegister/src/index.js
+1
-1
UserRegisterResult/src/index.js
UserRegisterResult/src/index.js
+1
-1
Workplace/src/components/PageHeaderWrapper/index.js
Workplace/src/components/PageHeaderWrapper/index.js
+1
-1
tsconfig.json
tsconfig.json
+1
-0
No files found.
AccountCenter/.umirc.js
deleted
100644 → 0
View file @
a037aca0
export
default
{
plugins
:
[
[
'
umi-plugin-block-dev
'
,
{
layout
:
'
ant-design-pro
'
}],
[
'
umi-plugin-react
'
,
{
dva
:
true
,
locale
:
true
,
antd
:
true
,
},
],
],
};
AccountCenter/src/model.ts
View file @
ac17ede7
...
...
@@ -22,7 +22,7 @@ export default {
call
,
put
,
}:
{
call
:
callType
<
Function
,
[],
Promise
<
any
>>
;
call
:
callType
<
Function
,
[],
ReturnType
<
typeof
queryCurrent
>>
;
put
:
Dispatch
;
}
)
{
...
...
AccountSettings/.umirc.js
deleted
100644 → 0
View file @
a037aca0
export
default
{
plugins
:
[
[
'
umi-plugin-block-dev
'
,
{
layout
:
'
ant-design-pro
'
,
},
],
[
'
umi-plugin-react
'
,
{
dva
:
true
,
locale
:
true
,
antd
:
true
,
},
],
],
};
AccountSettings/jsconfig.json
deleted
100644 → 0
View file @
a037aca0
{
"compilerOptions"
:
{
"emitDecoratorMetadata"
:
true
,
"experimentalDecorators"
:
true
,
"baseUrl"
:
"."
,
"paths"
:
{
"@/*"
:
[
"./src/*"
]
}
}
}
AccountSettings/src/_mock.
j
s
→
AccountSettings/src/_mock.
t
s
View file @
ac17ede7
import
city
from
'
./geographic/city.json
'
;
import
province
from
'
./geographic/province.json
'
;
function
getProvince
(
req
,
res
)
{
function
getProvince
(
req
:
any
,
res
:
{
json
:
(
arg0
:
{
name
:
string
;
id
:
string
}[])
=>
void
}
)
{
return
res
.
json
(
province
);
}
function
getCity
(
req
,
res
)
{
function
getCity
(
req
:
{
params
:
{
province
:
string
|
number
}
},
res
:
{
json
:
(
arg
:
any
)
=>
void
}
)
{
return
res
.
json
(
city
[
req
.
params
.
province
]);
}
// 代码中会兼容本地 service mock 以及部署站点的静态数据
...
...
AccountSettings/src/components/GeographicView.
js
→
AccountSettings/src/components/GeographicView.
tsx
View file @
ac17ede7
import
React
,
{
Pure
Component
}
from
'
react
'
;
import
React
,
{
Component
}
from
'
react
'
;
import
{
Select
,
Spin
}
from
'
antd
'
;
import
{
connect
}
from
'
dva
'
;
import
styles
from
'
./GeographicView.less
'
;
import
{
Dispatch
}
from
'
redux
'
;
import
{
ProvinceData
,
CityData
}
from
'
../data
'
;
const
{
Option
}
=
Select
;
const
nullSlectItem
=
{
interface
SelectItem
{
label
:
string
;
key
:
string
;
}
const
nullSlectItem
:
SelectItem
=
{
label
:
''
,
key
:
''
,
};
@
connect
(({
BLOCK_NAME_CAMEL_CASE
,
loading
})
=>
{
const
{
province
,
city
}
=
BLOCK_NAME_CAMEL_CASE
;
return
{
province
,
city
,
loading
:
loading
.
models
.
BLOCK_NAME_CAMEL_CASE
,
interface
GeographicViewProps
{
dispatch
?:
Dispatch
;
province
?:
ProvinceData
[];
city
?:
CityData
[];
value
?:
{
province
:
SelectItem
;
city
:
SelectItem
;
};
})
class
GeographicView
extends
PureComponent
{
loading
?:
boolean
;
onChange
?:
(
value
:
{
province
:
SelectItem
;
city
:
SelectItem
})
=>
void
;
}
@
connect
(
({
BLOCK_NAME_CAMEL_CASE
,
loading
,
}:
{
BLOCK_NAME_CAMEL_CASE
:
{
province
:
ProvinceData
[];
city
:
CityData
[];
};
loading
:
any
;
})
=>
{
const
{
province
,
city
}
=
BLOCK_NAME_CAMEL_CASE
;
return
{
province
,
city
,
loading
:
loading
.
models
.
BLOCK_NAME_CAMEL_CASE
,
};
}
)
class
GeographicView
extends
Component
<
GeographicViewProps
>
{
componentDidMount
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'
BLOCK_NAME_CAMEL_CASE/fetchProvince
'
,
});
dispatch
&&
dispatch
({
type
:
'
BLOCK_NAME_CAMEL_CASE/fetchProvince
'
,
});
};
componentDidUpdate
(
props
)
{
componentDidUpdate
(
props
:
GeographicViewProps
)
{
const
{
dispatch
,
value
}
=
this
.
props
;
if
(
!
props
.
value
&&
!!
value
&&
!!
value
.
province
)
{
dispatch
({
type
:
'
BLOCK_NAME_CAMEL_CASE/fetchCity
'
,
payload
:
value
.
province
.
key
,
});
dispatch
&&
dispatch
({
type
:
'
BLOCK_NAME_CAMEL_CASE/fetchCity
'
,
payload
:
value
.
province
.
key
,
});
}
}
getProvinceOption
()
{
const
{
province
}
=
this
.
props
;
return
this
.
getOption
(
province
);
if
(
province
)
{
return
this
.
getOption
(
province
);
}
return
[];
}
getCityOption
=
()
=>
{
const
{
city
}
=
this
.
props
;
return
this
.
getOption
(
city
);
if
(
city
)
{
return
this
.
getOption
(
city
);
}
return
[];
};
getOption
=
list
=>
{
getOption
=
(
list
:
CityData
[]
|
ProvinceData
[])
=>
{
if
(
!
list
||
list
.
length
<
1
)
{
return
(
<
Option
key
=
{
0
}
value
=
{
0
}
>
...
...
@@ -55,31 +91,37 @@ class GeographicView extends PureComponent {
</
Option
>
);
}
return
list
.
map
(
item
=>
(
return
(
list
as
CityData
[])
.
map
(
item
=>
(
<
Option
key
=
{
item
.
id
}
value
=
{
item
.
id
}
>
{
item
.
name
}
</
Option
>
));
};
selectProvinceItem
=
item
=>
{
selectProvinceItem
=
(
item
:
SelectItem
)
=>
{
const
{
dispatch
,
onChange
}
=
this
.
props
;
dispatch
({
type
:
'
BLOCK_NAME_CAMEL_CASE/fetchCity
'
,
payload
:
item
.
key
,
});
onChange
({
province
:
item
,
city
:
nullSlectItem
,
});
dispatch
&&
dispatch
({
type
:
'
BLOCK_NAME_CAMEL_CASE/fetchCity
'
,
payload
:
item
.
key
,
});
onChange
&&
onChange
({
province
:
item
,
city
:
nullSlectItem
,
});
};
selectCityItem
=
item
=>
{
selectCityItem
=
(
item
:
SelectItem
)
=>
{
const
{
value
,
onChange
}
=
this
.
props
;
onChange
({
province
:
value
.
province
,
city
:
item
,
});
if
(
value
&&
onChange
)
{
onChange
({
province
:
value
.
province
,
city
:
item
,
});
}
};
conversionObject
()
{
...
...
AccountSettings/src/components/PhoneView.
js
→
AccountSettings/src/components/PhoneView.
tsx
View file @
ac17ede7
...
...
@@ -2,7 +2,12 @@ import React, { Fragment, PureComponent } from 'react';
import
{
Input
}
from
'
antd
'
;
import
styles
from
'
./PhoneView.less
'
;
class
PhoneView
extends
PureComponent
{
interface
PhoneViewProps
{
value
?:
string
;
onChange
?:
(
value
:
string
)
=>
void
;
}
class
PhoneView
extends
PureComponent
<
PhoneViewProps
>
{
render
()
{
const
{
value
,
onChange
}
=
this
.
props
;
let
values
=
[
''
,
''
];
...
...
@@ -15,13 +20,13 @@ class PhoneView extends PureComponent {
className
=
{
styles
.
area_code
}
value
=
{
values
[
0
]
}
onChange
=
{
e
=>
{
onChange
(
`
${
e
.
target
.
value
}
-
${
values
[
1
]}
`
);
onChange
&&
onChange
(
`
${
e
.
target
.
value
}
-
${
values
[
1
]}
`
);
}
}
/>
<
Input
className
=
{
styles
.
phone_number
}
onChange
=
{
e
=>
{
onChange
(
`
${
values
[
0
]}
-
${
e
.
target
.
value
}
`
);
onChange
&&
onChange
(
`
${
values
[
0
]}
-
${
e
.
target
.
value
}
`
);
}
}
value
=
{
values
[
1
]
}
/>
...
...
AccountSettings/src/components/base.
js
→
AccountSettings/src/components/base.
tsx
View file @
ac17ede7
import
React
,
{
Component
,
Fragment
}
from
'
react
'
;
import
{
formatMessage
,
FormattedMessage
}
from
'
umi/locale
'
;
import
{
formatMessage
,
FormattedMessage
}
from
'
umi
-plugin-react
/locale
'
;
import
{
Form
,
Input
,
Upload
,
Select
,
Button
}
from
'
antd
'
;
import
{
FormComponentProps
}
from
'
antd/lib/form
'
;
import
{
connect
}
from
'
dva
'
;
import
styles
from
'
./BaseView.less
'
;
import
GeographicView
from
'
./GeographicView
'
;
import
PhoneView
from
'
./PhoneView
'
;
import
{
CurrentUser
}
from
'
../data
'
;
const
FormItem
=
Form
.
Item
;
const
{
Option
}
=
Select
;
// 头像组件 方便以后独立,增加裁剪之类的功能
const
AvatarView
=
({
avatar
})
=>
(
const
AvatarView
=
({
avatar
}
:
{
avatar
:
string
}
)
=>
(
<
Fragment
>
<
div
className
=
{
styles
.
avatar_title
}
>
<
FormattedMessage
id
=
"BLOCK_NAME.basic.avatar"
defaultMessage
=
"Avatar"
/>
...
...
@@ -27,8 +28,19 @@ const AvatarView = ({ avatar }) => (
</
Upload
>
</
Fragment
>
);
interface
SelectItem
{
label
:
string
;
key
:
string
;
}
const
validatorGeographic
=
(
rule
,
value
,
callback
)
=>
{
const
validatorGeographic
=
(
_
:
any
,
value
:
{
province
:
SelectItem
;
city
:
SelectItem
;
},
callback
:
(
message
?:
string
)
=>
void
)
=>
{
const
{
province
,
city
}
=
value
;
if
(
!
province
.
key
)
{
callback
(
'
Please input your province!
'
);
...
...
@@ -39,7 +51,7 @@ const validatorGeographic = (rule, value, callback) => {
callback
();
};
const
validatorPhone
=
(
rule
,
value
,
callback
)
=>
{
const
validatorPhone
=
(
rule
:
any
,
value
:
string
,
callback
:
(
message
?:
string
)
=>
void
)
=>
{
const
values
=
value
.
split
(
'
-
'
);
if
(
!
values
[
0
])
{
callback
(
'
Please input your area code!
'
);
...
...
@@ -50,11 +62,14 @@ const validatorPhone = (rule, value, callback) => {
callback
();
};
@
connect
(({
BLOCK_NAME_CAMEL_CASE
})
=>
({
interface
BaseViewProps
extends
FormComponentProps
{
currentUser
:
CurrentUser
;
}
@
connect
(({
BLOCK_NAME_CAMEL_CASE
}:
{
BLOCK_NAME_CAMEL_CASE
:
{
currentUser
:
CurrentUser
}
})
=>
({
currentUser
:
BLOCK_NAME_CAMEL_CASE
.
currentUser
,
}))
@
Form
.
create
()
class
BaseView
extends
Component
{
class
BaseView
extends
Component
<
BaseViewProps
>
{
componentDidMount
()
{
this
.
setBaseInfo
();
}
...
...
@@ -76,8 +91,9 @@ class BaseView extends Component {
const
url
=
'
https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png
'
;
return
url
;
}
view
:
HTMLDivElement
|
undefined
;
getViewDom
=
ref
=>
{
getViewDom
=
(
ref
:
HTMLDivElement
)
=>
{
this
.
view
=
ref
;
};
...
...
@@ -88,7 +104,7 @@ class BaseView extends Component {
return
(
<
div
className
=
{
styles
.
baseView
}
ref
=
{
this
.
getViewDom
}
>
<
div
className
=
{
styles
.
left
}
>
<
Form
layout
=
"
vertical
"
onSubmit
=
{
this
.
handleSubmit
}
hideRequiredMark
>
<
Form
layout
=
"vertical"
hideRequiredMark
>
<
FormItem
label
=
{
formatMessage
({
id
:
'
BLOCK_NAME.basic.email
'
})
}
>
{
getFieldDecorator
(
'
email
'
,
{
rules
:
[
...
...
@@ -185,4 +201,4 @@ class BaseView extends Component {
}
}
export
default
BaseView
;
export
default
Form
.
create
()(
BaseView
)
;
AccountSettings/src/components/binding.
js
→
AccountSettings/src/components/binding.
tsx
View file @
ac17ede7
import
React
,
{
Component
,
Fragment
}
from
'
react
'
;
import
{
formatMessage
,
FormattedMessage
}
from
'
umi/locale
'
;
import
{
formatMessage
,
FormattedMessage
}
from
'
umi
-plugin-react
/locale
'
;
import
{
Icon
,
List
}
from
'
antd
'
;
class
BindingView
extends
Component
{
...
...
AccountSettings/src/components/notification.
js
→
AccountSettings/src/components/notification.
tsx
View file @
ac17ede7
import
React
,
{
Component
,
Fragment
}
from
'
react
'
;
import
{
formatMessage
}
from
'
umi/locale
'
;
import
{
formatMessage
}
from
'
umi
-plugin-react
/locale
'
;
import
{
Switch
,
List
}
from
'
antd
'
;
type
Unpacked
<
T
>
=
T
extends
(
infer
U
)[]
?
U
:
T
;
class
NotificationView
extends
Component
{
getData
=
()
=>
{
const
Action
=
(
...
...
@@ -31,11 +33,12 @@ class NotificationView extends Component {
};
render
()
{
const
data
=
this
.
getData
();
return
(
<
Fragment
>
<
List
<
List
<
Unpacked
<
typeof
data
>
>
itemLayout="horizontal"
dataSource
=
{
this
.
getData
()
}
dataSource=
{
data
}
renderItem=
{
item
=>
(
<
List
.
Item
actions
=
{
item
.
actions
}
>
<
List
.
Item
.
Meta
title
=
{
item
.
title
}
description
=
{
item
.
description
}
/>
...
...
AccountSettings/src/components/security.
js
→
AccountSettings/src/components/security.
tsx
View file @
ac17ede7
import
React
,
{
Component
,
Fragment
}
from
'
react
'
;
import
{
formatMessage
,
FormattedMessage
}
from
'
umi/locale
'
;
import
{
formatMessage
,
FormattedMessage
}
from
'
umi
-plugin-react
/locale
'
;
import
{
List
}
from
'
antd
'
;
// import { getTimeDistance } from '@/utils/utils';
type
Unpacked
<
T
>
=
T
extends
(
infer
U
)[]
?
U
:
T
;
const
passwordStrength
=
{
strong
:
(
<
font
className
=
"
strong
"
>
<
span
className
=
"strong"
>
<
FormattedMessage
id
=
"BLOCK_NAME.security.strong"
defaultMessage
=
"Strong"
/>
<
/
font
>
</
span
>
),
medium
:
(
<
font
className
=
"
medium
"
>
<
span
className
=
"medium"
>
<
FormattedMessage
id
=
"BLOCK_NAME.security.medium"
defaultMessage
=
"Medium"
/>
<
/
font
>
</
span
>
),
weak
:
(
<
font
className
=
"
weak
"
>
<
span
className
=
"weak"
>
<
FormattedMessage
id
=
"BLOCK_NAME.security.weak"
defaultMessage
=
"Weak"
/>
Weak
<
/
font
>
</
span
>
),
};
...
...
@@ -83,11 +84,12 @@ class SecurityView extends Component {
];
render
()
{
const
data
=
this
.
getData
();
return
(
<
Fragment
>
<
List
<
List
<
Unpacked
<
typeof
data
>
>
itemLayout="horizontal"
dataSource
=
{
this
.
getData
()
}
dataSource=
{
data
}
renderItem=
{
item
=>
(
<
List
.
Item
actions
=
{
item
.
actions
}
>
<
List
.
Item
.
Meta
title
=
{
item
.
title
}
description
=
{
item
.
description
}
/>
...
...
AccountSettings/src/data.d.ts
0 → 100644
View file @
ac17ede7
export
interface
ITag
{
key
:
string
;
label
:
string
;
}
export
interface
Province
{
label
:
string
;
key
:
string
;
}
export
interface
City
{
label
:
string
;
key
:
string
;
}
export
interface
Geographic
{
province
:
Province
;
city
:
City
;
}
export
interface
ProvinceData
{
name
:
string
;
id
:
string
;
}
export
interface
CityData
{
province
:
string
;
name
:
string
;
id
:
string
;
}
export
interface
Notice
{
id
:
string
;
title
:
string
;
logo
:
string
;
description
:
string
;
updatedAt
:
string
;
member
:
string
;
href
:
string
;
memberLink
:
string
;
}
export
interface
CurrentUser
{
name
:
string
;
avatar
:
string
;
userid
:
string
;
notice
:
Notice
[];
email
:
string
;
signature
:
string
;
title
:
string
;
group
:
string
;
tags
:
ITag
[];
notifyCount
:
number
;
unreadCount
:
number
;
country
:
string
;
geographic
:
Geographic
;
address
:
string
;
phone
:
string
;
}
AccountSettings/src/index.
js
→
AccountSettings/src/index.
tsx
View file @
ac17ede7
import
React
,
{
Component
}
from
'
react
'
;
import
{
connect
}
from
'
dva
'
;
import
{
FormattedMessage
}
from
'
umi/locale
'
;
import
{
FormattedMessage
}
from
'
umi
-plugin-react
/locale
'
;
import
{
Menu
}
from
'
antd
'
;
import
styles
from
'
./style.less
'
;
import
BaseView
from
'
./components/base
'
;
...
...
AccountSettings/src/locales/en-US.
j
s
→
AccountSettings/src/locales/en-US.
t
s
View file @
ac17ede7
File moved
AccountSettings/src/locales/zh-CN.
j
s
→
AccountSettings/src/locales/zh-CN.
t
s
View file @
ac17ede7
File moved
AccountSettings/src/locales/zh-TW.
j
s
→
AccountSettings/src/locales/zh-TW.
t
s
View file @
ac17ede7
File moved
AccountSettings/src/model.
j
s
→
AccountSettings/src/model.
t
s
View file @
ac17ede7
File moved
AccountSettings/src/service.
j
s
→
AccountSettings/src/service.
t
s
View file @
ac17ede7
...
...
@@ -8,7 +8,7 @@ export async function queryProvince() {
return
request
(
'
/api/BLOCK_NAME/province
'
);
}
export
async
function
queryCity
(
province
)
{
export
async
function
queryCity
(
province
:
string
)
{
return
request
(
`/api/BLOCK_NAME/city/
${
province
}
`
);
}
...
...
AdvancedForm/src/components/PageHeaderWrapper/index.js
View file @
ac17ede7
import
React
from
'
react
'
;
import
{
FormattedMessage
}
from
'
umi/locale
'
;
import
{
FormattedMessage
}
from
'
umi
-plugin-react
/locale
'
;
import
Link
from
'
umi/link
'
;
import
{
PageHeader
}
from
'
ant-design-pro
'
;
import
styles
from
'
./index.less
'
;
...
...
AdvancedProfile/src/components/PageHeaderWrapper/index.js
View file @
ac17ede7
import
React
from
'
react
'
;
import
{
FormattedMessage
}
from
'
umi/locale
'
;
import
{
FormattedMessage
}
from
'
umi
-plugin-react
/locale
'
;
import
Link
from
'
umi/link
'
;
import
{
PageHeader
}
from
'
ant-design-pro
'
;
import
styles
from
'
./index.less
'
;
...
...
Analysis/src/components/IntroduceRow.js
View file @
ac17ede7
import
React
,
{
memo
}
from
'
react
'
;
import
{
Row
,
Col
,
Icon
,
Tooltip
}
from
'
antd
'
;
import
{
FormattedMessage
}
from
'
umi/locale
'
;
import
{
FormattedMessage
}
from
'
umi
-plugin-react
/locale
'
;
import
{
Charts
,
Trend
}
from
'
ant-design-pro
'
;
import
numeral
from
'
numeral
'
;
import
styles
from
'
../style.less
'
;
...
...
Analysis/src/components/OfflineData.js
View file @
ac17ede7
import
React
,
{
memo
}
from
'
react
'
;
import
{
Card
,
Tabs
,
Row
,
Col
}
from
'
antd
'
;
import
{
formatMessage
,
FormattedMessage
}
from
'
umi/locale
'
;
import
{
formatMessage
,
FormattedMessage
}
from
'
umi
-plugin-react
/locale
'
;
import
{
Charts
,
NumberInfo
}
from
'
ant-design-pro
'
;
import
styles
from
'
../style.less
'
;
...
...
Analysis/src/components/ProportionSales.js
View file @
ac17ede7
import
React
,
{
memo
}
from
'
react
'
;
import
{
Card
,
Radio
}
from
'
antd
'
;
import
{
Charts
}
from
'
ant-design-pro
'
;
import
{
FormattedMessage
}
from
'
umi/locale
'
;
import
{
FormattedMessage
}
from
'
umi
-plugin-react
/locale
'
;
import
styles
from
'
../style.less
'
;
import
Yuan
from
'
../utils/Yuan
'
;
...
...
Analysis/src/components/SalesCard.js
View file @
ac17ede7
import
React
,
{
memo
}
from
'
react
'
;
import
{
Row
,
Col
,
Card
,
Tabs
,
DatePicker
}
from
'
antd
'
;
import
{
FormattedMessage
,
formatMessage
}
from
'
umi/locale
'
;
import
{
FormattedMessage
,
formatMessage
}
from
'
umi
-plugin-react
/locale
'
;
import
numeral
from
'
numeral
'
;
import
{
Charts
}
from
'
ant-design-pro
'
;
import
styles
from
'
../style.less
'
;
...
...
Analysis/src/components/TopSearch.js
View file @
ac17ede7
import
React
,
{
memo
}
from
'
react
'
;
import
{
Row
,
Col
,
Table
,
Tooltip
,
Card
,
Icon
}
from
'
antd
'
;
import
{
FormattedMessage
}
from
'
umi/locale
'
;
import
{
FormattedMessage
}
from
'
umi
-plugin-react
/locale
'
;
import
{
Trend
,
NumberInfo
,
Charts
}
from
'
ant-design-pro
'
;
import
numeral
from
'
numeral
'
;
import
styles
from
'
../style.less
'
;
...
...
BasicForm/src/components/PageHeaderWrapper/index.js
View file @
ac17ede7
import
React
from
'
react
'
;
import
{
FormattedMessage
}
from
'
umi/locale
'
;
import
{
FormattedMessage
}
from
'
umi
-plugin-react
/locale
'
;
import
Link
from
'
umi/link
'
;
import
{
PageHeader
}
from
'
ant-design-pro
'
;
import
styles
from
'
./index.less
'
;
...
...
BasicForm/src/index.js
View file @
ac17ede7
import
React
,
{
PureComponent
}
from
'
react
'
;
import
{
connect
}
from
'
dva
'
;
import
{
formatMessage
,
FormattedMessage
}
from
'
umi/locale
'
;
import
{
formatMessage
,
FormattedMessage
}
from
'
umi
-plugin-react
/locale
'
;
import
{
Form
,
Input
,
...
...
BasicList/src/index.js
View file @
ac17ede7
import
React
,
{
PureComponent
}
from
'
react
'
;
import
{
FormattedMessage
}
from
'
umi/locale
'
;
import
{
FormattedMessage
}
from
'
umi
-plugin-react
/locale
'
;
import
{
findDOMNode
}
from
'
react-dom
'
;
import
moment
from
'
moment
'
;
import
{
connect
}
from
'
dva
'
;
...
...
BasicProfile/src/components/PageHeaderWrapper/index.js
View file @
ac17ede7
import
React
from
'
react
'
;
import
{
FormattedMessage
}
from
'
umi/locale
'
;
import
{
FormattedMessage
}
from
'
umi
-plugin-react
/locale
'
;
import
Link
from
'
umi/link
'
;
import
{
PageHeader
}
from
'
ant-design-pro
'
;
import
styles
from
'
./index.less
'
;
...
...
CardList/src/components/PageHeaderWrapper/index.js
View file @
ac17ede7
import
React
from
'
react
'
;
import
{
FormattedMessage
}
from
'
umi/locale
'
;
import
{
FormattedMessage
}
from
'
umi
-plugin-react
/locale
'
;
import
Link
from
'
umi/link
'
;
import
{
PageHeader
}
from
'
ant-design-pro
'
;
import
styles
from
'
./index.less
'
;
...
...
Monitor/src/index.js
View file @
ac17ede7
import
React
,
{
PureComponent
}
from
'
react
'
;
import
{
connect
}
from
'
dva
'
;
import
{
formatMessage
,
FormattedMessage
}
from
'
umi/locale
'
;
import
{
formatMessage
,
FormattedMessage
}
from
'
umi
-plugin-react
/locale
'
;
import
{
Row
,
Col
,
Card
,
Tooltip
}
from
'
antd
'
;
import
{
NumberInfo
,
Charts
}
from
'
ant-design-pro
'
;
import
CountDown
from
'
ant-design-pro/lib/CountDown
'
;
...
...
ResultFail/src/index.js
View file @
ac17ede7
import
React
,
{
Fragment
}
from
'
react
'
;
import
{
formatMessage
,
FormattedMessage
}
from
'
umi/locale
'
;
import
{
formatMessage
,
FormattedMessage
}
from
'
umi
-plugin-react
/locale
'
;
import
{
Button
,
Icon
,
Card
}
from
'
antd
'
;
import
{
Result
}
from
'
ant-design-pro
'
;
...
...
ResultSuccess/src/index.js
View file @
ac17ede7
import
React
,
{
Fragment
}
from
'
react
'
;
import
{
formatMessage
,
FormattedMessage
}
from
'
umi/locale
'
;
import
{
formatMessage
,
FormattedMessage
}
from
'
umi
-plugin-react
/locale
'
;
import
{
Button
,
Row
,
Col
,
Icon
,
Steps
,
Card
}
from
'
antd
'
;
import
{
Result
}
from
'
ant-design-pro
'
;
...
...
SearchListApplications/src/components/PageHeaderWrapper/index.js
View file @
ac17ede7
import
React
from
'
react
'
;
import
{
FormattedMessage
}
from
'
umi/locale
'
;
import
{
FormattedMessage
}
from
'
umi
-plugin-react
/locale
'
;
import
Link
from
'
umi/link
'
;
import
{
PageHeader
}
from
'
ant-design-pro
'
;
import
styles
from
'
./index.less
'
;
...
...
SearchListArticles/src/components/PageHeaderWrapper/index.js
View file @
ac17ede7
import
React
from
'
react
'
;
import
{
FormattedMessage
}
from
'
umi/locale
'
;
import
{
FormattedMessage
}
from
'
umi
-plugin-react
/locale
'
;
import
Link
from
'
umi/link
'
;
import
{
PageHeader
}
from
'
ant-design-pro
'
;
import
styles
from
'
./index.less
'
;
...
...
SearchListProjects/src/components/PageHeaderWrapper/index.js
View file @
ac17ede7
import
React
from
'
react
'
;
import
{
FormattedMessage
}
from
'
umi/locale
'
;
import
{
FormattedMessage
}
from
'
umi
-plugin-react
/locale
'
;
import
Link
from
'
umi/link
'
;
import
{
PageHeader
}
from
'
ant-design-pro
'
;
import
styles
from
'
./index.less
'
;
...
...
StepForm/src/components/PageHeaderWrapper/index.js
View file @
ac17ede7
import
React
from
'
react
'
;
import
{
FormattedMessage
}
from
'
umi/locale
'
;
import
{
FormattedMessage
}
from
'
umi
-plugin-react
/locale
'
;
import
Link
from
'
umi/link
'
;
import
{
PageHeader
}
from
'
ant-design-pro
'
;
import
styles
from
'
./index.less
'
;
...
...
UserLogin/src/index.js
View file @
ac17ede7
import
React
,
{
Component
}
from
'
react
'
;
import
{
connect
}
from
'
dva
'
;
import
{
formatMessage
,
FormattedMessage
}
from
'
umi/locale
'
;
import
{
formatMessage
,
FormattedMessage
}
from
'
umi
-plugin-react
/locale
'
;
import
Link
from
'
umi/link
'
;
import
{
Checkbox
,
Alert
,
Icon
}
from
'
antd
'
;
import
{
Login
}
from
'
ant-design-pro
'
;
...
...
UserRegister/src/index.js
View file @
ac17ede7
import
React
,
{
Component
}
from
'
react
'
;
import
{
connect
}
from
'
dva
'
;
import
{
formatMessage
,
FormattedMessage
}
from
'
umi/locale
'
;
import
{
formatMessage
,
FormattedMessage
}
from
'
umi
-plugin-react
/locale
'
;
import
Link
from
'
umi/link
'
;
import
router
from
'
umi/router
'
;
import
{
Form
,
Input
,
Button
,
Select
,
Row
,
Col
,
Popover
,
Progress
}
from
'
antd
'
;
...
...
UserRegisterResult/src/index.js
View file @
ac17ede7
import
React
from
'
react
'
;
import
{
formatMessage
,
FormattedMessage
}
from
'
umi/locale
'
;
import
{
formatMessage
,
FormattedMessage
}
from
'
umi
-plugin-react
/locale
'
;
import
{
Button
}
from
'
antd
'
;
import
Link
from
'
umi/link
'
;
import
{
Result
}
from
'
ant-design-pro
'
;
...
...
Workplace/src/components/PageHeaderWrapper/index.js
View file @
ac17ede7
import
React
from
'
react
'
;
import
{
FormattedMessage
}
from
'
umi/locale
'
;
import
{
FormattedMessage
}
from
'
umi
-plugin-react
/locale
'
;
import
Link
from
'
umi/link
'
;
import
{
PageHeader
}
from
'
ant-design-pro
'
;
import
styles
from
'
./index.less
'
;
...
...
tsconfig.json
View file @
ac17ede7
...
...
@@ -15,6 +15,7 @@
"suppressImplicitAnyIndexErrors"
:
true
,
"noUnusedLocals"
:
true
,
"allowJs"
:
true
,
"resolveJsonModule"
:
true
,
"experimentalDecorators"
:
true
,
"strict"
:
true
,
"paths"
:
{
...
...
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