mirror of https://github.com/layui/layui
优化 laydate 日期值预览的颜色渐变
parent
a14d88d754
commit
e415579191
|
@ -1601,16 +1601,17 @@
|
||||||
var elemPreview = lay(that.elem).find('.'+ ELEM_PREVIEW)
|
var elemPreview = lay(that.elem).find('.'+ ELEM_PREVIEW)
|
||||||
,value = options.range ? ((that.rangeLinked ? that.endState : that.endDate) ? that.parse() : '') : that.parse();
|
,value = options.range ? ((that.rangeLinked ? that.endState : that.endDate) ? that.parse() : '') : that.parse();
|
||||||
|
|
||||||
//显示预览
|
// 显示预览
|
||||||
var oldValue = elemPreview.html();
|
|
||||||
elemPreview.html(value);
|
elemPreview.html(value);
|
||||||
oldValue && // 如果一开始有内容的时候才需要有一个变化过程
|
|
||||||
(elemPreview.css({
|
// 预览颜色渐变
|
||||||
|
var oldValue = elemPreview.html();
|
||||||
|
oldValue && (elemPreview.css({
|
||||||
'color': '#5FB878'
|
'color': '#5FB878'
|
||||||
}),
|
}),
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
elemPreview.css({
|
elemPreview.css({
|
||||||
'color': '#666'
|
'color': '#777'
|
||||||
});
|
});
|
||||||
}, 300));
|
}, 300));
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue