refactor: use compiler macros

pull/363/head
Eduardo San Martin Morote 3 years ago
parent 7b501293da
commit 3038829807

@ -2,7 +2,7 @@
import '@docsearch/css'
import docsearch from '@docsearch/js'
import { useRoute, useRouter, useData } from 'vitepress'
import { defineProps, getCurrentInstance, onMounted, watch } from 'vue'
import { getCurrentInstance, onMounted, watch } from 'vue'
import type { DefaultTheme } from '../config'
import type { DocSearchHit } from '@docsearch/react/dist/esm/types'

@ -1,5 +1,5 @@
<script setup lang="ts">
import { defineProps, onMounted } from 'vue'
import { onMounted } from 'vue'
// global _bsa
const ID = 'bsa-cpc-script'

@ -1,5 +1,5 @@
<script setup lang="ts">
import { defineProps, ref, onMounted } from 'vue'
import { ref, onMounted } from 'vue'
const { code, placement } = defineProps<{
code: string

@ -1,10 +1,9 @@
<script setup lang="ts">
import { defineEmit } from 'vue'
import NavBarTitle from './NavBarTitle.vue'
import NavLinks from './NavLinks.vue'
import ToggleSideBarButton from './ToggleSideBarButton.vue'
defineEmit(['toggle'])
defineEmits(['toggle'])
</script>
<template>

@ -1,5 +1,5 @@
<script setup lang="ts">
import { defineProps, ref, watch } from 'vue'
import { ref, watch } from 'vue'
import { useRoute } from 'vitepress'
import type { DefaultTheme } from '../config'
import NavDropdownLinkItem from './NavDropdownLinkItem.vue'

@ -1,5 +1,5 @@
<script setup lang="ts">
import { defineProps, toRefs } from 'vue'
import { toRefs } from 'vue'
import type { DefaultTheme } from '../config'
import { useNavLink } from '../composables/navLink'
import OutboundLink from './icons/OutboundLink.vue'

@ -1,5 +1,5 @@
<script setup lang="ts">
import { defineProps, toRefs } from 'vue'
import { toRefs } from 'vue'
import type { DefaultTheme } from '../config'
import { useNavLink } from '../composables/navLink'
import OutboundLink from './icons/OutboundLink.vue'

@ -1,11 +1,8 @@
<script setup lang="ts">
import { defineProps } from 'vue'
import NavLinks from './NavLinks.vue'
import SideBarLinks from './SideBarLinks.vue'
defineProps({
open: { type: Boolean, required: true }
})
defineProps<{ open: boolean }>()
</script>
<template>

Loading…
Cancel
Save