Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add link to update log #6744

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions demo/SiteHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useMessage, version } from 'naive-ui'
import { computed, defineComponent, ref } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import {
push,
useComponentOptions,
useConfigProviderName,
useDisplayMode,
Expand Down Expand Up @@ -289,6 +290,10 @@ export default defineComponent({
lastWindowInnerWidth = window.innerWidth
})

function handleVersionClick() {
push('/docs/changelog')
}

return {
menuInstRef,
renderMenuLabel,
Expand Down Expand Up @@ -330,6 +335,7 @@ export default defineComponent({
mobileMenuValue: mobileMenuValueRef,
// common
handleLogoClick,
handleVersionClick,
style: computed(() => {
return isMobileRef.value
? {
Expand Down Expand Up @@ -436,9 +442,14 @@ export default defineComponent({
>
GitHub
</n-button>
<n-text class="nav-picker padded">
<n-button
size="small"
quaternary
class="nav-picker padded"
@click="handleVersionClick"
>
{{ version }}
</n-text>
</n-button>
<n-button
v-if="dev"
size="small"
Expand Down
Loading