Skip to content

Commit

Permalink
chore: refactor with defineOptions macro (#1436)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Nov 29, 2023
1 parent 009501d commit d2d5dce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
14 changes: 4 additions & 10 deletions ecosystem/theme-default/src/client/components/AutoLink.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
<script lang="ts">
/* eslint-disable import/first, import/no-duplicates, import/order */
import { defineComponent } from 'vue'
export default defineComponent({
inheritAttrs: false,
})
/* eslint-enable import/order */
</script>

<script setup lang="ts">
import { useSiteData } from '@vuepress/client'
import { isLinkHttp, isLinkWithProtocol } from '@vuepress/shared'
Expand All @@ -16,6 +6,10 @@ import type { PropType } from 'vue'
import { useRoute } from 'vue-router'
import type { NavLink } from '../../shared/index.js'
defineOptions({
inheritAttrs: false,
})
const props = defineProps({
item: {
type: Object as PropType<NavLink>,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
<script lang="ts">
import { defineComponent } from 'vue'
export default defineComponent({
<script setup lang="ts">
defineOptions({
name: 'CodeGroupItem',
})
</script>
<script setup lang="ts">
defineProps({
title: {
type: String,
Expand Down

0 comments on commit d2d5dce

Please sign in to comment.