refactor: adjust all sample pages and use page components (#4118)

This commit is contained in:
Vben
2024-08-11 20:05:52 +08:00
committed by GitHub
parent 3015912f1a
commit 517acada1a
75 changed files with 282 additions and 383 deletions

View File

@@ -34,55 +34,35 @@ function notify(type: NotificationType) {
</script>
<template>
<Page title="naive组件使用演示">
<template #header> 支持多语言主题功能集成切换等 </template>
<div class="card-box p-5">
<div class="mb-3">
<span class="text-lg font-semibold">按钮</span>
</div>
<div>
<NSpace>
<NButton>Default</NButton>
<NButton type="tertiary"> Tertiary </NButton>
<NButton type="primary"> Primary </NButton>
<NButton type="info"> Info </NButton>
<NButton type="success"> Success </NButton>
<NButton type="warning"> Warning </NButton>
<NButton type="error"> Error </NButton>
</NSpace>
</div>
</div>
<Page description="支持多语言,主题功能集成切换等" title="naive组件使用演示">
<NCard class="mb-5" title="按钮">
<NSpace>
<NButton>Default</NButton>
<NButton type="tertiary"> Tertiary </NButton>
<NButton type="primary"> Primary </NButton>
<NButton type="info"> Info </NButton>
<NButton type="success"> Success </NButton>
<NButton type="warning"> Warning </NButton>
<NButton type="error"> Error </NButton>
</NSpace>
</NCard>
<div class="card-box mt-5 p-5">
<div class="mb-3">
<span class="text-lg font-semibold">卡片</span>
</div>
<div>
<NCard title="卡片"> 卡片内容 </NCard>
</div>
</div>
<div class="card-box mt-5 p-5">
<div class="mb-3">
<span class="text-lg font-semibold">信息 Message </span>
</div>
<div class="flex gap-3">
<NCard class="mb-5" title="Message">
<NSpace>
<NButton type="error" @click="error"> 错误 </NButton>
<NButton type="warning" @click="warning"> 警告 </NButton>
<NButton type="success" @click="success"> 成功 </NButton>
<NButton type="primary" @click="loading"> 加载中 </NButton>
</div>
</div>
</NSpace>
</NCard>
<div class="card-box mt-5 p-5">
<div class="mb-3">
<span class="text-lg font-semibold">通知 Notification </span>
</div>
<div class="flex gap-3">
<NCard class="mb-5" title="Notification">
<NSpace>
<NButton type="error" @click="notify('error')"> 错误 </NButton>
<NButton type="warning" @click="notify('warning')"> 警告 </NButton>
<NButton type="success" @click="notify('success')"> 成功 </NButton>
<NButton type="primary" @click="notify('info')"> 加载中 </NButton>
</div>
</div>
</NSpace>
</NCard>
</Page>
</template>

View File

@@ -27,10 +27,10 @@ const data = [
</script>
<template>
<Page title="NDataTable">
<template #header>
表单页用于向用户收集或验证信息基础表单常见于数据项较少的表单场景
</template>
<Page
description="表单页用于向用户收集或验证信息,基础表单常见于数据项较少的表单场景。"
title="NDataTable"
>
<NDataTable :columns="columns" :data="data" />
</Page>
</template>