mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
6453b90043
* feat(vite-doc): add vite md plugin * fixed(site-vite): merge conflicts * fix(vite-doc): some bug in vue rerender,use key to advoid * feat(vite-doc): finished doc * fix(vite-doc): import path should be same as normal * chore(vite-doc): remove useless code Co-authored-by: Lecong Zhang <50313260+tskirby@users.noreply.github.com>
64 lines
1.1 KiB
Vue
64 lines
1.1 KiB
Vue
<template>
|
|
<n-nimbus-service-layout
|
|
ref="layout"
|
|
:padding-body="false"
|
|
:items="items"
|
|
:sider-style="siderStyle"
|
|
:content-style="contentStyle"
|
|
:body-themed-style="bodyThemedStyle"
|
|
>
|
|
<router-view />
|
|
<landing-footer style="padding: 32px 204px 16px 56px; text-align: left; font-size: 14px;" />
|
|
</n-nimbus-service-layout>
|
|
</template>
|
|
|
|
<script>
|
|
import LandingFooter from './documentation/landing/Footer.vue'
|
|
|
|
export default {
|
|
components: {
|
|
LandingFooter
|
|
},
|
|
provide () {
|
|
return {
|
|
NDocRoot: this
|
|
}
|
|
},
|
|
inject: {
|
|
Site: {
|
|
default: null
|
|
}
|
|
},
|
|
beforeRouteUpdate (to, from, next) {
|
|
this.memorizedPath = from ? from.path : null
|
|
next()
|
|
},
|
|
data () {
|
|
return {
|
|
memorizedPath: null,
|
|
siderStyle: {
|
|
height: '100%'
|
|
},
|
|
contentStyle: {
|
|
height: '100%'
|
|
},
|
|
bodyThemedStyle: {
|
|
light: {
|
|
backgroundColor: '#FFF'
|
|
}
|
|
}
|
|
}
|
|
},
|
|
computed: {
|
|
items () {
|
|
return this.Site.items
|
|
}
|
|
},
|
|
methods: {
|
|
resetScrollPosition () {
|
|
this.$refs.layout.scrollTo(0, 0)
|
|
}
|
|
}
|
|
}
|
|
</script>
|