Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# 忽略目录 | ||
build/ | ||
tests/ | ||
demo/ | ||
|
||
# node 覆盖率文件 | ||
coverage/ | ||
|
||
# 忽略文件 | ||
**/*-min.js | ||
**/*.min.js |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{ | ||
"root": true, | ||
"parser": "babel-eslint", | ||
"extends": "eslint-config-airbnb", | ||
"parserOptions": { | ||
"ecmaVersion": 6, | ||
"ecmaFeatures": { | ||
"jsx": true, | ||
"experimentalObjectRestSpread": true | ||
} | ||
}, | ||
"env": { | ||
"browser": true, | ||
"mocha": true | ||
}, | ||
"plugins": ["react", "babel"], | ||
"rules": { | ||
"react/prefer-stateless-function": 0, | ||
"no-console": 0, | ||
"jsx-a11y/label-has-for": 0, | ||
"jsx-a11y/no-static-element-interactions": 0, | ||
"jsx-a11y/anchor-has-content": 0, | ||
"jsx-a11y/click-events-have-key-events": 0, | ||
"jsx-a11y/anchor-is-valid": 0, | ||
"react/no-array-index-key": 0, | ||
"func-names": 0, | ||
"arrow-body-style": 0, | ||
"no-use-before-define": 0, | ||
"react/sort-comp": 0, | ||
"react/prop-types": 0, | ||
"react/jsx-first-prop-new-line": 0, | ||
"react/jsx-filename-extension": [ | ||
1, | ||
{ | ||
"extensions": [".js", ".jsx"] | ||
} | ||
], | ||
"import/extensions": 0, | ||
"import/no-unresolved": 0, | ||
"import/no-extraneous-dependencies": 0, | ||
"prefer-destructuring": 0, | ||
"no-param-reassign": 0, | ||
"no-return-assign": 0, | ||
"max-len": 0, | ||
"consistent-return": 0, | ||
"no-redeclare": 0, | ||
"react/require-extension": 0, | ||
"react/no-danger": 0, | ||
"comma-dangle": ["error", "always-multiline"], | ||
"function-paren-newline": 0, | ||
"object-curly-newline": 0, | ||
"no-restricted-globals": 0, | ||
"react/jsx-no-bind": 0, | ||
"no-mixed-operators": 0, | ||
"import/prefer-default-export": 0, | ||
"arrow-parens": 0, | ||
"global-require": 0, | ||
"react/forbid-prop-types": 0, | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# See https://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
|
||
# production | ||
/build | ||
/dist | ||
|
||
# misc | ||
.idea/ | ||
.happypack | ||
.DS_Store | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
|
||
import React, { Component } from 'react'; | ||
import { Switch, Route } from 'react-router-dom'; | ||
import Layout from '@icedesign/layout'; | ||
import Footer from '../../components/Footer'; | ||
import routerData from '../../routerConfig'; | ||
import NotFound from '../../components/NotFound'; | ||
|
||
export default class HeaderFooterLayout extends Component { | ||
static propTypes = {}; | ||
|
||
static defaultProps = {}; | ||
|
||
render() { | ||
return ( | ||
<Layout style={styles.container}> | ||
<Switch> | ||
{routerData.map((item, index) => { | ||
return item.component ? ( | ||
<Route | ||
key={index} | ||
path={item.path} | ||
component={item.component} | ||
/> | ||
) : null; | ||
})} | ||
|
||
{/* 未匹配到的路由重定向到 NotFound */} | ||
<Route component={NotFound} /> | ||
</Switch> | ||
<Footer /> | ||
</Layout> | ||
); | ||
} | ||
} | ||
|
||
const styles = { | ||
container: { | ||
minWidth: '1200px', | ||
background: '#fff', | ||
}, | ||
}; |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.