* feat: page component * chore: basic page * chore: add demos * chore: add header-sticky support * chore: update web-ele * chore: rename slot name --------- Co-authored-by: Vben <ann.vben@gmail.com>
39 lines
784 B
Vue
39 lines
784 B
Vue
<script setup lang="ts">
|
||
import { ref } from 'vue';
|
||
|
||
import { Page } from '@vben/common-ui';
|
||
|
||
import { NDataTable } from 'naive-ui';
|
||
|
||
const columns = ref([
|
||
{
|
||
key: 'no',
|
||
title: 'No',
|
||
},
|
||
{
|
||
key: 'title',
|
||
title: 'Title',
|
||
},
|
||
{
|
||
key: 'length',
|
||
title: 'Length',
|
||
},
|
||
]);
|
||
const data = [
|
||
{ length: '4:18', no: 3, title: 'Wonderwall' },
|
||
{ length: '4:48', no: 4, title: "Don't Look Back in Anger" },
|
||
{ length: '7:27', no: 12, title: 'Champagne Supernova' },
|
||
];
|
||
</script>
|
||
|
||
<template>
|
||
<Page title="NDataTable">
|
||
<template #header>
|
||
表单页用于向用户收集或验证信息,基础表单常见于数据项较少的表单场景。
|
||
</template>
|
||
<NDataTable :columns="columns" :data="data" />
|
||
</Page>
|
||
</template>
|
||
|
||
<style scoped></style>
|