Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
@f-loat/fr-generator
Advanced tools
npm i fr-generator
import React from 'react';
import Generator from 'fr-generator';
const defaultValue = {
schema: {
type: 'object',
properties: {
inputName: {
title: '简单输入框',
type: 'string',
},
},
},
displayType: 'row',
showDescIcon: true,
labelWidth: 120,
};
const templates = [
{
text: '模板1',
name: 'something',
schema: {
title: '对象',
description: '这是一个对象类型',
type: 'object',
properties: {
inputName: {
title: '简单输入框',
type: 'string',
},
selectName: {
title: '单选',
type: 'string',
enum: ['a', 'b', 'c'],
enumNames: ['早', '中', '晚'],
},
dateName: {
title: '时间选择',
type: 'string',
format: 'date',
},
},
},
},
];
const Demo = () => {
const submit = schema => {
alert(JSON.stringify(schema));
};
return (
<Generator
defaultValue={defaultValue}
templates={templates}
submit={submit}
/>
);
};
export default Demo;
代码展示效果见 Demo。
目前支持 3 个 props:defaultValue
,templates
和 submit
FAQs
Unknown package
The npm package @f-loat/fr-generator receives a total of 0 weekly downloads. As such, @f-loat/fr-generator popularity was classified as not popular.
We found that @f-loat/fr-generator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.