layui/src/component/breadcrumbItem/index.vue

24 lines
468 B
Vue
Raw Normal View History

<template>
<a href="javascript:void(0);">
<template v-if="slot.default">
<slot></slot>
</template>
<template v-else>
{{ title }}
</template>
</a>
<span lay-separator>{{ separator }}</span>
</template>
<script setup name="LayBreadcrumbItem" lang="ts">
import { defineProps, inject, useSlots } from "vue";
const slot = useSlots();
2021-11-07 16:54:38 +00:00
const props = defineProps<{
title?: string;
}>();
const separator = inject("separator");
</script>