forked from devsam/core
feat: TopBackBar에 slot 추가
This commit is contained in:
@@ -7,7 +7,10 @@
|
||||
<h2 class="title">
|
||||
{{ title }}
|
||||
</h2>
|
||||
<div v-if="teleportZone" :id="teleportZone" class="teleport-zone"></div>
|
||||
<template v-if="hasSlot">
|
||||
<slot></slot>
|
||||
</template>
|
||||
<div v-else-if="teleportZone" :id="teleportZone" class="teleport-zone"></div>
|
||||
<template v-else>
|
||||
<div> </div>
|
||||
<b-button
|
||||
@@ -25,7 +28,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import "@scss/game_bg.scss";
|
||||
import { type PropType, ref, watch } from "vue";
|
||||
import { type PropType, ref, watch, useSlots } from "vue";
|
||||
import VueTypes from "vue-types";
|
||||
|
||||
const props = defineProps({
|
||||
@@ -52,6 +55,10 @@ const props = defineProps({
|
||||
},
|
||||
});
|
||||
|
||||
const slots = useSlots();
|
||||
console.log(slots);
|
||||
const hasSlot = !!slots['default'];
|
||||
|
||||
const emit = defineEmits(["update:searchable", "reload"]);
|
||||
|
||||
const toggleSearch = ref(props.searchable);
|
||||
|
||||
Reference in New Issue
Block a user