Skip to content

Commit b19c721

Browse files
feat: release v3.0.16
1 parent 505ed24 commit b19c721

55 files changed

Lines changed: 233 additions & 98 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## v3.0.16 (2017-12-22)
2+
3+
### New Features
4+
* `PopupPicker``PopupDateTimePicker` 组件增加 `onSelect` 属性。
5+
16
## v3.0.15 (2017-12-15)
27

38
### Bug Fixes

component_dev/popupdatetimepicker/demo/demo.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<meta charset="UTF-8">
55
<title>PopupDateTimePicker Demo</title>
66
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
7+
<link rel="stylesheet" href="../../../prd/component_dev/popupdatetimepicker/demo/demo.css" />
78
<style>
89
.op0_6 {
910
opacity: .6;

component_dev/popupdatetimepicker/demo/demo.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ class PopupDateTimePickerDemo extends Component {
1111
}
1212

1313
handleChange(value) {
14+
console.log('onChange', value);
1415
this.setState({ value });
1516
}
1617

@@ -38,9 +39,10 @@ class PopupDateTimePickerDemo extends Component {
3839
value={this.state.value}
3940
beforePopupShow={() => {
4041
console.log('beforePopupShow');
41-
return false;
42+
// return false;
4243
}}
4344
onChange={this.handleChange.bind(this)}
45+
onSelect={(value) => console.log(value)}
4446
duration={200}
4547
pickerHeight={150}
4648
loop={[false, true, true]}

component_dev/popupdatetimepicker/src/popupdatetimepicker.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ const propTypes = {
4848
* @description 弹出式选择器 Ok 按钮点击后的回调,必须。
4949
*/
5050
onChange: PropTypes.func.isRequired,
51+
/**
52+
* @property onSelect
53+
* @type Function
54+
* @param value 当前的 option 的 value,如果开启了多列模式,那么返回值将是一个包含了每一列value的数组。
55+
* @version 3.0.16
56+
* @description 当选择器选择值发生改变时的回调。
57+
*/
58+
onSelect: PropTypes.func,
5159
/**
5260
* @property popupHeader
5361
* @type Object
@@ -143,8 +151,8 @@ const defaultProps = {
143151
okBtn: { text: '确定', touchClass: 'action-touch' },
144152
cancelBtn: { text: '取消', touchClass: 'action-touch' }
145153
},
146-
onChange: () => {
147-
},
154+
onChange: () => {},
155+
onSelect: () => {},
148156
pickerHeight: 150,
149157
duration: 200,
150158
loop: [true, true, true],
@@ -269,9 +277,11 @@ class PopupDateTimePicker extends Component {
269277
}
270278

271279
handlePickerChange(value) {
280+
const { onSelect } = this.props;
272281
this.setState({
273282
pickerValue: value
274283
});
284+
onSelect && isFunction(onSelect) && onSelect(this.state.pickerValue);
275285
}
276286

277287
renderPicker() {

component_dev/popuppicker/demo/demo.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<meta charset="UTF-8">
55
<title>PopupPicker Demo</title>
66
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
7+
<link rel="stylesheet" href="../../../prd/component_dev/popuppicker/demo/demo.css" />
78
<style>
89
.op0_6 {
910
opacity: .6;

component_dev/popuppicker/demo/demo.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ class PopupPickerDemo extends Component {
2626
}
2727

2828
handleChange(value) {
29+
// 你接收到的value将会是一个数组,包含了每一列picker的值
30+
console.log('onChange', value);
2931
this.setState({ value });
3032
}
3133

@@ -51,13 +53,11 @@ class PopupPickerDemo extends Component {
5153
this.popupPickerComponent = component;
5254
}}
5355
value={this.state.value}
54-
onChange={(value) => {
55-
// 你接收到的value将会是一个数组,包含了每一列picker的值
56-
this.setState({ value });
57-
}}
56+
onChange={this.handleChange.bind(this)}
57+
onSelect={(value) => console.log(value)}
5858
beforePopupShow={() => {
5959
Toast.show('before popup show');
60-
return false;
60+
// return false;
6161
}}
6262
duration={200}
6363
options={options}

component_dev/popuppicker/src/popuppicker.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ const propTypes = {
4646
* @description 弹出式选择器 Ok 按钮点击后的回调,必须。
4747
*/
4848
onChange: PropTypes.func.isRequired,
49+
/**
50+
* @property onSelect
51+
* @type Function
52+
* @param value 当前的 option 的 value,如果开启了多列模式,那么返回值将是一个包含了每一列value的数组。
53+
* @version 3.0.16
54+
* @description 当选择器选择值发生改变时的回调。
55+
*/
56+
onSelect: PropTypes.func,
4957
/**
5058
* @property options
5159
* @type Array/Array <Array>
@@ -174,8 +182,8 @@ const defaultProps = {
174182
okBtn: { text: '确定', touchClass: 'action-touch' },
175183
cancelBtn: { text: '取消', touchClass: 'action-touch' }
176184
},
177-
onChange: () => {
178-
},
185+
onChange: () => {},
186+
onSelect: () => {},
179187
pickerHeight: 150,
180188
duration: 200,
181189
looped: true,
@@ -324,9 +332,11 @@ class PopupPicker extends Component {
324332
}
325333

326334
handlePickerChange(option, i) {
335+
const { onSelect } = this.props;
327336
this.setState({
328337
pickerValue: this.getOnChangeValue(option.value, i)
329338
});
339+
onSelect && isFunction(onSelect) && onSelect(this.state.pickerValue.length > 1 ? this.state.pickerValue : this.state.pickerValue[0]);
330340
}
331341

332342
renderPicker() {

doc/animate.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<header class="ydoc-header">
2525
<div class="ydoc-header-area">
2626

27-
<a href="http://ued.qunar.com/ymfe/" class="navbar-brand">YMFE</a>
27+
<a href="https://ymfe.org/" class="navbar-brand">YMFE</a>
2828

2929
<button class="ydocIcon navbar-toggle">&#xf020;</button>
3030
<nav class="ydoc-nav">

doc/changelog.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<header class="ydoc-header">
2525
<div class="ydoc-header-area">
2626

27-
<a href="http://ued.qunar.com/ymfe/" class="navbar-brand">YMFE</a>
27+
<a href="https://ymfe.org/" class="navbar-brand">YMFE</a>
2828

2929
<button class="ydocIcon navbar-toggle">&#xf020;</button>
3030
<nav class="ydoc-nav">
@@ -99,7 +99,9 @@ <h1 >版本</h1>
9999
<div class="ydoc-container-content " id="readme">
100100

101101
<article class="markdown-body">
102-
<h2 class="subject" id="v3.0.15__2017-12-15_">v3.0.15 (2017-12-15) <a class="hashlink" href="#v3.0.15__2017-12-15_">#</a></h2><h3 class="subject" id="Bug_Fixes">Bug Fixes <a class="hashlink" href="#Bug_Fixes">#</a></h3><ul>
102+
<h2 class="subject" id="v3.0.16__2017-12-22_">v3.0.16 (2017-12-22) <a class="hashlink" href="#v3.0.16__2017-12-22_">#</a></h2><h3 class="subject" id="New_Features">New Features <a class="hashlink" href="#New_Features">#</a></h3><ul>
103+
<li><code>PopupPicker</code><code>PopupDateTimePicker</code> 组件增加 <code>onSelect</code> 属性。</li></ul>
104+
<h2 class="subject" id="v3.0.15__2017-12-15_">v3.0.15 (2017-12-15) <a class="hashlink" href="#v3.0.15__2017-12-15_">#</a></h2><h3 class="subject" id="Bug_Fixes">Bug Fixes <a class="hashlink" href="#Bug_Fixes">#</a></h3><ul>
103105
<li>修复自定义样式目录中有多层目录时 <code>post install</code> 脚本报错的问题。</li></ul>
104106
<h3 class="subject" id="New_Features">New Features <a class="hashlink" href="#New_Features">#</a></h3><ul>
105107
<li><code>Alert</code><code>Confirm</code> 组件增加 <code>extraClass</code> 属性,<code>content</code> 属性支持传入 jsx。</li></ul>

doc/component-ActionSheet.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<header class="ydoc-header">
2525
<div class="ydoc-header-area">
2626

27-
<a href="http://ued.qunar.com/ymfe/" class="navbar-brand">YMFE</a>
27+
<a href="https://ymfe.org/" class="navbar-brand">YMFE</a>
2828

2929
<button class="ydocIcon navbar-toggle">&#xf020;</button>
3030
<nav class="ydoc-nav">
@@ -344,7 +344,7 @@ <h4 id="-">引用方式</h4>
344344
</div>
345345

346346
<div class="instructions-con-runner">
347-
<iframe class="instructions-iframe" src="http://ued.qunar.com/hy2/yo/demo/src/html/component/actionsheet.html?hideIcon"></iframe>
347+
<iframe class="instructions-iframe" src="//ued.qunar.com/hy2/yo/demo/src/html/component/actionsheet.html?hideIcon"></iframe>
348348
</div>
349349

350350
</div>

0 commit comments

Comments
 (0)