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

editformfordnd

v0.2.14

Published

an edit form for react dnd form design project

Downloads

275

Readme

璞育云——表单引擎

ui:antd

表单设计器(pages/design)

基于react-dnd实现拖拽功能

表单编辑器(pages/edit)

表单编辑模块(components/FormEidt)

umi-library 打包

peerDependencies 必安装的modules "peerDependencies": { "antd": "^4.22.8", "braft-editor": "^2.3.9", // 富文本编辑器 "lodash": "^4.17.21", "react": "17.x", "react-dom": "17.x", "uuid": "^8.3.2" } 需引入 antd 样式 antd/dist/antd.css

安装第三方控件 vuera (可以在vue中使用react组件)

FormEidt组件API data 字段列表 Array value 字段值 object readOnly 只读 boolean params 配置项 object myRef form对象 { current: null }

配置项params request 请求接口方法 function

params参考 ` let params = { SELECT_SINGLE: { request: (params) => { return getCommonDictData({ ...params }); }, }, SELECT_MULTI: { request: (params) => { return getCommonDictData({ ...params }); }, }, AREA: { request: (params) => { /* 地区编码传code */ return getAreaList({ ...params }); }, }, ADDRESS: { request: (params) => { // 同area return getAreaList({ ...params }); }, }, MEMBER: { request: (params) => { return queryMemberListByDeptIds({ ...params }); }, }, DEPARTMENT: { request: (params) => { return showDeptTree({ ...params }); }, }, RICH_TEXT: { fileUpload: async (params) => { const { file, success } = params; const formData = new FormData(); formData.append('formId', formId); formData.append('file', file); const data = await fileUpload(formData, { onUploadProgress: (event) => { // 进度条 params.progress((event.loaded / event.total) * 100); }, });

    const { fileId, fileSource, previewPath } = data;
    success({
      url:
        process.env.NODE_ENV === 'development'
          ? `http://47.100.45.133:8994/business/file/imageDownload/${fileId}`
          : previewPath,
      meta: {
        id: fileId,
        title: fileSource,
        alt: fileSource,
      },
    });
  },
  fileRemove: (params) => {
    fileDelete({ ...params });
  },
},

} `