feat(breadcrumb): 修复面包屑组件
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
</template>
|
||||
|
||||
<script setup name="LayBreadcrumb" lang="ts">
|
||||
import { defineProps, provide, withDefaults, useSlots, ref, Ref } from 'vue'
|
||||
import { defineProps, provide, withDefaults } from 'vue'
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
|
||||
@@ -1,14 +1,24 @@
|
||||
<template>
|
||||
<a href>{{ title }}</a>
|
||||
<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 } from 'vue'
|
||||
import { defineProps, inject, useSlots } from 'vue'
|
||||
|
||||
const props = defineProps<{
|
||||
title: string
|
||||
}>()
|
||||
const slot = useSlots()
|
||||
|
||||
const props =
|
||||
defineProps<{
|
||||
title: string
|
||||
}>()
|
||||
|
||||
const separator = inject('separator')
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user