Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@xrenders/data-render

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xrenders/data-render

<span style="font-size:30px;font-weight:600;display:inline-block;margin-left:12px"

  • 1.0.1-alpha.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-25%
Maintainers
1
Weekly downloads
 
Created
Source
logo DataView

npm NPM downloads NPM all downloads PRs Welcome

中后台详情页解决方案,通过 schema 协议渲染页面

安装

npm i @xrenders/data-render --save

使用方式

函数组件

/**
 * transform: true
 * defaultShowCode: true
 */
import React from 'react';
import DataView from '@xrenders/data-render';

const data = {
  "creator": "清风徐来",
  "relevanceCode": "421421",
  "desc": "浙江省杭州市工专路",
  "create-time": "2019-10-10",
  "effective-date": "2019-10-10 ~ 2020-10-31",
  "safety": {
    "name": "Test demo 001",
    "app": "中后台详情页",
    "mode": "代码包",
    "yum": "244444390482344744484889",
    "fore": "23"
  },
}

const schema = [
  {
    "widget": "FDescriptions",
    "column": 3,
    "items": [
      {
        "label": "创建人",
        "dataKey": "creator"
      },
      {
        "label": "关联单据",
        "dataKey": "relevanceCode"
      },
      {
        "label": "单据备注",
        "dataKey": "desc"
      },
      {
        "label": "创建时间",
        "dataKey": "create-time"
      },
      {
        "label": "生效日期",
        "dataKey": "effective-date"
      }
    ]
  }
]

export default () => {
  return (
    <DataView schema={schema} data={data} />
  );
}

Keywords

FAQs

Package last updated on 27 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc