parent
722a5f6740
commit
a8972d7782
@ -0,0 +1,21 @@ |
|||||||
|
<script type="text/jsx"> |
||||||
|
export default { |
||||||
|
name: "BackToTop", |
||||||
|
|
||||||
|
functional: true, |
||||||
|
|
||||||
|
props: {render: Boolean}, |
||||||
|
|
||||||
|
render(h, context) { |
||||||
|
const {props: {render}} = context |
||||||
|
if (!render) return |
||||||
|
return ( |
||||||
|
<el-backtop target=".app-main .scroll-container" visibility-height={400} bottom={66}> |
||||||
|
<div class="back-to-top"> |
||||||
|
<v-icon icon="el-icon-top"/> |
||||||
|
</div> |
||||||
|
</el-backtop> |
||||||
|
) |
||||||
|
} |
||||||
|
} |
||||||
|
</script> |
||||||
@ -0,0 +1,27 @@ |
|||||||
|
<script type="text/jsx"> |
||||||
|
import KeepRouterViewAlive from "./KeepRouterViewAlive" |
||||||
|
|
||||||
|
export default { |
||||||
|
name: "PageView", |
||||||
|
|
||||||
|
functional: true, |
||||||
|
|
||||||
|
props: { |
||||||
|
include: Array, |
||||||
|
transitionName: String |
||||||
|
}, |
||||||
|
|
||||||
|
render(h, context) { |
||||||
|
const {include, transitionName} = context.props |
||||||
|
return ( |
||||||
|
<div class="page-view"> |
||||||
|
<KeepRouterViewAlive include={include}> |
||||||
|
<transition name={transitionName} mode="out-in"> |
||||||
|
<router-view/> |
||||||
|
</transition> |
||||||
|
</KeepRouterViewAlive> |
||||||
|
</div> |
||||||
|
) |
||||||
|
} |
||||||
|
} |
||||||
|
</script> |
||||||
Loading…
Reference in new issue