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 🙏

© 2025 – Pkg Stats / Ryan Hefner

zsysview

v0.1.0

Published

``` // 整个main.ts只需要这2句代码快速开始 import {zsysapp, addFrameRouters,zsysappMount} from 'zsysview' import 'zsysview/dist/zsysview.css' zsysappMount() ```

Readme

ZSystem前端

main.ts

// 整个main.ts只需要这2句代码快速开始
import {zsysapp, addFrameRouters,zsysappMount} from 'zsysview'
import 'zsysview/dist/zsysview.css'
zsysappMount()

vite.config.ts 请求重写

server: {
    host: "0.0.0.0",
    port: 5173,
    proxy: {
      "/api/": {
        target: "http://localhost:1788/api",
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, ""),
      },
      "/public/": {
        target: "http://localhost:1788/public",
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/public/, ""),
      },
    },
  },

左侧菜单

zsysapp.provide('app_menus',[
    { name: '首页', icon: markRaw(House), url: '/desktop'},
    { name: '数据看板', icon: markRaw(Odometer), url: '/chart' },
    { name: '事件管理', icon: markRaw(Collection), url: '/eventgroup/event'},
    // {
    //     name: '事件管理', icon: markRaw(Collection), url: '/111', show: false,
    //     children: [
    //         { name: '数据看板', icon: markRaw(Odometer), url: '/user', show: false },
    //         { name: '事件', icon: markRaw(Collection), url: '/eventgroup/event', show: false },
    //     ]
    // },
    { name: '行为分析引擎', icon: markRaw(SetUp), url: '/engine' },
    { name: '设备管理', icon: markRaw(VideoCamera), url: '/equipment' },
    { name: '区域管理', icon: markRaw(Location), url: '/area' },
    { name: '报表与统计', icon: markRaw(Document), url: '/building?1' },
    { name: '报警与通知', icon: markRaw(Bell), url: '/building?2'},

])

路由添加

import {addFrameRouter} from 'zsysview'

addFrameRouter({
  path: "/department",
  meta: { title: '组织架构' },
  component: () => import("../view/department/department.vue"),
})

系统组件

名称 | 描述 ---------|--------- breadcrumb | 面包屑、系统地址栏 zsyslist | 列表控件 zsys_delbutton | 列表删除操作按钮

zsys_delbutton

<el-table-column label="操作" width="130">
  <template #default="{ row }">
    <el-space>
      <zsys_delbutton :id="BigInt(row.area_id)" :api_url="AppApiV1.url_area_del" />
    </el-space>
  </template>
</el-table-column>

系统API

zsys_eventBus

const eventBus = zsysEventBus()
eventBus.emit('aud', { module: 'equipment', id: form.value.id })

公共方法

分类 | 名称 | 描述 ---------|----------|--------- 时间 | formatPreciseOralTime | 口语化时间 时间 | formatDateTime | 格式化时间

全局变量

import {inject} from 'vue'
inject('变量名')

名称 | 变量名 | 描述 ---------|----------|--------- 系统名称 | appname | 管理员可以修改的系统名称 备案信息 | icp | 系统的ICP备案描述