mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-05-22 14:39:16 +08:00
[build] 0.5.4
This commit is contained in:
parent
84f73456fc
commit
7517cebe29
2
dist/action-sheet/index.wxss
vendored
2
dist/action-sheet/index.wxss
vendored
@ -1 +1 @@
|
|||||||
@import '../common/index.wxss';.van-action-sheet{max-height:90%!important;color:#333}.van-action-sheet__cancel{height:60px}.van-action-sheet__cancel::before{display:block;height:10px;background-color:#f8f8f8;content:' '}.van-action-sheet__cancel,.van-action-sheet__item{height:50px;font-size:16px;line-height:50px;text-align:center;background-color:#fff}.van-action-sheet__cancel--hover,.van-action-sheet__item--hover{background-color:#e8e8e8}.van-action-sheet__item--disabled{color:#c9c9c9}.van-action-sheet__item--disabled.van-action-sheet__item--hover{background-color:#fff}.van-action-sheet__subname{margin-left:5px;font-size:12px;color:#7d7e80}.van-action-sheet__header{font-size:16px;font-weight:500;line-height:44px;text-align:center}.van-action-sheet__close{position:absolute!important;top:0;right:0;padding:0 15px;font-size:18px!important;line-height:inherit!important;color:#999}
|
@import '../common/index.wxss';.van-action-sheet{max-height:90%!important;color:#333}.van-action-sheet__cancel,.van-action-sheet__item{height:50px;font-size:16px;line-height:50px;text-align:center;background-color:#fff}.van-action-sheet__cancel--hover,.van-action-sheet__item--hover{background-color:#e8e8e8}.van-action-sheet__cancel{height:60px}.van-action-sheet__cancel::before{display:block;height:10px;background-color:#f8f8f8;content:' '}.van-action-sheet__item--disabled{color:#c9c9c9}.van-action-sheet__item--disabled.van-action-sheet__item--hover{background-color:#fff}.van-action-sheet__subname{margin-left:5px;font-size:12px;color:#7d7e80}.van-action-sheet__header{font-size:16px;font-weight:500;line-height:44px;text-align:center}.van-action-sheet__close{position:absolute!important;top:0;right:0;padding:0 15px;font-size:18px!important;line-height:inherit!important;color:#999}
|
15
dist/area/index.js
vendored
15
dist/area/index.js
vendored
@ -5,6 +5,8 @@ VantComponent({
|
|||||||
title: String,
|
title: String,
|
||||||
value: String,
|
value: String,
|
||||||
loading: Boolean,
|
loading: Boolean,
|
||||||
|
cancelButtonText: String,
|
||||||
|
confirmButtonText: String,
|
||||||
itemHeight: {
|
itemHeight: {
|
||||||
type: Number,
|
type: Number,
|
||||||
value: 44
|
value: 44
|
||||||
@ -136,8 +138,6 @@ 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');
|
||||||
@ -149,18 +149,17 @@ VantComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
var stack = [];
|
var stack = [];
|
||||||
stack.push(picker.setColumnValues(0, province));
|
stack.push(picker.setColumnValues(0, province, false));
|
||||||
stack.push(picker.setColumnValues(1, city));
|
stack.push(picker.setColumnValues(1, city, false));
|
||||||
|
|
||||||
if (city.length && code.slice(2, 4) === '00') {
|
if (city.length && code.slice(2, 4) === '00') {
|
||||||
;
|
;
|
||||||
code = city[0].code;
|
code = city[0].code;
|
||||||
}
|
}
|
||||||
|
|
||||||
stack.push(picker.setColumnValues(2, this.getList('county', code.slice(0, 4))));
|
stack.push(picker.setColumnValues(2, this.getList('county', code.slice(0, 4)), false));
|
||||||
return Promise.all(stack).then(function () {
|
stack.push(picker.setIndexes([this.getIndex('province', code), this.getIndex('city', code), this.getIndex('county', code)]));
|
||||||
return picker.setIndexes([_this2.getIndex('province', code), _this2.getIndex('city', code), _this2.getIndex('county', code)]);
|
return Promise.all(stack).catch(function () {});
|
||||||
}).catch(function () {});
|
|
||||||
},
|
},
|
||||||
getValues: function getValues() {
|
getValues: function getValues() {
|
||||||
var picker = this.getPicker();
|
var picker = this.getPicker();
|
||||||
|
2
dist/area/index.wxml
vendored
2
dist/area/index.wxml
vendored
@ -10,6 +10,8 @@
|
|||||||
columns="{{ displayColumns }}"
|
columns="{{ displayColumns }}"
|
||||||
item-height="{{ itemHeight }}"
|
item-height="{{ itemHeight }}"
|
||||||
visible-item-count="{{ visibleItemCount }}"
|
visible-item-count="{{ visibleItemCount }}"
|
||||||
|
cancel-button-text="{{ cancelButtonText }}"
|
||||||
|
confirm-button-text="{{ confirmButtonText }}"
|
||||||
bind:change="onChange"
|
bind:change="onChange"
|
||||||
bind:confirm="onConfirm"
|
bind:confirm="onConfirm"
|
||||||
bind:cancel="onCancel"
|
bind:cancel="onCancel"
|
||||||
|
1
dist/button/index.js
vendored
1
dist/button/index.js
vendored
@ -11,6 +11,7 @@ VantComponent({
|
|||||||
square: Boolean,
|
square: Boolean,
|
||||||
loading: Boolean,
|
loading: Boolean,
|
||||||
disabled: Boolean,
|
disabled: Boolean,
|
||||||
|
loadingText: String,
|
||||||
type: {
|
type: {
|
||||||
type: String,
|
type: String,
|
||||||
value: 'default'
|
value: 'default'
|
||||||
|
10
dist/button/index.wxml
vendored
10
dist/button/index.wxml
vendored
@ -7,6 +7,7 @@
|
|||||||
open-type="{{ openType }}"
|
open-type="{{ openType }}"
|
||||||
hover-class="van-button--active hover-class"
|
hover-class="van-button--active hover-class"
|
||||||
lang="{{ lang }}"
|
lang="{{ lang }}"
|
||||||
|
business-id="{{ businessId }}"
|
||||||
session-from="{{ sessionFrom }}"
|
session-from="{{ sessionFrom }}"
|
||||||
send-message-title="{{ sendMessageTitle }}"
|
send-message-title="{{ sendMessageTitle }}"
|
||||||
send-message-path="{{ sendMessagePath }}"
|
send-message-path="{{ sendMessagePath }}"
|
||||||
@ -23,11 +24,18 @@
|
|||||||
bindlaunchapp="bindLaunchApp"
|
bindlaunchapp="bindLaunchApp"
|
||||||
bindopensetting="bindOpenSetting"
|
bindopensetting="bindOpenSetting"
|
||||||
>
|
>
|
||||||
|
<block wx:if="{{ loading }}">
|
||||||
<van-loading
|
<van-loading
|
||||||
wx:if="{{ loading }}"
|
|
||||||
custom-class="loading-class"
|
custom-class="loading-class"
|
||||||
size="{{ size === 'mini' ? '14px' : '20px' }}"
|
size="{{ size === 'mini' ? '14px' : '20px' }}"
|
||||||
color="{{ type === 'default' ? '#c9c9c9' : '' }}"
|
color="{{ type === 'default' ? '#c9c9c9' : '' }}"
|
||||||
/>
|
/>
|
||||||
|
<view
|
||||||
|
wx:if="{{ loadingText }}"
|
||||||
|
class="van-button__loading-text"
|
||||||
|
>
|
||||||
|
{{ loadingText }}
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
<slot wx:else />
|
<slot wx:else />
|
||||||
</button>
|
</button>
|
||||||
|
2
dist/button/index.wxss
vendored
2
dist/button/index.wxss
vendored
@ -1 +1 @@
|
|||||||
@import '../common/index.wxss';.van-button{position:relative;display:inline-block;height:44px;padding:0;font-size:16px;line-height:42px;text-align:center;-webkit-text-size-adjust:100%;vertical-align:middle;border-radius:2px;box-sizing:border-box;-webkit-appearance:none}.van-button::after{position:absolute;top:50%;left:50%;width:100%;height:100%;background-color:#000;border:inherit;border-color:#000;border-radius:inherit;content:' ';opacity:0;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.van-button--active::after{opacity:.15}.van-button--unclickable::after{display:none}.van-button--default{color:#333;background-color:#fff;border:1px solid #eee}.van-button--primary{color:#fff;background-color:#07c160;border:1px solid #07c160}.van-button--danger{color:#fff;background-color:#f44;border:1px solid #f44}.van-button--warning{color:#fff;background-color:#ff976a;border:1px solid #ff976a}.van-button--plain{background-color:#fff}.van-button--plain.van-button--primary{color:#07c160}.van-button--plain.van-button--danger{color:#f44}.van-button--plain.van-button--warning{color:#ff976a}.van-button--large{width:100%;height:50px;line-height:48px}.van-button--normal{padding:0 15px;font-size:14px}.van-button--small{height:30px;min-width:60px;padding:0 8px;font-size:12px;line-height:28px}.van-button--mini{display:inline-block;width:50px;height:22px;font-size:10px;line-height:20px}.van-button--mini+.van-button--mini{margin-left:5px}.van-button--block{display:block;width:100%}.van-button--round{border-radius:10em}.van-button--square{border-radius:0}.van-button--disabled{opacity:.5}
|
@import '../common/index.wxss';.van-button{position:relative;display:inline-block;height:44px;padding:0;font-size:16px;line-height:42px;text-align:center;-webkit-text-size-adjust:100%;vertical-align:middle;border-radius:2px;box-sizing:border-box;-webkit-appearance:none}.van-button::after{position:absolute;top:50%;left:50%;width:100%;height:100%;background-color:#000;border:inherit;border-color:#000;border-radius:inherit;content:' ';opacity:0;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.van-button--active::after{opacity:.15}.van-button--unclickable::after{display:none}.van-button--default{color:#333;background-color:#fff;border:1px solid #eee}.van-button--primary{color:#fff;background-color:#07c160;border:1px solid #07c160}.van-button--danger{color:#fff;background-color:#f44;border:1px solid #f44}.van-button--warning{color:#fff;background-color:#ff976a;border:1px solid #ff976a}.van-button--plain{background-color:#fff}.van-button--plain.van-button--primary{color:#07c160}.van-button--plain.van-button--danger{color:#f44}.van-button--plain.van-button--warning{color:#ff976a}.van-button--large{width:100%;height:50px;line-height:48px}.van-button--normal{padding:0 15px;font-size:14px}.van-button--small{height:30px;min-width:60px;padding:0 8px;font-size:12px;line-height:28px}.van-button--mini{display:inline-block;width:50px;height:22px;font-size:10px;line-height:20px}.van-button--mini+.van-button--mini{margin-left:5px}.van-button--block{display:block;width:100%}.van-button--round{border-radius:10em}.van-button--square{border-radius:0}.van-button--disabled{opacity:.5}.van-button__loading-text{margin-left:5px;display:inline-block;vertical-align:middle}
|
3
dist/dialog/index.js
vendored
3
dist/dialog/index.js
vendored
@ -1,7 +1,8 @@
|
|||||||
import { VantComponent } from '../common/component';
|
import { VantComponent } from '../common/component';
|
||||||
|
import { button } from '../mixins/button';
|
||||||
import { openType } from '../mixins/open-type';
|
import { openType } from '../mixins/open-type';
|
||||||
VantComponent({
|
VantComponent({
|
||||||
mixins: [openType],
|
mixins: [button, openType],
|
||||||
props: {
|
props: {
|
||||||
show: Boolean,
|
show: Boolean,
|
||||||
title: String,
|
title: String,
|
||||||
|
17
dist/dialog/index.wxml
vendored
17
dist/dialog/index.wxml
vendored
@ -39,13 +39,24 @@
|
|||||||
class="van-dialog__button"
|
class="van-dialog__button"
|
||||||
loading="{{ loading.confirm }}"
|
loading="{{ loading.confirm }}"
|
||||||
custom-class="van-dialog__confirm"
|
custom-class="van-dialog__confirm"
|
||||||
|
|
||||||
open-type="{{ confirmButtonOpenType }}"
|
open-type="{{ confirmButtonOpenType }}"
|
||||||
|
lang="{{ lang }}"
|
||||||
|
business-id="{{ businessId }}"
|
||||||
|
session-from="{{ sessionFrom }}"
|
||||||
|
send-message-title="{{ sendMessageTitle }}"
|
||||||
|
send-message-path="{{ sendMessagePath }}"
|
||||||
|
send-message-img="{{ sendMessageImg }}"
|
||||||
|
show-message-card="{{ showMessageCard }}"
|
||||||
|
app-parameter="{{ appParameter }}"
|
||||||
|
|
||||||
bind:click="onConfirm"
|
bind:click="onConfirm"
|
||||||
binderror="bindError"
|
|
||||||
bindcontact="bindContact"
|
|
||||||
bindopensetting="bindOpenSetting"
|
|
||||||
bindgetuserinfo="bindGetUserInfo"
|
bindgetuserinfo="bindGetUserInfo"
|
||||||
|
bindcontact="bindContact"
|
||||||
bindgetphonenumber="bindGetPhoneNumber"
|
bindgetphonenumber="bindGetPhoneNumber"
|
||||||
|
binderror="bindError"
|
||||||
|
bindlaunchapp="bindLaunchApp"
|
||||||
|
bindopensetting="bindOpenSetting"
|
||||||
>
|
>
|
||||||
{{ confirmButtonText }}
|
{{ confirmButtonText }}
|
||||||
</van-button>
|
</van-button>
|
||||||
|
3
dist/mixins/button.js
vendored
3
dist/mixins/button.js
vendored
@ -6,11 +6,12 @@ export var button = Behavior({
|
|||||||
type: String,
|
type: String,
|
||||||
value: 'en'
|
value: 'en'
|
||||||
},
|
},
|
||||||
|
businessId: Number,
|
||||||
sessionFrom: String,
|
sessionFrom: String,
|
||||||
sendMessageTitle: String,
|
sendMessageTitle: String,
|
||||||
sendMessagePath: String,
|
sendMessagePath: String,
|
||||||
sendMessageImg: String,
|
sendMessageImg: String,
|
||||||
showMessageCard: String,
|
showMessageCard: Boolean,
|
||||||
appParameter: String,
|
appParameter: String,
|
||||||
ariaLabel: String
|
ariaLabel: String
|
||||||
}
|
}
|
||||||
|
9
dist/switch-cell/index.js
vendored
9
dist/switch-cell/index.js
vendored
@ -2,6 +2,7 @@ import { VantComponent } from '../common/component';
|
|||||||
VantComponent({
|
VantComponent({
|
||||||
field: true,
|
field: true,
|
||||||
props: {
|
props: {
|
||||||
|
value: null,
|
||||||
title: String,
|
title: String,
|
||||||
border: Boolean,
|
border: Boolean,
|
||||||
checked: Boolean,
|
checked: Boolean,
|
||||||
@ -12,6 +13,14 @@ VantComponent({
|
|||||||
size: {
|
size: {
|
||||||
type: String,
|
type: String,
|
||||||
value: '24px'
|
value: '24px'
|
||||||
|
},
|
||||||
|
activeValue: {
|
||||||
|
type: null,
|
||||||
|
value: true
|
||||||
|
},
|
||||||
|
inactiveValue: {
|
||||||
|
type: null,
|
||||||
|
value: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
2
dist/switch-cell/index.wxml
vendored
2
dist/switch-cell/index.wxml
vendored
@ -11,6 +11,8 @@
|
|||||||
disabled="{{ disabled }}"
|
disabled="{{ disabled }}"
|
||||||
active-color="{{ activeColor }}"
|
active-color="{{ activeColor }}"
|
||||||
inactive-color="{{ inactiveColor }}"
|
inactive-color="{{ inactiveColor }}"
|
||||||
|
active-value="{{ activeValue }}"
|
||||||
|
inactive-value="{{ inactiveValue }}"
|
||||||
custom-class="van-switch-cell__switch"
|
custom-class="van-switch-cell__switch"
|
||||||
bind:change="onChange"
|
bind:change="onChange"
|
||||||
/>
|
/>
|
||||||
|
21
dist/switch/index.js
vendored
21
dist/switch/index.js
vendored
@ -3,7 +3,7 @@ VantComponent({
|
|||||||
field: true,
|
field: true,
|
||||||
classes: ['node-class'],
|
classes: ['node-class'],
|
||||||
props: {
|
props: {
|
||||||
checked: Boolean,
|
checked: null,
|
||||||
loading: Boolean,
|
loading: Boolean,
|
||||||
disabled: Boolean,
|
disabled: Boolean,
|
||||||
activeColor: String,
|
activeColor: String,
|
||||||
@ -11,6 +11,14 @@ VantComponent({
|
|||||||
size: {
|
size: {
|
||||||
type: String,
|
type: String,
|
||||||
value: '30px'
|
value: '30px'
|
||||||
|
},
|
||||||
|
activeValue: {
|
||||||
|
type: null,
|
||||||
|
value: true
|
||||||
|
},
|
||||||
|
inactiveValue: {
|
||||||
|
type: null,
|
||||||
|
value: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -27,10 +35,15 @@ VantComponent({
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onClick: function onClick() {
|
onClick: function onClick() {
|
||||||
|
var _this$data = this.data,
|
||||||
|
activeValue = _this$data.activeValue,
|
||||||
|
inactiveValue = _this$data.inactiveValue;
|
||||||
|
|
||||||
if (!this.data.disabled && !this.data.loading) {
|
if (!this.data.disabled && !this.data.loading) {
|
||||||
var checked = !this.data.checked;
|
var checked = this.data.checked === activeValue;
|
||||||
this.$emit('input', checked);
|
var value = checked ? inactiveValue : activeValue;
|
||||||
this.$emit('change', checked);
|
this.$emit('input', value);
|
||||||
|
this.$emit('change', value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
dist/switch/index.wxml
vendored
2
dist/switch/index.wxml
vendored
@ -1,7 +1,7 @@
|
|||||||
<wxs src="../wxs/utils.wxs" module="utils" />
|
<wxs src="../wxs/utils.wxs" module="utils" />
|
||||||
|
|
||||||
<view
|
<view
|
||||||
class="custom-class {{ utils.bem('switch', { on: checked, disabled }) }}"
|
class="custom-class {{ utils.bem('switch', { on: value === activeValue, disabled }) }}"
|
||||||
style="font-size: {{ size }}; {{ (checked ? activeColor : inactiveColor) ? 'background-color: ' + (checked ? activeColor : inactiveColor ) : '' }}"
|
style="font-size: {{ size }}; {{ (checked ? activeColor : inactiveColor) ? 'background-color: ' + (checked ? activeColor : inactiveColor ) : '' }}"
|
||||||
bind:tap="onClick"
|
bind:tap="onClick"
|
||||||
>
|
>
|
||||||
|
7
dist/tabs/index.js
vendored
7
dist/tabs/index.js
vendored
@ -90,7 +90,7 @@ VantComponent({
|
|||||||
this.child = [];
|
this.child = [];
|
||||||
},
|
},
|
||||||
mounted: function mounted() {
|
mounted: function mounted() {
|
||||||
this.setLine();
|
this.setLine(true);
|
||||||
this.setTrack();
|
this.setTrack();
|
||||||
this.scrollIntoView();
|
this.scrollIntoView();
|
||||||
},
|
},
|
||||||
@ -131,7 +131,7 @@ VantComponent({
|
|||||||
this.setActiveTab();
|
this.setActiveTab();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setLine: function setLine() {
|
setLine: function setLine(skipTransition) {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
|
|
||||||
if (this.data.type !== 'line') {
|
if (this.data.type !== 'line') {
|
||||||
@ -152,9 +152,10 @@ VantComponent({
|
|||||||
return prev + curr.width;
|
return prev + curr.width;
|
||||||
}, 0);
|
}, 0);
|
||||||
left += (rect.width - width) / 2;
|
left += (rect.width - width) / 2;
|
||||||
|
var transition = skipTransition ? '' : "transition-duration: " + duration + "s; -webkit-transition-duration: " + duration + "s;";
|
||||||
|
|
||||||
_this.set({
|
_this.set({
|
||||||
lineStyle: "\n " + height + "\n width: " + width + "px;\n background-color: " + color + ";\n -webkit-transform: translateX(" + left + "px);\n -webkit-transition-duration: " + duration + "s;\n transform: translateX(" + left + "px);\n transition-duration: " + duration + "s;\n "
|
lineStyle: "\n " + height + "\n width: " + width + "px;\n background-color: " + color + ";\n -webkit-transform: translateX(" + left + "px);\n transform: translateX(" + left + "px);\n " + transition + "\n "
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user