mirror of https://github.com/layui/layui
laydate修复面板自动切换的一些问题;修复gulp打包独立组件laydate的命令语句没有同步到最新的情况导致打包出来的laydate独立组件无法使用的问题。
parent
37eb2c6a4f
commit
1d9056bd0c
|
@ -136,9 +136,11 @@ exports.laydate = () => { // gulp laydate
|
||||||
// js
|
// js
|
||||||
return gulp.src(['./src/layui.js', './src/modules/{lay,laydate}.js'])
|
return gulp.src(['./src/layui.js', './src/modules/{lay,laydate}.js'])
|
||||||
.pipe(replace('win.layui =', 'var layui =')) // 将 layui 替换为局部变量
|
.pipe(replace('win.layui =', 'var layui =')) // 将 layui 替换为局部变量
|
||||||
.pipe(replace('})(window); //gulp build: layui-footer', '')) // 替换 layui.js 的落脚
|
.pipe(replace('}(window); //gulp build: layui-footer', '')) // 替换 layui.js 的落脚
|
||||||
.pipe(replace('(function(window){ //gulp build: lay-header', '')) // 替换 lay.js 的头部
|
.pipe(replace(';!function(window){ //gulp build: lay-header', '')) // 替换 lay.js 的头部
|
||||||
|
.pipe(replace('}(window, window.document); //gulp build: lay-footer', '')) // 替换 lay.js 的落脚
|
||||||
.pipe(concat('laydate.js', {newLine: ''}))
|
.pipe(concat('laydate.js', {newLine: ''}))
|
||||||
|
.pipe(replace(';!function(window, document){ //gulp build: laydate-header', '')) // 替换 laydate.js 的头部
|
||||||
.pipe(header.apply(null, comment)) //追加头部
|
.pipe(header.apply(null, comment)) //追加头部
|
||||||
.pipe(gulp.dest(dest + 'src'));
|
.pipe(gulp.dest(dest + 'src'));
|
||||||
};
|
};
|
||||||
|
|
|
@ -428,4 +428,4 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}(window, window.document);
|
}(window, window.document); //gulp build: lay-footer
|
|
@ -1,6 +1,6 @@
|
||||||
/** layDate 日期与时间控件 | MIT Licensed */
|
/** layDate 日期与时间控件 | MIT Licensed */
|
||||||
|
|
||||||
;!function(window, document){
|
;!function(window, document){ //gulp build: laydate-header
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var isLayui = window.layui && layui.define, ready = {
|
var isLayui = window.layui && layui.define, ready = {
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
,ready: function(callback){
|
,ready: function(callback){
|
||||||
var cssname = 'laydate';
|
var cssname = 'laydate';
|
||||||
var ver = ''
|
var ver = ''
|
||||||
var path = (isLayui ? 'modules/' : 'css/') + 'laydate.css?v='+ laydate.v + ver;
|
var path = (isLayui ? 'modules/' : '') + 'laydate.css?v='+ laydate.v + ver;
|
||||||
|
|
||||||
isLayui ? (
|
isLayui ? (
|
||||||
layui['layui.all']
|
layui['layui.all']
|
||||||
|
@ -1503,7 +1503,7 @@
|
||||||
,lang = that.lang()
|
,lang = that.lang()
|
||||||
,isOut, elemBtn = lay(that.footer).find(ELEM_CONFIRM);
|
,isOut, elemBtn = lay(that.footer).find(ELEM_CONFIRM);
|
||||||
if(options.range && options.type !== 'time'){
|
if(options.range && options.type !== 'time'){
|
||||||
start = start || that.startDate || options.dateTime;
|
start = start || (that.calendarLinkage ? that.startDate : options.dateTime);
|
||||||
end = end || that.endDate;
|
end = end || that.endDate;
|
||||||
isOut = that.newDate(start).getTime() > that.newDate(end).getTime();
|
isOut = that.newDate(start).getTime() > that.newDate(end).getTime();
|
||||||
|
|
||||||
|
@ -1699,6 +1699,8 @@
|
||||||
|
|
||||||
//选择日期
|
//选择日期
|
||||||
Class.prototype.choose = function(td, index){
|
Class.prototype.choose = function(td, index){
|
||||||
|
if(td.hasClass(DISABLED)) return;
|
||||||
|
|
||||||
var that = this
|
var that = this
|
||||||
,options = that.config;
|
,options = that.config;
|
||||||
|
|
||||||
|
@ -1723,9 +1725,7 @@
|
||||||
,month: (YMD[1] | 0) - 1
|
,month: (YMD[1] | 0) - 1
|
||||||
,date: YMD[2] | 0
|
,date: YMD[2] | 0
|
||||||
};
|
};
|
||||||
|
|
||||||
if(td.hasClass(DISABLED)) return;
|
|
||||||
|
|
||||||
lay.extend(dateTime, YMD); //同步 dateTime
|
lay.extend(dateTime, YMD); //同步 dateTime
|
||||||
|
|
||||||
//范围选择
|
//范围选择
|
||||||
|
|
Loading…
Reference in New Issue