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
500a5ea9
Commit
500a5ea9
authored
Oct 22, 2020
by
eth3lbert
Committed by
言肆
Oct 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(FooterToolbar): keep reactivity of class name
parent
d674db62
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
index.tsx
src/FooterToolbar/index.tsx
+7
-5
No files found.
src/FooterToolbar/index.tsx
View file @
500a5ea9
...
...
@@ -34,8 +34,10 @@ const FooterToolbar = defineComponent({
setup
(
props
,
{
slots
})
{
const
{
getPrefixCls
}
=
inject
(
injectProConfigKey
,
defaultProProviderProps
);
const
baseClassName
=
computed
(()
=>
{
const
prefixCls
=
props
.
prefixCls
||
getPrefixCls
();
const
baseClassName
=
`
${
prefixCls
}
-footer-bar`
;
return
`
${
prefixCls
}
-footer-bar`
;
});
const
routeContext
=
useRouteContext
();
const
width
=
computed
(()
=>
{
const
{
hasSideMenu
,
isMobile
,
sideWidth
}
=
routeContext
;
...
...
@@ -51,8 +53,8 @@ const FooterToolbar = defineComponent({
const
dom
=
()
=>
{
return
(
<>
<
div
class=
{
`${baseClassName}-left`
}
>
{
props
.
extra
}
</
div
>
<
div
class=
{
`${baseClassName}-right`
}
>
{
slots
.
default
()
}
</
div
>
<
div
class=
{
`${baseClassName
.value
}-left`
}
>
{
props
.
extra
}
</
div
>
<
div
class=
{
`${baseClassName
.value
}-right`
}
>
{
slots
.
default
()
}
</
div
>
</>
);
};
...
...
@@ -64,7 +66,7 @@ const FooterToolbar = defineComponent({
});
return
()
=>
(
<
div
class=
{
baseClassName
}
style=
{
{
width
:
width
.
value
}
}
>
<
div
class=
{
baseClassName
.
value
}
style=
{
{
width
:
width
.
value
}
}
>
{
props
.
renderContent
?
props
.
renderContent
(
{
...
...
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