1 Star 0 Fork 0

bowen / react-dva-demo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

项目名:[ A React project ]。

1. 如何运行

node版本 [8.11.3]

1.1 开发环境配置

# 安装 cnpm 命令行工具。
npm i -g cnpm --registry=https://registry.npm.taobao.org

# 安装依赖包
cnpm i

1.2 开发过程

1.2.1 命令

# pages模版快速生成
npm run tep `文件名`

# 开发时时编译
npm run dev

# 编译打包
npm run build

1.2.2 开发注意事项

1.eslint+stylelint已经开启,请注意代码规范 如果不希望lint限制你的代码规范,删除.eslintrc和.stylelintrc即可

2.pxtorem已经配置,以750*1334设计稿为比例自动转换px单位

2. 业务介绍

2.1 React业务入口

入口地址为 src/main.js

src目录结构

├── components              // 组件
├── config              	  // 配置文件
│   └── index.js			  		    // 配置参数
├── images                  // 图片文件夹
├── models                  // 公共models
├── pages                   // 页面
├── routes                  // 路由
├── services                // 公共api接口
├── styles                  // 样式
│   ├── base.less					      // 全局基础样式
│   ├── iconfont.less           // 图标文件
│   ├── mixin.less              // less方法 
│   └── theme.less					    // less常量定义
├── utils                   // 工具类
│    └── request.js             // 请求封装
├── entry.ejs               // 入口ejs模版
├── index.js                // 入口文件
└── route.js					      / /路由

3. 其他

dva开发文档地址

https://github.com/dvajs.

MIT License Copyright (c) 2018 Easy Tuan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/easytuan/react-dva-demo.git
git@gitee.com:easytuan/react-dva-demo.git
easytuan
react-dva-demo
react-dva-demo
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891