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 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-bpmn-design

v1.0.2

Published

react-flow-design提供了钉钉模式的一套流程设计组件,需搭配ant design组件库使用。

Downloads

9

Readme

react-flow-design

react-flow-design提供了钉钉模式的一套流程设计组件,需搭配ant design组件库使用。

Index

Usage

安装

  npm install "react-flow-design"

示例

import React, { PureComponent } from "react"
import FlowDesign from "react-flow-design"

exports default class Example extends PureComponent{

  componentDidMount = () => {
    let editId = this.props.editId
    if (editId) {
      axios.get("/api/manage/design/approval/" + editId).then(res => {
        this.setState({
          basicInfo: res.data.returnObject.basicInfo,
          formDesign: JSON.parse(res.data.returnObject.formDesign),
          processesDesign: res.data.returnObject.processesDesign
        })
      })
    }
  }

  onFlowDesignChange = design => {
    this.state.processesDesign = design
  }

  render() {
    return <FlowDesign design={this.state.processesDesign} onChange={this.onFlowDesignChange}></FlowDesign>
  }

}

环境配置 用户及角色数据需要业务系统提供,需要进行如下设置。

import { Config } from "react-flow-design"

Config.set(Config.URL_USER_LIST, "/user/list")
Config.set(Config.URL_ROLE_LIST, "/role/list")

用户接口数据格式

[
  {
    title: "部门01",
    value: "01",
    children: [
      {
        title: "用户001",
        value: "00001",
      },
      {
        title: "用户002",
        value: "00002",
      },
    ],
  },
  {
    title: "部门02",
    value: "02",
    children: [
      {
        title: "用户003",
        value: "00003",
      },
      {
        title: "用户004",
        value: "00004",
      },
      {
        title: "用户005",
        value: "00005",
      },
    ],
  },
]

角色接口数据格式

[
  {
    title: "管理组01",
    value: "001",
  },
  {
    title: "审批组02",
    value: "002",
  },
]

API

FlowDesign

自定义流程设计展示,可拖拽配置生成所需流程。

| 参数 | 说明 | 类型 | 默认值 | |----------|-------------|-------------|-------| | design | 流程设计数据源 | string | [] | | onChange | 监听流程设计数据变化 | (design)=>void | - |

Config

环境上下文信息配置,Key/Value形式。

| 参数 | 说明 | 类型 | 默认值 | |----------|-------------|-------------|-------| | set | 给指定Key设置Value | (string, string)=>void | - | | get | 获取指定Key的Value | (string)=>string | - |

Compatibility

License

Licensed under the MIT License