bunny-admin-element-thin-i18n/other-views/table/base/customIndex.vue

31 lines
447 B
Vue
Raw Normal View History

2024-05-11 14:48:02 +08:00
<script setup lang="ts">
import { tableData } from "./data";
const indexMethod = (index: number) => {
return index * 2;
};
const columns: TableColumnList = [
{
type: "index",
index: indexMethod
},
{
label: "日期",
prop: "date"
},
{
label: "姓名",
prop: "name"
},
{
label: "地址",
prop: "address"
}
];
</script>
<template>
<pure-table :data="tableData" :columns="columns" />
</template>