wip: use new script setup helpers

pull/137/head
Evan You 5 years ago
parent 72701db1fc
commit aca74b281f

@ -15,7 +15,7 @@
</template>
<script setup lang="ts">
import { computed, defineOptions } from 'vue'
import { computed, defineProps } from 'vue'
import { useRoute } from 'vitepress'
import { withBase, isExternal } from '../utils'
import type { DefaultTheme } from '../config'
@ -32,14 +32,10 @@ const normalizePath = (path: string): string => {
return path
}
const { props } = defineOptions<{
props: {
const { item } = defineProps<{
item: DefaultTheme.NavItemWithLink
}
}>()
const item = props.item
const route = useRoute()
const classes = computed(() => ({

@ -46,14 +46,12 @@
<script setup lang="ts">
import NavBarLink from './NavBarLink.vue'
import { ref, watch, defineOptions } from 'vue'
import { ref, watch, defineProps } from 'vue'
import { useRoute } from 'vitepress'
import type { DefaultTheme } from '../config'
defineOptions<{
props: {
defineProps<{
item: DefaultTheme.NavItemWithChildren
}
}>()
const open = ref(false)

Loading…
Cancel
Save