世界上最伟大的投资就是投资自己的教育
GeekConsoleNet
id 7402
见习 小学生
-
-
贴笔记咯
// doc link
// https://ant.design/docs/react/use-with-create-react-app-cn// 加速 yarn,设置国内镜像
$ yarn config set registry http://registry.npm.taobao.org/// 新建 react 项目
$ yarn create react-app antd-demo
$ cd antd-demo
$ yarn start// 给项目添加 antd
$ yarn add antd// 引入 antd 组件
import Button from 'antd/lib/button';// 加入 antd 样式
// 在 App.css 顶部加入法
@import '~antd/dist/antd.css'; -
-
-
Done ! 非常实用~
再贴一段代码:
'GET /api/postsMock': (req, res) => { res.status(200).json({ users: Mock.mock({ 'list|1-10': [{ 'id|+1': 1, "name": "@last", "nickName": "@string", "isMale": "@boolean", "birthday":"@date('yyyy-MM-dd')", "avantar":"@image('100x100', @color, @color, @string)", "province":"@province", }] }) })},
-
贴段代码展示阶段成果_^
'GET /api/postsMock': (req, res) => { res.status(200).json({ users: Mock.mock({ 'list|1-10': [{ 'id|+1': 1, "name": "@string", "isMale": "@boolean", "birthday":"@date('yyyy-MM-dd')" }] }) })},
-
-
-
这个方法好,技能点 +1
-
感动!看到随风老师的回复~
你这么一说,我瞬间豁然开朗了。
© 汕尾市求知科技有限公司 | Rails365 Gitlab | Qiuzhi99 Gitlab | 知乎 | b 站 | 搜索
粤公网安备 44152102000088号 | 粤ICP备19038915号
Top