[build] 3.0.8

This commit is contained in:
pangxie 2018-07-12 22:05:12 +08:00
parent e739520290
commit 3b32c2d6b4
3 changed files with 14 additions and 6 deletions

View File

@ -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);
}

View File

@ -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
View File

@ -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') {