# 考务管理大数据平台(自定义)数据上报 # Ant Design Pro This project is initialized with [Ant Design Pro](https://pro.ant.design). Follow is the quick guide for how to use. ## Environment Prepare Install `node_modules`: ```bash npm install ``` or ```bash yarn ``` ## Provided Scripts Ant Design Pro provides some useful script to help you quick start and build with web project, code style check and test. Scripts provided in `package.json`. It's safe to modify or add additional script: ### Start project ```bash npm start ``` ### Build project ```bash npm run build ``` ### Check code style ```bash npm run lint ``` You can also use script to auto fix some lint error: ```bash npm run lint:fix ``` ### Test code ```bash npm test ``` ## More You can view full document on our [official website](https://pro.ant.design). And welcome any feedback in our [github](https://github.com/ant-design/ant-design-pro). ## 使用区块 项目根目录使用如下命令可以添加一个区块到到你的项目中: ```bash $ umi block add [block url] --path=[target path] ``` `[target path]` 是你要把区块添加到的路径。如果已经这个路径下已经存在路由组件,那么 umi 会把区块添加到它里面。如果没有那么 umi 会先创建一个路由组件,然后再把区块添加进去。 比如,你可以运行: > Pro 中会默认去 [pro-blocks](https://github.com/ant-design/pro-blocks) 去寻找区块,而默认的区块地址则是 [umi-blocks](https://github.com/umijs/umi-blocks)。如果你要在 Pro 中使用 umi 的区块,需要 add 全路径。在空项目中使用 Pro 的区块也是如此。 默认情况下,添加的区块路由为 `/[区块名]`。如果希望添加到对应路径上,可以使用 `--path` 参数指定路由: ```bash yarn umi block add ant-design-pro/analysis --path=your/path/here ``` 非Pro区块 ```bash $ umi block add https://github.com/umijs/umi-blocks/tree/master/demo ``` ```bash $ yarn umi block add ./blocks/procomponents ``` ### Block ```bash $ yarn umi block add --path http://localhost:5000/blocks/procomponents $ yarn umi generate page hello $ yarn umi block add ./blocks/procomponents $ yarn umi block clear $ yarn umi block add blocks/demo $ yarn umi block add templates/blank $ yarn umi block add https://github.com/umijs/umi-blocks/tree/master/templates/blank $ yarn umi block add https://github.com/ant-design/pro-blocks/tree/master/EmptyPage $ yarn umi block add http://10.10.14.176:3000/web/kwgl-web/src/branch/master/blocks/procomponents ``` #### 本地区块 yarn umi block add [文件夹]/[区块] --path [路由] ```bash $ yarn umi block add ./blocks/procomponents --path Demo ``` #### umi-block-convertor Q&A 1. vscode TS 报错 "umi"没有导出的成员'xxx' command + p => 输入 >restart TS Server, 重启 TS 服务