优化 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

@ -1602,15 +1602,16 @@
,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));
}; };