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

df-component-screen-lib

v1.0.0

Published

# 在开组组件的时候,分两部分,一个是组件本身,一个是组件的配置

Downloads

6

Readme

大屏组件库

在开组组件的时候,分两部分,一个是组件本身,一个是组件的配置

每个组件的porps 里面有 data 和 style 两个参数

data组件可能用到的数据源 style 组件的属性配置

比如Text组件:

import React from 'react';
export default props => {
  const { style = {} } = props; // 会拿到props里面的style 来更改自己的样式
  const { text = '我是文本' } = style;
  return (
    <div
      style={{
        ...style,
      }}
    >
      {text}
    </div>
  );
};

开发完成后更改libs里面的index.js,把你开发的组件库引入进来

比如:

import ProgressLine from './ProgressLine';
import Text from './Text';
import Image from './Image';
import ECharts from './ECharts';
import Material from './Material';
import Table from './Table';

export default {
  ProgressLine,
  Text,
  Image,
  ...ECharts,
  ...Material,
  ...Table,
};

每个组件配置props里面有 updateStyle方法来更改属性

例子可以参考libs-config里面组件配置的写法

开发完成组件配置后 libs-config里面的index.js,把你开发的组件库配置引入进来

比如:

import Text from './TextConfig';
import Image from './ImageConfig';
import LineAndBarConfig from './LineAndBarConfig';
import Pie from './PieConfig';
import TableConfig from './TableConfig';
import MaterialConfig from './MaterialConfig';

const MaterialConfigHash = {
  Image: MaterialConfig,
  DividingLine: MaterialConfig,
  Circle: MaterialConfig,
  Oval: MaterialConfig,
  Rectangle: MaterialConfig,
  Arrow: MaterialConfig,
  BorderBox: MaterialConfig,
};

export default {
  Text,
  Image,
  Line: LineAndBarConfig,
  Bar: LineAndBarConfig,
  Table: TableConfig,
  Pie,
  ...MaterialConfigHash,
};

组件库打包 umd格式

npm run bur 

打包完都会输出到dist下面

地图颜色和状态相关

spaceStatus 会议室颜色状态 1 => 绿色 2 => 红色 3 => 黄色 4 => 蓝色

spaceType 会议室类型 1 => 工位 2 => 会议室