mirror of https://github.com/layui/layui
laydate调整预览的逻辑,让从无到有内容变的时候文本颜色不要有一个变化过程,只有在原先有文本然后换成另外的内容的时候才会有变化过程让用户对于变化更有感
parent
2fba280516
commit
b2766cae72
|
@ -1602,9 +1602,12 @@
|
|||
,value = options.range ? ((that.rangeLinked ? that.endState : that.endDate) ? that.parse() : '') : that.parse();
|
||||
|
||||
//显示预览
|
||||
elemPreview.html(value).css({
|
||||
var oldValue = elemPreview.html();
|
||||
elemPreview.html(value);
|
||||
oldValue && // 如果一开始有内容的时候才需要有一个变化过程
|
||||
elemPreview.css({
|
||||
'color': '#5FB878'
|
||||
});
|
||||
}),
|
||||
setTimeout(function(){
|
||||
elemPreview.css({
|
||||
'color': '#666'
|
||||
|
|
Loading…
Reference in New Issue