npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

best-link-layout

v0.0.1-beta.11

Published

BestLink 后台管理系统布局组件

Readme

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'
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'
</script>
// 任意位置控制 loading
import { useLayoutSpinStore } from 'best-link-layout'

useLayoutSpinStore().show()  // 显示
useLayoutSpinStore().hide()  // 隐藏

导出内容

组件

  • Layout - 主布局组件(自动根据配置切换布局模式)
  • LayoutLoading - 全局 Loading 组件
  • IframeIndex - iframe 嵌入页面组件

Store

  • useLayoutAppConfigStore - 应用配置 Store
  • useLayoutUserStore - 用户信息 Store
  • useLayoutSpinStore - Loading 状态 Store

常量

  • LAYOUT_ELEMENT_IDS - 布局元素 ID 常量
  • MENU_TYPE_ENUM - 菜单类型枚举
  • MENU_PERMS_TYPE_ENUM - 菜单权限类型枚举
  • MENU_DEFAULT_PARENT_ID - 菜单默认父级 ID

工具

  • layoutI18nList - 语言列表
  • layoutMessages - 国际化消息
  • layoutThemeColors - 主题颜色配置
  • getLayoutInitializedLanguage - 获取初始化语言
  • getAdminToken - 获取管理员 Token
  • ssoLogin - 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