Skip to content

Commit

Permalink
统计组件完成
Browse files Browse the repository at this point in the history
  • Loading branch information
tywei90 committed Nov 29, 2017
1 parent 11a2772 commit 137fbf7
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/units/statistic/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# statistic构件单元组件
---
43 changes: 43 additions & 0 deletions src/components/units/statistic/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import React, { PropTypes } from 'react';
import autoBind from 'autobind-decorator';
import pureRender from 'pure-render-decorator';
import ImmutablePropTypes from 'react-immutable-proptypes';
import immutable from 'immutable';

import './index.scss';

import unitAction from '../../../action/unit';
import UnitPanel from '../panel/index';

@pureRender
class UnitStatistic extends React.Component {
static propTypes = {
data: ImmutablePropTypes.map,
id: PropTypes.number
};
constructor(props){
super(props);
}
render() {
const { data, id } = this.props;
return (
<UnitPanel id={id} type={data.get('type').toLowerCase()} unitName={data.get('name')}>
<ul>
<li className="f-cb">
<label className="f-fl">百度统计id</label>
<input
className="f-fr"
type="text"
placeholder="铺码标识,就是hm.js?后面那串字符串"
value={data.get('id')}
ref="text"
onChange={()=>unitAction.editUnit(id, 'id', this.refs.text.value)}
/>
</li>
</ul>
</UnitPanel>
);
}
}

export default UnitStatistic;
5 changes: 5 additions & 0 deletions src/components/units/statistic/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#app .unit-statistic{
.show-detail{
height: 80px;
}
}

0 comments on commit 137fbf7

Please sign in to comment.