mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
57 lines
1.0 KiB
Vue
57 lines
1.0 KiB
Vue
<template>
|
|
<n-service-layout
|
|
ref="layout"
|
|
:padding-body="false"
|
|
:items="Site.items"
|
|
:sider-props="siderProps"
|
|
:content-props="contentProps"
|
|
>
|
|
<router-view />
|
|
<landing-footer
|
|
style="padding: 32px 204px 16px 56px; text-align: left; font-size: 14px"
|
|
/>
|
|
</n-service-layout>
|
|
</template>
|
|
|
|
<script>
|
|
import LandingFooter from './documentation/landing/Footer.vue'
|
|
|
|
export default {
|
|
components: {
|
|
LandingFooter
|
|
},
|
|
provide () {
|
|
return {
|
|
NDocRoot: this
|
|
}
|
|
},
|
|
inject: ['Site'],
|
|
beforeRouteUpdate (to, from, next) {
|
|
this.memorizedPath = from ? from.path : null
|
|
next()
|
|
},
|
|
data () {
|
|
return {
|
|
memorizedPath: null,
|
|
siderProps: {
|
|
style: {
|
|
height: '100%'
|
|
}
|
|
},
|
|
contentProps: {
|
|
// themedStyle: {
|
|
// light: {
|
|
// backgroundColor: '#FFF'
|
|
// }
|
|
// }
|
|
}
|
|
}
|
|
},
|
|
methods: {
|
|
resetScrollPosition () {
|
|
this.$refs.layout.scrollTo(0, 0)
|
|
}
|
|
}
|
|
}
|
|
</script>
|