Coder Social home page Coder Social logo

electron's Introduction

readme

项目技术栈

electron4.1.1 + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected]

项目运行

git clone --depth 1 https://github.com/duxianwei520/electron.git  

cd react 

npm install 

npm ren dev-electron

对了,如果有小伙伴因为网络原因npm包下载不下来,那么可以试用我已经下载好的安装包,地址在

https://github.com/duxianwei520/resource/blob/master/react/node_modules.rar

最后的构建命令

npm run build (打包,部署)

对了,服务端返回的格式我们是这样子一个数据结构

{
  data: {
    totalCount: 100,
    currentPage: 1,
    pageSize: 10,
    'list': [
    ],
  },
  msg: '',
  status: 1,
}

说明

开发环境 win10 Chrome 63.0.3239.132(正式版本) (32 位) nodejs 8.7.0

如果npm install太慢导致有些npm依赖包下载失败 你可以看控制台的报错信息,再手动npm install 具体的开发包,推荐使用淘宝的注册源,直接运行,

npm install -g cnpm --registry=https://registry.npm.taobao.org 

如有问题请直接在 Issues 中提,或者您发现问题并有非常好的解决方案,欢迎 PR 👍

取消http请求示例:

import axios from 'axios'
const axiosHandle = axios.CancelToken.source()

login(){
  this.props.dispatch(fetchLogin(values, (res) => {},(error)=>{},axiosHandle)
  取消请求的操作
  setTimeout(() => {
    axiosHandle.cancel('手动取消。')
  }, 3000)
}

功能一览

  • [√] 项目按路由模块加载
  • [√] 登录,以及登录权限控制
  • [√] 退出
  • [√] 欢迎主页
  • [√] 左侧菜单,正常mini切换
  • [√] redux完整示范
  • [√] mockjs模拟后端返回接口
  • [√] 页面高度flex自适应
  • [√] axios数据跨域的设置
  • [√] 实时的webpack包大小预览,方便优化
  • [√] 实时的electron调试界面

License

MIT

交流

想跟其他的使用react的小伙伴们交流的话, 可以加入我创建的reactQQ群:159697743

electron's People

Contributors

duxianwei520 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

omni7642

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.