mirror of https://github.com/layui/layui
fix(laydate): 预览区域选中高亮跟随主题 (#2840)
parent
3940c45654
commit
f18edf97f7
|
@ -2161,14 +2161,18 @@ layui.define(['lay', 'i18n'], function(exports) {
|
||||||
|
|
||||||
// 预览颜色渐变
|
// 预览颜色渐变
|
||||||
var oldValue = elemPreview.html();
|
var oldValue = elemPreview.html();
|
||||||
oldValue && (elemPreview.css({
|
if (oldValue) {
|
||||||
'color': '#16b777'
|
var color = layui.type(options.theme) === 'array' ? options.theme[0] : options.theme;
|
||||||
}),
|
elemPreview.css({
|
||||||
|
'color': /^#/.test(String(color)) ? color : '#16b777'
|
||||||
|
});
|
||||||
|
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
elemPreview.css({
|
elemPreview.css({
|
||||||
'color': '#777'
|
'color': '#777'
|
||||||
});
|
});
|
||||||
}, 300));
|
}, 300);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 附加的渲染处理,在 ready 和 change 的时候调用
|
// 附加的渲染处理,在 ready 和 change 的时候调用
|
||||||
|
|
Loading…
Reference in New Issue