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

baowen-schedule

v0.0.18

Published

> 日程排期表 >

Downloads

5

Readme

Schedule

日程排期表

功能

  • [x] 滑动选择
  • [x] 响应式
  • [x] 多列选择
  • [x] 键盘操作(del、ctrl、shift)
  • [x] 跨天
  • [x] 行调整
  • [x] 右键上下文菜单
  • [x] 悬浮提示
  • [ ] 时间比例
  • [x] 行重新调整
  • [x] 导入数据
  • [ ] 导出数据
  • [ ] 事件监听

开发

# 安装依赖
yarn

# 然后
yarn start
# 或
yarn dev

构建

# 安装依赖
yarn

# 然后
yarn build

发布

npm publish

类构造方法

Schedule(rootNode, userSettings)

rootNode: html element userSettings: Object 定义如下:

{
      // 初始化数据,来自数据库
      data: [
          { "id": 10958, 
          "startTime": "2020-07-05 03:00:00", 
          "endTime": "2020-07-05 10:00:00", 
          "liveNumber": null, 
          "liveDuration": null,
           "slAnchors": [], -- // 显示的文字,可多行,放入数组中
           "anchorLevel": "L2", // --  颜色相关
           "operationUser": null, 
           "operationUserId": null,
            "controlUser": null, 
            "controlUserId": null, 
            "platform": null, // -- 根据平台不同显示不同的图标
            "storeId": null, 
            "storeName": null }, 
          { "id": 10959, "startTime": "2020-07-09 01:00:00", "endTime": "2020-07-09 09:00:00", "liveNumber": null, "liveDuration": null, "slAnchors": [], "anchorLevel": "L1", "operationUser": null, "operationUserId": null, "controlUser": null, "controlUserId": null, "platform": null, "storeId": null, "storeName": null },
          ...
          ],

      // 这三个key,是根据以上data中的字段名进行转义,由于数据库存的字段名与前端字段名不一致。
      // 如果不写,则data数据中按以下字段名:'color','icon','texts'
      colorKey: 'anchorLevel',
      iconKey: 'platform',
      textsKey: 'slAnchors',

      // 定制个性化(是否可以用css,而不是在js代码中写?是否有default值)
      // 1. 时间条的颜色
      // 2. 图标的url
      dataMaps: {
        color: [
          { key: 'L1', value: '#64C42D' },
          { key: 'L2', value: '#E8A32F' },
          { key: 'L3', value: '#F76B69' },
          { key: 'L4', value: '#2A8DF8' },
          { key: 'L5', value: '#442BB0' },
        ],
        icon: [
          { key: "taobao", value: "https://live.baowenonline.com/platform-icons/taobao.png" },
          { key: "jd", value: "https://live.baowenonline.com/platform-icons/jd.png" },
          { key: "douyin", value: "https://live.baowenonline.com/platform-icons/douyin.png" },
          { key: "suning", value: "https://live.baowenonline.com/platform-icons/suning.png" },
          { key: "wx", value: "https://live.baowenonline.com/platform-icons/wx.png" },
          { key: "lazada", value: "https://live.baowenonline.com/platform-icons/lazada.png" },
          { key: "tiktok", value: "https://live.baowenonline.com/platform-icons/tiktok.png" },
          { key: "shopee", value: "https://live.baowenonline.com/platform-icons/shopee.png" },
          { key: "facebook", value: "https://live.baowenonline.com/platform-icons/facebook.png" },
          { key: "ins", value: "https://live.baowenonline.com/platform-icons/ins.png" },
          { key: "youtube", value: "https://live.baowenonline.com/platform-icons/youtube.png" },
          { key: "qita", value: "https://live.baowenonline.com/platform-icons/qita.png" }
        ]
        statusIcon: 'https://live.baowenonline.com/icons/status_backfill.png'
      }
}

TO-DO

  1. 增量修改data的方法, 当对方修改了增量部分时调用
  2. 全量更新data的方法, 全量更新时不影响当前选择的时段
  3. 有一个方法进行保存,最好在userSettings中有一个callback 返回当前操作的增量数据。