mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-27 05:15:43 +08:00
This commit is contained in:
parent
c2e2ca9bed
commit
2c536976e8
@ -28,6 +28,10 @@
|
|||||||
<template #headerCell="{ column }">
|
<template #headerCell="{ column }">
|
||||||
<HeaderCell :column="column" />
|
<HeaderCell :column="column" />
|
||||||
</template>
|
</template>
|
||||||
|
<!-- 增加对antdv3.x兼容 -->
|
||||||
|
<template #bodyCell="data">
|
||||||
|
<slot name="bodyCell" v-bind="data || {}"></slot>
|
||||||
|
</template>
|
||||||
<!-- <template #[`header-${column.dataIndex}`] v-for="(column, index) in columns" :key="index">-->
|
<!-- <template #[`header-${column.dataIndex}`] v-for="(column, index) in columns" :key="index">-->
|
||||||
<!-- <HeaderCell :column="column" />-->
|
<!-- <HeaderCell :column="column" />-->
|
||||||
<!-- </template>-->
|
<!-- </template>-->
|
||||||
|
@ -1,25 +1,27 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="p-4">
|
<div class="p-4">
|
||||||
<BasicTable @register="registerTable">
|
<BasicTable @register="registerTable">
|
||||||
<template #id="{ record }"> ID: {{ record.id }} </template>
|
<template #bodyCell="{ column, record, text }">
|
||||||
<template #no="{ record }">
|
<template v-if="column.key === 'id'"> ID: {{ record.id }} </template>
|
||||||
|
<template v-if="column.key === 'no'">
|
||||||
<Tag color="green">
|
<Tag color="green">
|
||||||
{{ record.no }}
|
{{ record.no }}
|
||||||
</Tag>
|
</Tag>
|
||||||
</template>
|
</template>
|
||||||
<template #avatar="{ record }">
|
<template v-if="column.key === 'avatar'">
|
||||||
<Avatar :size="60" :src="record.avatar" />
|
<Avatar :size="60" :src="record.avatar" />
|
||||||
</template>
|
</template>
|
||||||
<template #img="{ text }">
|
<template v-if="column.key === 'imgArr'">
|
||||||
<TableImg :size="60" :simpleShow="true" :imgList="text" />
|
<TableImg :size="60" :simpleShow="true" :imgList="text" />
|
||||||
</template>
|
</template>
|
||||||
<template #imgs="{ text }"> <TableImg :size="60" :imgList="text" /> </template>
|
<template v-if="column.key === 'imgs'"> <TableImg :size="60" :imgList="text" /> </template>
|
||||||
|
|
||||||
<template #category="{ record }">
|
<template v-if="column.key === 'category'">
|
||||||
<Tag color="green">
|
<Tag color="green">
|
||||||
{{ record.no }}
|
{{ record.no }}
|
||||||
</Tag>
|
</Tag>
|
||||||
</template>
|
</template>
|
||||||
|
</template>
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
Loading…
Reference in New Issue
Block a user