mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-05 19:41:45 +08:00
[build] 3.0.8
This commit is contained in:
parent
e739520290
commit
3b32c2d6b4
2
dist/datetime-picker/date-picker.js
vendored
2
dist/datetime-picker/date-picker.js
vendored
@ -37,7 +37,7 @@ module.exports = function () {
|
||||
date = date || this._date || new Date();
|
||||
|
||||
// toUTCString ISO 格式部分 ios 手机会失败
|
||||
if (typeof date === 'string' && date.indexOf('-') > 0) {
|
||||
if (new Date(date).toString() === 'Invalid Date' && typeof date === 'string' && date.indexOf('-') > 0) {
|
||||
date = iso2utc(date);
|
||||
}
|
||||
|
||||
|
7
dist/datetime-picker/index.js
vendored
7
dist/datetime-picker/index.js
vendored
@ -184,8 +184,13 @@ Component({
|
||||
return +item[value[index]];
|
||||
});
|
||||
|
||||
var day = data.slice(0, 3);
|
||||
var time = data.slice(3, 6);
|
||||
var date = new Date(day.join('/') + ' ' + time.join(':'));
|
||||
|
||||
this.triggerEvent('change', {
|
||||
value: data
|
||||
value: data,
|
||||
date: date
|
||||
});
|
||||
|
||||
// 手动触发 columnchange
|
||||
|
11
dist/toast/toast.js
vendored
11
dist/toast/toast.js
vendored
@ -1,6 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
var TOAST_CONFIG_KEY = 'zanui.__zanToastPageConfig';
|
||||
var DEFAULT_SHOW_TOAST_TIME = 3000;
|
||||
|
||||
var timeoutData = {
|
||||
timeoutId: 0,
|
||||
@ -55,11 +56,13 @@ function Toast(optionsOrMsg, pageCtx) {
|
||||
}));
|
||||
|
||||
var timeoutId = 0;
|
||||
|
||||
if (parsedOptions.timeout >= 0) {
|
||||
// toast 计时,如果小于0,就不会去关闭。
|
||||
// 如果不传,就取默认值
|
||||
var timeoutOption = parsedOptions.timeout || DEFAULT_SHOW_TOAST_TIME;
|
||||
if (timeoutOption >= 0) {
|
||||
timeoutId = setTimeout(function () {
|
||||
toastCtx.clear();
|
||||
}, parsedOptions.timeout || 3000);
|
||||
}, timeoutOption);
|
||||
}
|
||||
|
||||
timeoutData = {
|
||||
@ -78,7 +81,7 @@ Toast.setDefaultOptions = function () {
|
||||
type: options.type || '',
|
||||
icon: options.icon || '',
|
||||
image: options.image || '',
|
||||
timeout: options.timeout || 3000
|
||||
timeout: options.timeout || DEFAULT_SHOW_TOAST_TIME
|
||||
};
|
||||
|
||||
if (type === 'global') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user