楼栋增删改查完成, 接着房屋
This commit is contained in:
@@ -9,12 +9,12 @@
|
||||
<div class="pagetitle">{{ props.title }}</div>
|
||||
</div>
|
||||
<!-- solt -->
|
||||
<slot name="content" v-if="showSlot"></slot>
|
||||
<div class="h-20px" v-show="!showSlot"></div>
|
||||
<slot name="content" v-if="Boolean(showSlot.content)"></slot>
|
||||
<div class="h-20px" v-show="!Boolean(showSlot.content)"></div>
|
||||
</div>
|
||||
<div class="rightbox">
|
||||
<!-- 操作按钮 -->
|
||||
<slot name="operate" v-if="showSlot"></slot>
|
||||
<slot name="operate" v-if="Boolean(showSlot.operate)"></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -23,7 +23,10 @@
|
||||
import Breadcrumb from '@/components/Breadcrumb/index.vue';
|
||||
const slots = useSlots();
|
||||
const showSlot = computed(() => {
|
||||
return slots.content && slots.content().length > 0;
|
||||
return {
|
||||
content: slots.content ?? null,
|
||||
operate: slots.operate ?? null
|
||||
};
|
||||
});
|
||||
|
||||
const props = defineProps({
|
||||
|
||||
Reference in New Issue
Block a user