fix. 컴포넌트 폴더 구조 변경
This commit is contained in:
27
layers/components/blocks/HybridLink.vue
Normal file
27
layers/components/blocks/HybridLink.vue
Normal file
@@ -0,0 +1,27 @@
|
||||
<script setup lang="ts">
|
||||
interface Props {
|
||||
to: string
|
||||
target?: string
|
||||
class?: string
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
target: '',
|
||||
class: '',
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a
|
||||
v-if="props.target === '_blank'"
|
||||
v-bind="$attrs"
|
||||
:href="props.to"
|
||||
:target="props.target"
|
||||
:class="props.class"
|
||||
>
|
||||
<slot />
|
||||
</a>
|
||||
<AtomsLocaleLink v-else v-bind="$attrs" :to="props.to" :class="props.class">
|
||||
<slot />
|
||||
</AtomsLocaleLink>
|
||||
</template>
|
||||
Reference in New Issue
Block a user