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

@seresweb/vue2-lib

v2.1.3

Published

使用 vue2 作为主框架的系统公共组件

Downloads

33

Readme

@seres/vue2-lib

使用 vue2 作为主框架的系统公共组件

代码仓库地址:https://gitlab.seres.cn/lib/vue2-lib

文档地址:待开发

组件概览

  • SlRichTextEditor:基于 ProseMirror 的富文本编辑器,支持表格合并、列表与撤销重做等能力。
  • SlProvinceSelect:省份下拉选择器,内置省份数据。
  • SlCitySelect:城市级联选择器,可与省份联动。
  • SlDateRangePicker:日期区间选择器,封装 Element DatePicker。
  • SlDangerTextButton:危险态文字按钮,解决 Element 文本按钮无法设置 danger 的问题。

使用

安装

npm i @seres/vue2-lib

全局引用

import Vue from 'vue';
import V2Lib from '@seres/vue2-lib';

// 全部样式
import '@seres/vue2-lib/lib/style/index.css';

Vue.use(V2Lib);

样式按需引用待开发,忽略 1、2 步骤 借助 babel-plugin-component 按需引用:

  1. 安装依赖
npm install babel-plugin-component -D
  1. 修改 .babelrc
{
  "presets": [
    [
      "@babel/preset-env",
      {
        "modules": false
      }
    ]
  ],
  "plugins": [
    [
      "component",
      {
        "libraryName": "@seres/vue2-lib",
        "styleLibraryName": "styles"
      }
    ]
  ]
}
  1. 使用组件
<template>
  <SlProvinceSelect v-model="province" filterable clearable />
</template>

<script>
import { SlProvinceSelect } from '@seres/vue2-lib';
export default {
  components: { SlProvinceSelect },
  data() {
    return {
      value: '',
    };
  },
};
</script>

开发

目录结构

├── dev                       # 开发本地调试代码
│   ├── test-components       # 本地调试组件,在这里新增调试代码,App.vue中会自动引入并挂载(目录不会提交到git)
│   ├── App.vue               #
│   ├── index.html            #
│   ├── main.js               #
│   └── registerComponents.js # 自动注册调试代码逻辑
├── packages
│   ├── components            # 组件文件夹
│   └── styles                # 样式文件夹
├── scripts                   # 构建项目脚本
├── .gitignore                #
├── README.md                 #
├── package.json              #
└── yarn.lock                 #

开发流程

  1. packages/components下新增以sl-组件名称作为组件目录
  2. 在组件目录下新增index.js和需要的组件,并在index.js的完善自动注册并导出
  3. 修改components下的index.js,注册并导出新的组件
  4. dev/test-components下调试组件

发布

  1. 本地构建
npm run build
  1. 更新版本号
npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease]
1.0.0-0
| | | | - 测试版本号
| | | - 补丁版本
| | - 功能版本
| - 主版本
  1. 推送
npm publish