🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

iov-ui

Package Overview
Dependencies
Maintainers
4
Versions
445
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iov-ui - npm Package Compare versions

Comparing version
1.2.63
to
1.2.64
+6
-4
lib/calendar/index.js

@@ -15,3 +15,4 @@ /**

getDayByOffset,
getMonthByOffset
getMonthByOffset,
formatDate
} = require('./util');

@@ -129,2 +130,3 @@

} = Object.assign({}, e.vsl.data);
const newEnd = end ? end : formatDate(new Date(start).getTime() + 24 * 60 * 60 * 1000, 'YYYY-MM-DD');
if (this.data.type !== 'range') {

@@ -139,3 +141,3 @@ if (!time) {

this.select(time);
} else if (!start || !end) {
} else if (!start || !newEnd) {
swan.showToast({

@@ -147,4 +149,4 @@ icon: 'none',

const {minDate, maxDate} = this.data;
if (compareDay(start, minDate) > 0 && compareDay(maxDate, end) > 0) {
this.select([start, end]);
if (compareDay(start, minDate) > 0 && compareDay(maxDate, newEnd) > 0) {
this.select([start, newEnd]);
}

@@ -151,0 +153,0 @@ }

+32
-1

@@ -116,2 +116,32 @@ /**

function autoFixZero(num) {
return num > 9 ? num : `0${num}`;
}
function formatDate(time, format) {
let str = format;
let day = Object.prototype.toString.call(time) === '[object Date]'
? time : new Date(time);
const year = day.getFullYear();
const month = autoFixZero(day.getMonth() + 1);
const date = autoFixZero(day.getDate());
const hours = autoFixZero(day.getHours());
const minutes = autoFixZero(day.getMinutes());
if (month === '0NaN' || date === '0NaN') {
let today = new Date();
today = formatDate(today, 'MM月DD日');
return today;
}
if (format) {
str = str.replace(/YYYY/gi, year);
str = str.replace(/MM/g, month);
str = str.replace(/DD/gi, date);
str = str.replace(/HH/gi, hours);
str = str.replace(/mm/g, minutes);
return str;
} else {
return `${year}-${month}-${date} ${hours}:${minutes}`;
}
}
module.exports = {

@@ -129,3 +159,4 @@ ROW_HEIGHT,

getMonths,
getMonthByOffset
getMonthByOffset,
formatDate
};
{
"name": "iov-ui",
"version": "1.2.63",
"version": "1.2.64",
"description": "",

@@ -46,3 +46,3 @@ "main": "build",

"dependencies": {
"iov-ui": "1.2.63",
"iov-ui": "1.2.64",
"regenerator-runtime": "^0.13.7"

@@ -49,0 +49,0 @@ },

@@ -25,2 +25,4 @@ # iov-ui

# 发布记录
- 1.2.64
- 日历组件语音注册bug修复
- 1.2.63

@@ -27,0 +29,0 @@ - tabs 快速点击切换跳动问题优化