|
|
@@ -17,12 +17,14 @@ interface Props {
|
|
|
height?: string
|
|
|
cardHeight?: string
|
|
|
showAdd?: boolean
|
|
|
+ span?: number
|
|
|
}
|
|
|
|
|
|
const props = withDefaults(defineProps<Props>(), {
|
|
|
pageSize: 12,
|
|
|
showAdd: true,
|
|
|
- cardHeight: '246px'
|
|
|
+ cardHeight: '226px',
|
|
|
+ span: 4
|
|
|
})
|
|
|
|
|
|
const emits = defineEmits(['click-create', 'click-edit'])
|
|
|
@@ -171,15 +173,16 @@ defineExpose({
|
|
|
|
|
|
<div class="h-full flex-grow">
|
|
|
<el-row :gutter="10">
|
|
|
- <el-col :span="6" v-if="showAdd" class="mb-10">
|
|
|
+ <el-col :span="span" v-bind="$attrs" v-if="showAdd" class="mb-10">
|
|
|
<div
|
|
|
- class="flex items-center justify-center border border-dashed w-full h-full card-list-item"
|
|
|
+ class="flex items-center justify-center border border-dashed w-full h-full card-list-item cursor-pointer"
|
|
|
:style="{ height: cardHeight }"
|
|
|
+ @click="handleCreate"
|
|
|
>
|
|
|
- <el-button link icon="plus" @click="handleCreate">新增</el-button>
|
|
|
+ <el-button link icon="plus">新增</el-button>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
- <el-col :span="6" v-for="(item, index) in tableData" :key="item.id" class="mb-10">
|
|
|
+ <el-col :span="span" v-bind="$attrs" v-for="(item, index) in tableData" :key="item.id" class="mb-10">
|
|
|
<el-card :body-style="{ padding: '0px' }" shadow="hover">
|
|
|
<slot :item="item" :index="index"></slot>
|
|
|
</el-card>
|