xiaoming 2367eedc5d
feat: 添加虚拟表格示例 (#1007)
* feat: 添加虚拟表格示例
2024-03-20 15:00:47 +08:00

29 lines
504 B
Vue

<script setup lang="ts">
import { tableDataSortable } from "./data";
const columns: TableColumnList = [
{
label: "日期",
prop: "date",
sortable: true
},
{
label: "姓名",
prop: "name"
},
{
label: "地址",
prop: "address",
formatter: ({ address }) => `格式化后的内容:${address}`
}
];
</script>
<template>
<pure-table
:data="tableDataSortable"
:columns="columns"
:default-sort="{ prop: 'date', order: 'ascending' }"
/>
</template>