修改了Readme

master
WangJiaLiang 2023-01-12 20:44:10 +00:00
parent e3d72167f7
commit 4fed57c237
2 changed files with 52 additions and 82 deletions

109
README.md
View File

@ -1,70 +1,65 @@
# Getting Started with Create React App # EVA Form
EVA 对外表单填报系统 用于精品活动/纳新报名页
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 可接受自定义参数生成表格
## Available Scripts API LIST
In the project directory, you can run: 问题格式
### `npm start` - methods:get
- url:/api/forminfo/*{router}*
Runs the app in the development mode.\ ```json
Open [http://localhost:3000](http://localhost:3000) to view it in your browser. {
code:200,
data:{
formname:"EVA",
question:[
{
type: "input", //输入框
title: "blank1",// label
placeholder: "placeholder1",//文本框提示语
message: "please input the blank",//未填写提交 报错提示语
style: { width: "200px" },
}
{
type: "radio",//选择题
title: "radio1",//label
options: ["option1", "option2", "option3"],//选项
message: "please select one option",
}
{
type: "textarea",//长文本输入框
title: "textarea1",
placeholder: "text area placeholder1",//文本框提示语
message: "please input the text area",
style: { width: "400px" },
rows: 4,//行数
}
]
}
}
```
The page will reload when you make changes.\ 答案提交
You may also see any lint errors in the console.
### `npm test` - methods:post
Launches the test runner in the interactive watch mode.\ - url: /api/formsubmit/{router}
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
### `npm run build` - post格式
Builds the app for production to the `build` folder.\ ```json
It correctly bundles React in production mode and optimizes the build for the best performance. {
"title":value, //title是之前题目生成时传的title
"title":value, //value根据题目类型而定 可能是string number boolean
"title":value,
}
```
The build is minified and the filenames include the hashes.\ ## TODO
Your app is ready to be deployed!
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 增加图片上传组件
### `npm run eject`
**Note: this is a one-way operation. Once you `eject`, you can't go back!**
If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
## Learn More
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
To learn React, check out the [React documentation](https://reactjs.org/).
### Code Splitting
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
### Analyzing the Bundle Size
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
### Making a Progressive Web App
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
### Advanced Configuration
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
### Deployment
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
### `npm run build` fails to minify
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)

View File

@ -1,25 +0,0 @@
import { Input } from "antd";
import React, { Component } from "react";
class Inputsmall extends Component {
constructor(props) {
super(props);
this.state = {
describe: "#",
placeholder: "请输入你的名字",
};
}
render() {
return (
<div>
<span style={{ marginRight: "1%" }}>{this.state.describe}</span>
<span>
<Input
style={{ width: "20%" }}
placeholder={this.state.placeholder}
/>
</span>
</div>
);
}
}
export default Inputsmall;