[build] 0.5.6

This commit is contained in:
rex-zsd 2019-02-28 10:30:31 +08:00
parent e73e007673
commit 1aba12d4b3
5 changed files with 26 additions and 15 deletions

7
dist/area/index.js vendored
View File

@ -138,6 +138,8 @@ VantComponent({
return 0; return 0;
}, },
setValues: function setValues() { setValues: function setValues() {
var _this2 = this;
var county = this.getConfig('county'); var county = this.getConfig('county');
var code = this.code || Object.keys(county)[0] || ''; var code = this.code || Object.keys(county)[0] || '';
var province = this.getList('province'); var province = this.getList('province');
@ -158,8 +160,9 @@ VantComponent({
} }
stack.push(picker.setColumnValues(2, this.getList('county', code.slice(0, 4)), false)); stack.push(picker.setColumnValues(2, this.getList('county', code.slice(0, 4)), false));
stack.push(picker.setIndexes([this.getIndex('province', code), this.getIndex('city', code), this.getIndex('county', code)])); return Promise.all(stack).then(function () {
return Promise.all(stack).catch(function () {}); return picker.setIndexes([_this2.getIndex('province', code), _this2.getIndex('city', code), _this2.getIndex('county', code)]);
}).catch(function () {});
}, },
getValues: function getValues() { getValues: function getValues() {
var picker = this.getPicker(); var picker = this.getPicker();

View File

@ -19,6 +19,10 @@ VantComponent({
size: { size: {
type: String, type: String,
value: 'normal' value: 'normal'
},
loadingSize: {
type: String,
value: '20px'
} }
}, },
methods: { methods: {

View File

@ -3,7 +3,6 @@
<button <button
id="{{ id }}" id="{{ id }}"
class="custom-class {{ utils.bem('button', [type, size, { block, round, plain, square, loading, disabled, unclickable: disabled || loading }]) }}" class="custom-class {{ utils.bem('button', [type, size, { block, round, plain, square, loading, disabled, unclickable: disabled || loading }]) }}"
open-type="{{ openType }}" open-type="{{ openType }}"
hover-class="van-button--active hover-class" hover-class="van-button--active hover-class"
lang="{{ lang }}" lang="{{ lang }}"
@ -15,7 +14,6 @@
show-message-card="{{ showMessageCard }}" show-message-card="{{ showMessageCard }}"
app-parameter="{{ appParameter }}" app-parameter="{{ appParameter }}"
aria-label="{{ ariaLabel }}" aria-label="{{ ariaLabel }}"
bindtap="onClick" bindtap="onClick"
bindgetuserinfo="bindGetUserInfo" bindgetuserinfo="bindGetUserInfo"
bindcontact="bindContact" bindcontact="bindContact"
@ -27,7 +25,7 @@
<block wx:if="{{ loading }}"> <block wx:if="{{ loading }}">
<van-loading <van-loading
custom-class="loading-class" custom-class="loading-class"
size="{{ size === 'mini' ? '14px' : '20px' }}" size="{{ loadingSize }}"
color="{{ type === 'default' ? '#c9c9c9' : '' }}" color="{{ type === 'default' ? '#c9c9c9' : '' }}"
/> />
<view <view

17
dist/stepper/index.js vendored
View File

@ -50,10 +50,20 @@ VantComponent({
}); });
}, },
methods: { methods: {
onFocus: function onFocus() { onClickWrapper: function onClickWrapper() {
if (!this.data.focus) {
this.setData({ this.setData({
focus: true focus: true
}); });
}
},
onFocus: function onFocus(event) {
this.$emit('focus', event.detail);
},
onBlur: function onBlur(event) {
var value = this.range(this.data.value);
this.triggerInput(value);
this.$emit('blur', event.detail);
}, },
// limit value range // limit value range
range: function range(value) { range: function range(value) {
@ -77,11 +87,6 @@ VantComponent({
this.triggerInput(this.range(value)); this.triggerInput(this.range(value));
this.$emit(type); this.$emit(type);
}, },
onBlur: function onBlur(event) {
var value = this.range(this.data.value);
this.triggerInput(value);
this.$emit('blur', event);
},
onMinus: function onMinus() { onMinus: function onMinus() {
this.onChange('minus'); this.onChange('minus');
}, },

View File

@ -5,7 +5,7 @@
hover-stay-time="70" hover-stay-time="70"
bind:tap="onMinus" bind:tap="onMinus"
/> />
<view class="input-class van-stepper__input-wrapper {{ disabled || disableInput ? 'van-stepper__input-wrapper--disabled' : '' }}" bindtap="onFocus"> <view class="input-class van-stepper__input-wrapper {{ disabled || disableInput ? 'van-stepper__input-wrapper--disabled' : '' }}" bindtap="onClickWrapper">
<input <input
type="{{ integer ? 'number' : 'digit' }}" type="{{ integer ? 'number' : 'digit' }}"
class="van-stepper__input" class="van-stepper__input"
@ -13,6 +13,7 @@
focus="{{ focus }}" focus="{{ focus }}"
disabled="{{ disabled || disableInput }}" disabled="{{ disabled || disableInput }}"
bindinput="onInput" bindinput="onInput"
bind:focus="onFocus"
bind:blur="onBlur" bind:blur="onBlur"
/> />
</view> </view>