GithubHelp home page GithubHelp logo

didilinkin / react-admin-antd Goto Github PK

View Code? Open in Web Editor NEW
63.0 7.0 17.0 9.6 MB

(原始版本在 - Router 分支)基于React-Antd的后台管理系统; 将使用webpack3+Redux+React-router4+styled-components+ESlint4(目前为测试数据, 非正式)

License: MIT License

JavaScript 96.37% HTML 0.16% Dockerfile 0.02% Less 3.45%
react redux react-router-v4 react-router-redux redux-devtools redux-logger webpack3 eslint standard styled-components history redux-thunk redux-freeze recharts echarts-for-react react-fiber

react-admin-antd's People

Contributors

didilinkin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-admin-antd's Issues

build后部署在服务器上访问始终404.

试过nginx
server {
...
location / {
try_files $uri /index.html
}
}
和Apache 服务器
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^.*$ / [L,QSA]
都不行,请问你这个应该怎么弄。
是否是路由的问题?

react-router-config在未登录的情况下路由保护

@didilinkin
privateRoutes.js中,exact为true,应该只能对访问路径为/拦截,验证是否登录,如下:
const privateRoutes = [{
path: '/',
exact: true,
component: PrivateRoute // 无其他信息; 不需要渲染组件
}]
那么,访问其他的路径,是不会验证登录的,是不是有问题?

scripts/start.js是脚手架生成的吗?

看到这个文件里面有
// @remove-on-eject-begin
/**

  • Copyright (c) 2015-present, Facebook, Inc.
  • All rights reserved.
  • This source code is licensed under the BSD-style license found in the
  • LICENSE file in the root directory of this source tree. An additional grant
  • of patent rights can be found in the PATENTS file in the same directory.
    */
    // @remove-on-eject-end

Failed to compile.

Failed to compile.

./node_modules/_rc-animate@2.4.1@rc-animate/es/AnimateChild.js
76:11-34 'css-animation' does not contain an export named 'isCssAnimationSupported'.

eslint配置文件.eslintrc.js中的JavaScript Standard Style是完整的吗?

@didilinkin
RT
我的意思是

// 以下规则为 'Standard' 规范( 无修改 )
        // "indent": [ "error", 2 ],                                                   // 两格缩进
        "quotes": [ "error", "single" ],                                            // 必须使用单引号
        "no-unused-vars": "error",                                                  // 不要定义未使用的变量
        "keyword-spacing": [ "error", { "before": true } ],                         // 关键字后面加空格
        "space-before-function-paren": "error",                                     // 函数声明时括号与函数名间加空格
        "eqeqeq": [ "error", "always" ],                                            // 使用 === 替代 ==
        "space-infix-ops":  "error",                                                // 字符串拼接操作符 (Infix operators) 之间要留空格
        "comma-spacing": [ "error", { "before": false, "after": true } ],           // 逗号前面禁止 加空格 / 逗号后面必须 加空格
        "brace-style": "error",                                                     // 关键字要与花括号保持在同一行
        "curly": "error",                                                           // 多行 if 语句的的括号不能省
        "handle-callback-err": "error",                                             // 不要丢掉异常处理中err参数
        "no-undef": "error",                                                        // 使用浏览器全局变量时加上 window. 前缀
        "no-multiple-empty-lines": ["error", { "max": 2, "maxBOF": 1 }],            // 不允许有连续多行空行
        // "operator-linebreak": [ "error", "after" ],                                 // 对于三元运算符 ? 和 : 与他们所负责的代码处于同一行( 所有的运算符必须在同一行 )
        "one-var": [ "error", { var: "never", let: "never", const: "never" } ],     // 每个 var 关键字单独声明一个变量
        "no-cond-assign": "error",                                                  // 条件语句中赋值语句使用括号包起来。这样使得代码更加清晰可读,而不会认为是将条件判断语句的全等号(===)错写成了等号(=)
        "block-spacing": "error",                                                   // 单行代码块两边加空格
        "camelcase": "error",                                                       // 对于变量和函数名统一使用驼峰命名法
        "comma-dangle": [ "error", "never" ],                                       // 不允许有多余的行末逗号
        "comma-style": [ "error", "last" ],                                         // 始终将逗号置于行末
        "dot-location": [ "error", "object" ],                                      // 点号操作符须与属性需在同一行
        "eol-last": [ "error", "always" ],                                          // 文件末尾留一空行
        "func-call-spacing": ["error", "never"],                                    // 函数调用时标识符与括号间不留间隔
        "key-spacing": [ "error", { "beforeColon": false } ],                       // 键值对当中冒号与值之间要留空白
        "new-cap" : "error",                                                        // 构造函数要以大写字母开头
        "new-parens": "error",                                                      // 无参的构造函数调用时要带上括号
        "accessor-pairs": "error",                                                  // 对象中定义了存值器,一定要对应的定义取值器
        "constructor-super": "error",                                               // 子类的构造器中一定要调用 super
        "no-array-constructor": "error",                                            // 使用数组字面量而不是构造器( 禁止使用 Array 构造函数 )
        "no-caller": "error",                                                       // 避免使用 arguments.callee 和 arguments.caller
        "no-class-assign": "error",                                                 // 避免对类名重新赋值
        "no-const-assign": "error",                                                 // 避免修改使用 const 声明的变量
        "no-constant-condition": "error",                                           // 避免使用常量作为条件表达式的条件( 循环语句除外 )
        "no-control-regex": "error",                                                // 正则中不要使用控制符
        //"no-debugger": "error",                                                     // 不要使用 debugger
        "no-delete-var": "error",                                                   // 不要对变量使用 delete 操作
        "no-dupe-args": "error",                                                    // 不要定义冗余的函数参数
        "no-dupe-class-members": "error",                                           // 类中不要定义冗余的属性
        "no-dupe-keys": "error",                                                    // 对象字面量中不要定义重复的属性
        "no-duplicate-case": "error",                                               // switch 语句中不要定义重复的 case 分支
        "no-duplicate-imports": "error",                                            // 同一模块有多个导入时一次性写完
        "no-empty-character-class": "error",                                        // 正则中不要使用空字符
        "no-empty-pattern": "error",                                                // 不要解构空值
        "no-eval": "error",                                                         // 不要使用 eval()
        "no-ex-assign": "error",                                                    // catch 中不要对错误重新赋值
        "no-extend-native": "error",                                                // 不要扩展原生对象
        "no-extra-bind": "error",                                                   // 避免多余的函数上下文绑定
        "no-extra-boolean-cast": "error",                                           // 避免不必要的布尔转换
        // "no-extra-parens": "error",                                                 // 不要使用多余的括号包裹函数
        "no-fallthrough": "error",                                                  // switch 一定要使用 break 来将条件分支正常中断
        "no-floating-decimal": "error",                                             // 不要省去小数点前面的0
        "no-func-assign": "error",                                                  // 避免对声明过的函数重新赋值
        "no-global-assign": "error",                                                // 不要对全局只读对象重新赋值
        "no-implied-eval": "error",                                                 // 注意隐式的 eval()
        "no-inner-declarations": "error",                                           // 嵌套的代码块中禁止再定义函数
        "no-invalid-regexp": "error",                                               // 不要向 RegExp 构造器传入非法的正则表达式
        "no-irregular-whitespace": "error",                                         // 不要使用非法的空白符
        "no-iterator": "error",                                                     // 禁止使用 __iterator__
        "no-label-var": "error",                                                    // 外部变量不要与对象属性重名
        "no-labels": "error",                                                       // 不要使用标签语句
        "no-lone-blocks": "error",                                                  // 不要书写不必要的嵌套代码块
        "no-mixed-spaces-and-tabs": "error",                                        // 不要混合使用空格与制表符作为缩进
        // "no-multi-spaces": "error",                                                 // 除了缩进,不要使用多个空格
        "no-multi-str": "error",                                                    // 不要使用多行字符串
        "no-new": "error",                                                          // new 创建对象实例后需要赋值给变量
        "no-new-func": "error",                                                     // 禁止使用 Function 构造器
        "no-new-object": "error",                                                   // 禁止使用 Object 构造器
        "no-new-require": "error",                                                  // 禁止使用 new require
        "no-new-symbol": "error",                                                   // 禁止使用 Symbol 构造器
        "no-new-wrappers": "error",                                                 // 禁止使用原始包装器
        "no-obj-calls": "error",                                                    // 不要将全局对象的属性作为函数调用
        "no-octal": "error",                                                        // 不要使用八进制字面量
        "no-octal-escape": "error",                                                 // 字符串字面量中也不要使用八进制转义字符
        "no-path-concat": "error",                                                  // 使用 __dirname 和 __filename 时尽量避免使用字符串拼接
        "no-proto": "error",                                                        // 使用 getPrototypeOf 来替代 __proto__
        "no-redeclare": "error",                                                    // 不要重复声明变量
        "no-regex-spaces": "error",                                                 // 正则中避免使用多个空格
        "no-return-assign": "error",                                                // return 语句中的赋值必需有括号包裹
        "no-self-assign": "error",                                                  // 避免将变量赋值给自己
        "no-self-compare": "error",                                                 // 避免将变量与自己进行比较操作
        "no-sequences": "error",                                                    // 避免使用逗号操作符
        "no-shadow-restricted-names" : "error",                                     // 不要随意更改关键字的值
        "no-sparse-arrays": "error",                                                // 禁止使用稀疏数组(Sparse arrays)
        "no-tabs" : "error",                                                        // 不要使用制表符
        "no-template-curly-in-string" : "error",                                    // 正确使用 ES6 中的字符串模板
        "no-this-before-super": "error",                                            // 使用 this 前请确保 super() 已调用
        "no-throw-literal": "error",                                                // 用 throw 抛错时,抛出 Error 对象而不是字符串
        "no-trailing-spaces": "error",                                              // 行末不留空格
        "no-undef-init": "error",                                                   // 不要使用 undefined 来初始化变量
        "no-unmodified-loop-condition": "error",                                    // 循环语句中注意更新循环变量
        "no-unneeded-ternary" : "error",                                            // 如果有更好的实现,尽量不要使用三元表达式
        "no-unreachable": "error",                                                  // return,throw,continue 和 break 后不要再跟代码
        "no-unsafe-finally" : "error",                                              // finally 代码块中不要再改变程序执行流程
        "no-unsafe-negation": "error",                                              // 关系运算符的左值不要做取反操作
        "no-useless-call": "error",                                                 // 避免不必要的 .call() 和 .apply()
        "no-useless-computed-key": "error",                                         // 避免使用不必要的计算值作对象属性
        "no-useless-constructor": "error",                                          // 禁止多余的构造器
        "no-useless-escape": "error",                                               // 禁止不必要的转义
        "no-useless-rename": "error",                                               // import, export 和解构操作中,禁止赋值到同名变量
        "no-whitespace-before-property": "error",                                   // 属性前面不要加空格
        "no-with": "error",                                                         // 禁止使用 with
        "object-property-newline": "error",                                         // 对象属性换行时注意统一代码风格
        "padded-blocks": [ "error", "never" ],                                                   // 代码块中避免多余留白
        "rest-spread-spacing": "error",                                             // 展开运算符与它的表达式间不要留空白
        "semi-spacing": "error",                                                    // 遇到分号时空格要后留前不留
        "space-before-blocks": "error",                                             // 代码块首尾留空格
        "space-in-parens": "error",                                                 // 圆括号间不留空格
        "space-unary-ops": "error",                                                 // 一元运算符后面跟一个空格
        "spaced-comment": "error",                                                  // 注释首尾留空格
        "template-curly-spacing": "error",                                          // 模板字符串中变量前后不加空格
        "use-isnan": "error",                                                       // 检查 NaN 的正确姿势是使用 isNaN()
        "valid-typeof": "error",                                                    // 用合法的字符串跟 typeof 进行比较操作
        "wrap-iife": "error",                                                       // 自调用匿名函数 (IIFEs) 使用括号包裹
        "yield-star-spacing": "error",                                              // yield * 中的 * 前后都要有空格
        "yoda": "error",                                                            // 请书写优雅的条件语句(avoid Yoda conditions)
        "semi": [ "error", "never" ],                                               // 不要使用分号
        "no-unexpected-multiline": "error",                                         // 禁止使用令人困惑的多行表达式

这部分是完整的JavaScript Standard Style吗?

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.