Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pro-layout
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
packages
pro-layout
Commits
fa867161
Commit
fa867161
authored
Mar 18, 2021
by
Sendya
Committed by
言肆
Mar 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: def static func
parent
00a7ea0c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
BasicLayout.tsx
src/BasicLayout.tsx
+7
-7
No files found.
src/BasicLayout.tsx
View file @
fa867161
...
@@ -13,7 +13,10 @@ import useMediaQuery from './hooks/useMediaQuery';
...
@@ -13,7 +13,10 @@ import useMediaQuery from './hooks/useMediaQuery';
import
'./BasicLayout.less'
;
import
'./BasicLayout.less'
;
export
const
defaultPrefixCls
=
'ant-pro'
;
export
const
defaultPrefixCls
=
'ant-pro'
;
const
getPrefixCls
=
(
suffixCls
?:
string
,
customizePrefixCls
?:
string
)
=>
{
if
(
customizePrefixCls
)
return
customizePrefixCls
;
return
suffixCls
?
`
${
defaultPrefixCls
}
-
${
suffixCls
}
`
:
defaultPrefixCls
;
};
export
type
BasicLayoutProps
=
SiderMenuWrapperProps
&
export
type
BasicLayoutProps
=
SiderMenuWrapperProps
&
HeaderViewProps
&
{
HeaderViewProps
&
{
pure
?:
boolean
;
pure
?:
boolean
;
...
@@ -24,7 +27,7 @@ export type BasicLayoutProps = SiderMenuWrapperProps &
...
@@ -24,7 +27,7 @@ export type BasicLayoutProps = SiderMenuWrapperProps &
loading
?:
boolean
;
loading
?:
boolean
;
i18n
?:
RouteContextProps
[
'i18n'
];
locale
?:
RouteContextProps
[
'i18n'
];
defaultCollapsed
?:
boolean
;
defaultCollapsed
?:
boolean
;
...
@@ -141,11 +144,8 @@ const ProLayout = defineComponent({
...
@@ -141,11 +144,8 @@ const ProLayout = defineComponent({
// @ts-ignore
// @ts-ignore
const
routeContext
:
RouteContextProps
=
reactive
({
const
routeContext
:
RouteContextProps
=
reactive
({
getPrefixCls
:
(
suffixCls
?:
string
,
customizePrefixCls
?:
string
)
=>
{
getPrefixCls
,
if
(
customizePrefixCls
)
return
customizePrefixCls
;
i18n
:
props
.
locale
||
((
t
:
string
)
=>
t
),
return
suffixCls
?
`
${
defaultPrefixCls
}
-
${
suffixCls
}
`
:
defaultPrefixCls
;
},
i18n
:
(
t
:
string
):
string
=>
t
,
contentWidth
:
'Fluid'
,
contentWidth
:
'Fluid'
,
layout
:
propRefs
.
layout
,
layout
:
propRefs
.
layout
,
navTheme
:
propRefs
.
navTheme
,
navTheme
:
propRefs
.
navTheme
,
...
...
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