2020-02-27 18:09:23 +08:00
|
|
|
<template>
|
|
|
|
<n-nimbus-service-layout
|
|
|
|
ref="layout"
|
|
|
|
:padding-body="false"
|
|
|
|
:items="items"
|
|
|
|
>
|
|
|
|
<router-view />
|
|
|
|
</n-nimbus-service-layout>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
provide () {
|
|
|
|
return {
|
|
|
|
NDocRoot: this
|
|
|
|
}
|
|
|
|
},
|
|
|
|
inject: {
|
|
|
|
NEntry: {
|
|
|
|
default: null
|
|
|
|
}
|
|
|
|
},
|
|
|
|
beforeRouteUpdate (to, from, next) {
|
|
|
|
this.memorizedPath = from ? from.path : null
|
|
|
|
next()
|
|
|
|
},
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
memorizedPath: null
|
|
|
|
}
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
items () {
|
|
|
|
return this.NEntry.items
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
resetScrollPosition () {
|
2020-03-01 16:34:17 +08:00
|
|
|
this.$refs.layout.scrollTo(0, 0)
|
2020-02-27 18:09:23 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|