Skip to content

Commit 3ff8f9e

Browse files
committed
chore: add demos
1 parent df12bc1 commit 3ff8f9e

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

apps/web-naive/src/views/demos/naive/index.vue

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script lang="ts" setup>
2-
import type { NotificationType } from 'naive-ui';
2+
import { Page } from '@vben/common-ui';
33
4+
import { type NotificationType } from 'naive-ui';
45
import { NButton, NCard, NSpace, useMessage, useNotification } from 'naive-ui';
56
67
const notification = useNotification();
@@ -33,12 +34,8 @@ function notify(type: NotificationType) {
3334
</script>
3435

3536
<template>
36-
<div class="p-5">
37-
<div class="card-box p-5">
38-
<h1 class="text-xl font-semibold">naive组件使用演示</h1>
39-
<div class="text-foreground/80 mt-2">支持多语言,主题功能集成切换等</div>
40-
</div>
41-
37+
<Page :header-sticky="true" title="naive组件使用演示">
38+
<template #headerContent> 支持多语言,主题功能集成切换等 </template>
4239
<div class="card-box mt-5 p-5">
4340
<div class="mb-3">
4441
<span class="text-lg font-semibold">按钮</span>
@@ -87,5 +84,5 @@ function notify(type: NotificationType) {
8784
<NButton type="primary" @click="notify('info')"> 加载中 </NButton>
8885
</div>
8986
</div>
90-
</div>
87+
</Page>
9188
</template>

apps/web-naive/src/views/demos/table/index.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@ const data = [
2727
</script>
2828

2929
<template>
30-
<Page>
30+
<Page title="NDataTable">
31+
<template #headerContent>
32+
表单页用于向用户收集或验证信息,基础表单常见于数据项较少的表单场景。
33+
</template>
34+
<template #footerContent>
35+
<div>Footer Content</div>
36+
</template>
3137
<NDataTable :columns="columns" :data="data" />
3238
</Page>
3339
</template>

0 commit comments

Comments
 (0)