From 43172bd2f0972c49472cec4fa049b206ceddb76f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Sat, 25 Feb 2023 21:42:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20menu=20=E5=9F=BA=E7=A1=80?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E5=AF=B9=20`title`=20=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E7=9A=84=E9=BB=98=E8=AE=A4=E8=AF=86=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/dropdown.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/dropdown.js b/src/modules/dropdown.js index 448441de..72c28f3f 100644 --- a/src/modules/dropdown.js +++ b/src/modules/dropdown.js @@ -468,6 +468,8 @@ layui.define(['jquery', 'laytpl', 'lay'], function(exports){ parent.find('.'+ STR_ITEM_CHECKED2).removeClass(STR_ITEM_CHECKED2); //清除父级菜单选中样式 othis.addClass(STR_ITEM_CHECKED); //添加选中样式 othis.parents('.'+ STR_ITEM_PARENT).addClass(STR_ITEM_CHECKED2); //添加父级菜单选中样式 + + options.title = options.title || $.trim(othis.children('.'+ STR_MENU_TITLE).text()); //触发事件 layui.event.call(this, MOD_NAME, 'click('+ filter +')', options);