nh-ui-library
v1.0.12
Published
Vue3 Button Component
Readme
南昊前端组件库
一个基于 Vue 3 的前端组件库,包括布局组件 MyLayout、按钮 Button、表单 Form 和表格 Table 等常用组件。
安装
如果之前安装过旧包
npm uninstall my-ui-button-synpm install my-ui-button-sy快速引入
<script setup lang="ts">
import { MyLayout, Button, Table, Form } from 'nh-ui-library';
import 'nh-ui-library/style.css';
</script>MyLayout 布局
用于页面整体布局,包括顶部、左侧菜单和右侧内容区域
基础用法
<template>
<MyLayout>
<template #top>
<h1>自定义顶部</h1>
</template>
<template #sidebar>
<ul>
<li>菜单1</li>
<li>菜单2</li>
</ul>
</template>
<template #content>
<p>这里是右侧内容</p>
<p>更多内容...</p>
</template>
</MyLayout>
</template>插槽说明
| 插槽名 | 说明 | 默认内容 |
| ------- | ------- | ------ |
| top | 页面顶部 | 默认顶部 |
| sidebar | 左侧菜单/导航 | 默认左侧菜单 |
| content | 右侧主体内容 | 默认右侧内容 |