Skip to content

Commit f7d7014

Browse files
committed
添加uiw组件库
1 parent 2928c35 commit f7d7014

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"react-router": "^4.2.0",
2222
"react-router-dom": "^4.2.2",
2323
"redux": "^3.7.2",
24-
"redux-thunk": "^2.2.0"
24+
"redux-thunk": "^2.2.0",
25+
"uiw": "^1.6.2"
2526
},
2627
"devDependencies": {
2728
"babel": "^6.23.0",
@@ -48,6 +49,8 @@
4849
"extract-text-webpack-plugin": "^3.0.2",
4950
"file-loader": "^1.1.6",
5051
"html-webpack-plugin": "^2.30.1",
52+
"less": "^2.7.3",
53+
"less-loader": "^4.0.5",
5154
"node-sass": "^4.7.2",
5255
"pm2": "^2.9.1",
5356
"react-transform-hmr": "^1.0.4",

src/modules/home/home/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React from 'react'
22
import { connect } from 'react-redux'
33
import propTypes from 'prop-types'
44
import { bindActionCreators } from 'redux'
5+
import { Button } from 'uiw'
56
import * as action from './redux/action'
67
import './redux/reducer'
78
class Home extends React.Component {
@@ -32,9 +33,9 @@ class Home extends React.Component {
3233
<div>
3334
home<br /><br />
3435
<h1>{this.state.count}</h1>
35-
<button onClick={this.add}>+</button><br /><br />
36-
<button onClick={this.decrease}>-</button><br /><br />
37-
<button onClick={this.asyncAction}>-</button><br /><br />
36+
<Button type="primary" onClick={this.add}>+</Button><br /><br />
37+
<Button type="primary" onClick={this.decrease}>-</Button><br /><br />
38+
<Button type="primary" onClick={this.asyncAction}>-</Button><br /><br />
3839
{this.state.dataone ? this.state.dataone.companyName : ''}<br /><br />
3940
{this.state.dataone ? this.state.dataone.identifyNo : ''}<br /><br />
4041
{this.state.dataone ? this.state.dataone.isCfcaUser : ''}<br /><br />

webpack.config.dev.babel.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ module.exports = {
2828
exclude: /node_modules/,
2929
loader: 'eslint-loader'
3030
},
31+
{
32+
test: /\.(less|css)$/,
33+
use: extractSass.extract({
34+
use: ['style-loader', 'css-loader', 'less-loader']
35+
})
36+
},
3137
{
3238
test: /\.js$/,
3339
exclude: /(node_modules|bower_components)/,

0 commit comments

Comments
 (0)