优化 laydate 日期值预览的颜色渐变

pull/1187/head
贤心 2022-12-12 23:09:01 +08:00
parent a14d88d754
commit e415579191
1 changed files with 6 additions and 5 deletions

View File

@ -1601,16 +1601,17 @@
var elemPreview = lay(that.elem).find('.'+ ELEM_PREVIEW)
,value = options.range ? ((that.rangeLinked ? that.endState : that.endDate) ? that.parse() : '') : that.parse();
//显示预览
var oldValue = elemPreview.html();
// 显示预览
elemPreview.html(value);
oldValue && // 如果一开始有内容的时候才需要有一个变化过程
(elemPreview.css({
// 预览颜色渐变
var oldValue = elemPreview.html();
oldValue && (elemPreview.css({
'color': '#5FB878'
}),
setTimeout(function(){
elemPreview.css({
'color': '#666'
'color': '#777'
});
}, 300));
};