|
|
@@ -37,6 +37,8 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
|
|
|
const emits = defineEmits(['click-create', 'click-edit'])
|
|
|
|
|
|
+const slots = useSlots()
|
|
|
+
|
|
|
// ============== 查询部分开始 ===============
|
|
|
const query = ref<any>({})
|
|
|
const searchList = ref<any>([])
|
|
|
@@ -204,7 +206,7 @@ defineExpose({
|
|
|
|
|
|
<template>
|
|
|
<div class="flex flex-col" :style="{ height: height || 'calc(100vh - 101px - var(--main-padding) * 2)' }">
|
|
|
- <el-card class="mb-4" shadow="never" v-if="searchList.length">
|
|
|
+ <el-card class="mb-4" shadow="never" v-if="searchList.length || slots.query">
|
|
|
<el-form :inline="true">
|
|
|
<el-form-item :label="item.label" v-for="(item, index) in searchList" :key="index">
|
|
|
<form-comp :item="item" v-model="query[item.name]"></form-comp>
|