From 54d2e8ded9a600b757cf0ae2901e07f6494ea129 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B1=E7=9C=A0=E4=BB=AA=E5=BC=8F?= <854085467@qq.com> Date: Tue, 6 Jul 2021 22:20:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=20pear-this=20=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2=20layui-this?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- component/pear/module/message.js | 8 +++++--- component/pear/module/theme.js | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) 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 += '