Skip to content

管理后台,前端用了react全家桶,后台用了koa2

Notifications You must be signed in to change notification settings

shanks-xc/shanks-v1-cms

Repository files navigation

背景

运行前端项目

技术栈:react,redux,router4,ant-design

npm i
yarn start

运行后端项目

技术栈:koa2 passport koa-validator koa-log4 mongodb

// 记得要安装mongodb(可参考):http://www.runoob.com/mongodb/mongodb-tutorial.html
cd server
npm i
npm start

前端 react 记录学习部分

创建项目

create-react-app

暴露内建配置

git add .
git git commit -am "Save before ejecting"
yarn run eject

该项目引用了 ant design ant-design 官网 web

小技巧

  • js 跳转路由
import createHistory from 'history/createBrowserHistory';
createHistory ().push (value.key);

利用 js 方法进行路由跳转:路由教程https://segmentfault.com/a/1190000011137828

withRouter高阶组件,提供了history让你使用~
this.props.history.push("/some/Path");
// 在需要用到的页面引入withRouter
export default withRouter(MyComponent);
  • 引入富文本编辑器 react-quill
"quill-image-drop-module": "^1.0.3",
"react-quill": "^1.1.0",

image.png image.png

About

管理后台,前端用了react全家桶,后台用了koa2

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages