自定义单元格
<template>
<CurdTable :data="data" :columns="columns" :option="option">
<template #name="scope">
姓名:{{ scope.row.name }}
</template>
</CurdTable>
</template>
<script setup>
const data = [
{
name: "张三",
sex: "男",
},
{
name: "李四",
sex: "女",
},
{
name: "王五",
sex: "女",
},
{
name: "赵六",
sex: "男",
},
]
const columns = [
{ prop: "name", label: "姓名" },
{ prop: "sex", label: "性别" },
]
const option = {
menuWidth: 200,
menuBtnTitle: "自定义名称",
}
</script>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35