mirror of
https://github.com/zuiidea/antd-admin
synced 2026-10-31 22:53:47 +00:00
admin-demo
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link rel="stylesheet" type="text/css" href="../common.css"/>
|
||||
<!--[if lt IE 10]>
|
||||
<script src="https://as.alipayobjects.com/g/component/??console-polyfill/0.2.2/index.js,es5-shim/4.1.14/es5-shim.min.js,es5-shim/4.1.14/es5-sham.min.js,html5shiv/3.7.2/html5shiv.min.js,media-match/2.0.2/media.match.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<div id="react-content">
|
||||
|
||||
</div>
|
||||
</body>
|
||||
<script src="../common.js"></script>
|
||||
<script src="../index.js"></script>
|
||||
</html>
|
||||
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link rel="stylesheet" type="text/css" href="../common.css"/>
|
||||
<!--[if lt IE 10]>
|
||||
<script src="https://as.alipayobjects.com/g/component/??console-polyfill/0.2.2/index.js,es5-shim/4.1.14/es5-shim.min.js,es5-shim/4.1.14/es5-sham.min.js,html5shiv/3.7.2/html5shiv.min.js,media-match/2.0.2/media.match.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<div id="react-content">
|
||||
|
||||
</div>
|
||||
</body>
|
||||
<script src="../common.js"></script>
|
||||
<script src="../dist/admin/user.js"></script>
|
||||
</html>
|
||||
+5
-2
@@ -3,13 +3,16 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link rel="stylesheet" type="text/css" href="./index.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="./common.css"/>
|
||||
<!--[if lt IE 10]>
|
||||
<script src="https://as.alipayobjects.com/g/component/??console-polyfill/0.2.2/index.js,es5-shim/4.1.14/es5-shim.min.js,es5-shim/4.1.14/es5-sham.min.js,html5shiv/3.7.2/html5shiv.min.js,media-match/2.0.2/media.match.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<div id="react-content"></div>
|
||||
<div id="react-content">
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
<script src="./common.js"></script>
|
||||
<script src="./index.js"></script>
|
||||
|
||||
+10
-2
@@ -2,8 +2,15 @@
|
||||
"name": "antd-demo",
|
||||
"version": "1.0.0",
|
||||
"entry": {
|
||||
"index": "./src/entry/index.jsx"
|
||||
"index": "./src/entry/index.jsx",
|
||||
"admin/index": ["./src/entry/admin/index.jsx"],
|
||||
"admin/user": ["./src/entry/admin/user.jsx"]
|
||||
},
|
||||
"output": {
|
||||
"path": "dist",
|
||||
"filename": "index_bundle.js"
|
||||
},
|
||||
"plugins": "[new HtmlWebpackPlugin()]",
|
||||
"dependencies": {
|
||||
"antd": "0.11.x",
|
||||
"atool-build": "0.4.x",
|
||||
@@ -20,6 +27,7 @@
|
||||
"eslint": "~1.10.3",
|
||||
"eslint-config-airbnb": "~2.1.0",
|
||||
"eslint-plugin-react": "~3.11.3",
|
||||
"html-webpack-plugin": "^2.7.2",
|
||||
"pre-commit": "1.x"
|
||||
},
|
||||
"pre-commit": [
|
||||
@@ -28,6 +36,6 @@
|
||||
"scripts": {
|
||||
"dev": "dora -p 8001 --plugins atool-build,proxy,hmr",
|
||||
"lint": "eslint --ext .js,.jsx src",
|
||||
"build": "atool-build -o ./dist/${npm_package_family}/${npm_package_name/{npm_package_version}"
|
||||
"build": "atool-build -o ./dist"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link rel="stylesheet" type="text/css" href="../dist/common.css"/>
|
||||
<!--[if lt IE 10]>
|
||||
<script src="https://as.alipayobjects.com/g/component/??console-polyfill/0.2.2/index.js,es5-shim/4.1.14/es5-shim.min.js,es5-shim/4.1.14/es5-sham.min.js,html5shiv/3.7.2/html5shiv.min.js,media-match/2.0.2/media.match.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<div id="react-content">
|
||||
|
||||
</div>
|
||||
</body>
|
||||
<script src="../dist/common.js"></script>
|
||||
<script src="../dist/admin/index.js"></script>
|
||||
</html>
|
||||
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link rel="stylesheet" type="text/css" href="../dist/common.css"/>
|
||||
<!--[if lt IE 10]>
|
||||
<script src="https://as.alipayobjects.com/g/component/??console-polyfill/0.2.2/index.js,es5-shim/4.1.14/es5-shim.min.js,es5-shim/4.1.14/es5-sham.min.js,html5shiv/3.7.2/html5shiv.min.js,media-match/2.0.2/media.match.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<div id="react-content">
|
||||
|
||||
</div>
|
||||
</body>
|
||||
<script src="../dist/common.js"></script>
|
||||
<script src="../dist/admin/user.js"></script>
|
||||
</html>
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { DatePicker, message } from 'antd';
|
||||
import { DatePicker , message , Button , Menu, Dropdown, Icon } from 'antd';
|
||||
|
||||
const App = React.createClass({
|
||||
getInitialState() {
|
||||
@@ -21,4 +21,4 @@ const App = React.createClass({
|
||||
}
|
||||
});
|
||||
|
||||
export default App;
|
||||
export default App;
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
import '../../common/lib';
|
||||
import { Button ,Switch ,Icon} from 'antd';
|
||||
import ReactDOM from 'react-dom';
|
||||
import React from 'react';
|
||||
|
||||
function onChange(checked){
|
||||
console.log('switch to ' + checked);
|
||||
}
|
||||
|
||||
ReactDOM.render(<div><Button type="ghost">后台首页</Button>
|
||||
<Switch checkedChildren={<Icon type="check" />} unCheckedChildren={<Icon type="cross" />} />
|
||||
<Switch defaultChecked={false} onChange={onChange} /></div>, document.getElementById('react-content'));
|
||||
@@ -0,0 +1,12 @@
|
||||
import '../../common/lib';
|
||||
import { Button ,Switch ,Icon} from 'antd';
|
||||
import ReactDOM from 'react-dom';
|
||||
import React from 'react';
|
||||
|
||||
function onChange(checked){
|
||||
console.log('switch to ' + checked);
|
||||
}
|
||||
|
||||
ReactDOM.render(<div><Button type="ghost">用户</Button>
|
||||
<Switch checkedChildren={<Icon type="check" />} unCheckedChildren={<Icon type="cross" />} />
|
||||
<Switch defaultChecked={false} onChange={onChange} /></div>, document.getElementById('react-content'));
|
||||
@@ -1,4 +1,10 @@
|
||||
// require('./admin/index.html');
|
||||
|
||||
module.exports = function(webpackConfig) {
|
||||
webpackConfig.module.loaders.push({
|
||||
test: /\.html$/,
|
||||
loader: 'file?name=[name].[ext]'
|
||||
});
|
||||
webpackConfig.module.loaders.forEach(function(loader) {
|
||||
if (loader.loader === 'babel') {
|
||||
// https://github.com/ant-design/babel-plugin-antd
|
||||
|
||||
Reference in New Issue
Block a user