修复 src 结构
This commit is contained in:
9
src/component/breadcrumbItem/index.ts
Normal file
9
src/component/breadcrumbItem/index.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import type { App } from "vue";
|
||||
import Component from "./index.vue";
|
||||
import type { IDefineComponent } from "../type/index";
|
||||
|
||||
Component.install = (app: App) => {
|
||||
app.component(Component.name || "LayBreadcrumbItem", Component);
|
||||
};
|
||||
|
||||
export default Component as IDefineComponent;
|
||||
23
src/component/breadcrumbItem/index.vue
Normal file
23
src/component/breadcrumbItem/index.vue
Normal file
@@ -0,0 +1,23 @@
|
||||
<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();
|
||||
|
||||
const props = defineProps<{
|
||||
title?: string;
|
||||
}>();
|
||||
|
||||
const separator = inject("separator");
|
||||
</script>
|
||||
Reference in New Issue
Block a user