best-link-layout-xinlian
BestLink 后台管理系统布局组件
23,136
| Install | |
|---|---|
npm install best-link-layout-xinlian@0.0.2-beta.1 |
|
| Latest Version: | 0.0.2-beta.1 |
| Vue: | 3 |
| License: | MIT |
| Last Updated: | Sep 1, 2026 |
| Links: | npm |
Maintainer: xiaoguangxun
Best Link Layout
BestLink 后台管理系统布局组件,基于 Vue3 + Ant Design Vue + Pinia。
安装
npm install best-link-layout
使用
import {
Layout,
LayoutLoading,
IframeIndex,
useLayoutAppConfigStore,
useLayoutUserStore,
useLayoutSpinStore,
layoutI18nList,
layoutThemeColors
} from 'best-link-layout-xinlian'
import 'best-link-layout/style.css'
// 配置首页
const appConfigStore = useLayoutAppConfigStore()
appConfigStore.homePage.name = 'Dashboard'
appConfigStore.homePage.path = '/dashboard'
// 设置用户信息
const userStore = useLayoutUserStore()
userStore.setUserLoginInfo(userData)
// 获取用户信息
userStore.getUserInfo()
全局 Loading 使用
<!-- App.vue -->
<template>
<LayoutLoading>
<RouterView />
</LayoutLoading>
</template>
<script setup>
import { LayoutLoading } from 'best-link-layout-xinlian'
</script>
// 任意位置控制 loading
import { useLayoutSpinStore } from 'best-link-layout-xinlian'
useLayoutSpinStore().show() // 显示
useLayoutSpinStore().hide() // 隐藏
导出内容
组件
Layout- 主布局组件(自动根据配置切换布局模式)LayoutLoading- 全局 Loading 组件IframeIndex- iframe 嵌入页面组件
Store
useLayoutAppConfigStore- 应用配置 StoreuseLayoutUserStore- 用户信息 StoreuseLayoutSpinStore- Loading 状态 Store
常量
LAYOUT_ELEMENT_IDS- 布局元素 ID 常量MENU_TYPE_ENUM- 菜单类型枚举MENU_PERMS_TYPE_ENUM- 菜单权限类型枚举MENU_DEFAULT_PARENT_ID- 菜单默认父级 ID
工具
layoutI18nList- 语言列表layoutMessages- 国际化消息layoutThemeColors- 主题颜色配置getLayoutInitializedLanguage- 获取初始化语言getAdminToken- 获取管理员 TokenssoLogin- SSO 登录getCurrInfo- 获取当前用户信息layoutRequest- axios 请求实例
依赖要求
- vue >= 3.0.0
- vue-router >= 4.0.0
- pinia >= 2.0.0
- ant-design-vue >= 4.0.0
- @ant-design/icons-vue >= 7.0.0
- vue-i18n >= 9.0.0
- mitt
- lodash
- dayjs
- js-cookie >= 3.0.0
License
MIT
Related Packages
Version History
Pre-releases (144)
| Version | Released | Vue | License |
|---|---|---|---|
| 0.0.2-beta.1 | >=3.0.0 | MIT | |
| 0.0.1-beta.161 | >=3.0.0 | MIT | |
| 0.0.1-beta.151 | >=3.0.0 | MIT | |
| 0.0.1-beta.150 | >=3.0.0 | MIT | |
| 0.0.1-beta.149 | >=3.0.0 | MIT | |
| 0.0.1-beta.147 | >=3.0.0 | MIT | |
| 0.0.1-beta.145 | >=3.0.0 | MIT | |
| 0.0.1-beta.144 | >=3.0.0 | MIT | |
| 0.0.1-beta.143 | >=3.0.0 | MIT | |
| 0.0.1-beta.142 | >=3.0.0 | MIT | |
| 0.0.1-beta.141 | >=3.0.0 | MIT | |
| 0.0.1-beta.140 | >=3.0.0 | MIT | |
| 0.0.1-beta.138 | >=3.0.0 | MIT | |
| 0.0.1-beta.137 | >=3.0.0 | MIT | |
| 0.0.1-beta.136 | >=3.0.0 | MIT | |
| 0.0.1-beta.135 | >=3.0.0 | MIT | |
| 0.0.1-beta.134 | >=3.0.0 | MIT | |
| 0.0.1-beta.133 | >=3.0.0 | MIT | |
| 0.0.1-beta.132 | >=3.0.0 | MIT | |
| 0.0.1-beta.130 | >=3.0.0 | MIT | |
| 0.0.1-beta.129 | >=3.0.0 | MIT | |
| 0.0.1-beta.128 | >=3.0.0 | MIT | |
| 0.0.1-beta.127 | >=3.0.0 | MIT | |
| 0.0.1-beta.126 | >=3.0.0 | MIT | |
| 0.0.1-beta.125 | >=3.0.0 | MIT | |
| 0.0.1-beta.124 | >=3.0.0 | MIT | |
| 0.0.1-beta.123 | >=3.0.0 | MIT | |
| 0.0.1-beta.122 | >=3.0.0 | MIT | |
| 0.0.1-beta.121 | >=3.0.0 | MIT | |
| 0.0.1-beta.120 | >=3.0.0 | MIT |
Showing the latest 30 of 144. See every release on npm