mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-15 14:03:36 +08:00
feat: add ample demos to @pureadmin/table (#379)
* feat: add ample demos to @pureadmin/table
This commit is contained in:
30
src/views/pure-table/components/customIndex.vue
Normal file
30
src/views/pure-table/components/customIndex.vue
Normal file
@@ -0,0 +1,30 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user