New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature raxui #149
Feature raxui #149
Conversation
packages/rax-calendar/package.json
Outdated
"rax-text": "^0.2.2", | ||
"rax-scrollview": "^0.2.2", | ||
"rax-touchable": "^0.2.2", | ||
"moment": "~2.13.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
统一使用 moment ^2.13.0
|
||
import Day from './Day'; | ||
|
||
import moment from 'moment/min/moment.min'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
依赖改为 import moment from 'moment';
packages/rax-calendar/src/Day.js
Outdated
@@ -0,0 +1,91 @@ | |||
import {createElement, Component, PropTypes} from 'rax'; | |||
import View from '@ali/rax-view'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
去掉 @ali
packages/rax-calendar/src/index.js
Outdated
@@ -0,0 +1,2 @@ | |||
import Index from './Calendar'; | |||
export default Index; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
把 Calendar 文件命名为 index
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
删除当前文件
packages/rax-calendar/src/styles.js
Outdated
width: DEVICE_WIDTH, | ||
}, | ||
monthHeading: { | ||
padding: '10rem', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
所有单位用 number 格式,比如:padding: '10rem' 改为 padding: 10
null | ||
} | ||
<Text style={timeStyle}> | ||
{'' + displayFirstNum} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{'' + displayFirstNum} 可以简化为 {displayFirstNum}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
此处有一个本周发现的 weex 上渲染问题,数字类型 0 会重复渲染出一层 text 标签,我这边在定位
packages/rax-countdown/src/index.js
Outdated
formatFunc: PropTypes.func, | ||
onTick: PropTypes.func, | ||
onComplete: PropTypes.func, | ||
tpl: PropTypes.string, // 倒计时展示模板 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
中文注释改为英文
packages/rax-gotop/src/index.js
Outdated
let scroll; | ||
|
||
if (!isWeex) { | ||
var raf = window.requestAnimationFrame || window.webkitRequestAnimationFrame || function(c) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没有用到 raf ?
packages/rax-gotop/src/index.js
Outdated
bottom = props.bottom || 125; | ||
|
||
if (isWeex) { | ||
bottom += 'rem'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rem 可以省略
packages/rax-gotop/src/index.js
Outdated
}; | ||
|
||
GoTop.defaultProps = { | ||
name: '顶部', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
使用英文
packages/rax-gotop/src/index.js
Outdated
|
||
GoTop.defaultProps = { | ||
name: '顶部', | ||
icon: 'https://gw.alicdn.com/tps/TB1UhIvLXXXXXaRXpXXXXXXXXXX-60-66.png', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
默认图片使用 base64 图片
packages/rax-grid/src/Col.js
Outdated
@@ -0,0 +1,44 @@ | |||
import {Component, createElement} from 'rax'; | |||
|
|||
let defaultWidth = window.screen.width; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
weex 下 window.screen.width 是屏幕真实像素宽度,是不是用错了这里
packages/rax-grid/src/Col.js
Outdated
<div {...this.props} style={style} /> | ||
); | ||
} else { | ||
// 如果仅有一个 child 则返回 child 标签 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
使用英文注释
packages/rax-grid/src/Col.js
Outdated
const styles = { | ||
initial: { | ||
'flex': 1, | ||
'width': '1%', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
% 单位 weex 不支持
packages/rax-grid/src/MultiRow.js
Outdated
colStyle: {}, | ||
gridStyle: {}, | ||
list: [], | ||
temp: function() {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
重新命名 temp
packages/rax-tabheader/src/style.js
Outdated
}, | ||
|
||
iconContainer: { | ||
// 'display':'flex', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
移除注释
import Text from 'rax-text'; | ||
import Image from 'rax-image'; | ||
|
||
class Icon extends Component { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rax-icon 的实现有些问题,每次都需要重复传fontFamily与source,导致使用起来变扭
packages/rax-grid/src/Grid.js
Outdated
}; | ||
|
||
return ( | ||
<div {...this.props} style={style} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
依赖 View 是不是更好?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed
Before submitting a pull request, please make sure the following is done...
master
.npm test
).npm run lint
) - we've done our best to make sure these rules match our internal linting guidelines.