diff --git a/component/pear/module/message.js b/component/pear/module/message.js index 509fbfa..958a874 100644 --- a/component/pear/module/message.js +++ b/component/pear/module/message.js @@ -24,6 +24,10 @@ layui.define(['table', 'jquery', 'element'], function(exports) { } setTimeout(function(){ element.init(); + $(opt.elem+" li").click(function(e){ + $(this).siblings().removeClass('pear-this'); + $(this).addClass('pear-this'); + }) },300); return new message(option); } @@ -61,9 +65,8 @@ layui.define(['table', 'jquery', 'element'], function(exports) { // 根据 data 便利数据 $.each(option.data, function(i, item) { - if (i === 0) { - noticeTitle += '
  • ' + item.title + '
  • '; + noticeTitle += '
  • ' + item.title + '
  • '; noticeContent += '
    '; } else { noticeTitle += '
  • ' + item.title + '
  • '; @@ -77,7 +80,6 @@ layui.define(['table', 'jquery', 'element'], function(exports) { '' + note.title + '' + '' + note.time + '' + '
    '; - }) noticeContent += ''; }) diff --git a/component/pear/module/theme.js b/component/pear/module/theme.js index c1cc4ee..ab114b9 100644 --- a/component/pear/module/theme.js +++ b/component/pear/module/theme.js @@ -52,7 +52,7 @@ layui.define(["jquery","layer"], function (exports) { style += '.layui-elem-quote{border-left: 5px solid '+ color +'}'; style += '.layui-timeline-axis{color:' + color + '}'; style += '.layui-laydate .layui-this{background-color:'+color+'!important}'; - style += '.pear-text{color:' + color + '!important}'; + style += '.pear-this,.pear-text{color:' + color + '!important}'; style += '.pear-back{background-color:'+ color +'!important}'; style += '.pear-collasped-pe{background-color:'+color+'!important}' style += '.layui-form-select dl dd.layui-this{background-color:'+color+'}'