提交 43536987 编写于 作者: Skyeye云's avatar Skyeye云

桌面二级菜单删除特效完成

上级 ec0de1cd
...@@ -32,9 +32,9 @@ layui.define(['jquery', 'layer', 'winui'], function (exports) { ...@@ -32,9 +32,9 @@ layui.define(['jquery', 'layer', 'winui'], function (exports) {
isFaIcon = (item.icon.indexOf('fa-') != -1 && item.icon.indexOf('.') == -1); isFaIcon = (item.icon.indexOf('fa-') != -1 && item.icon.indexOf('.') == -1);
var icon; var icon;
if(!isNull(item.menuIconColor)){ if(!isNull(item.menuIconColor)){
icon = isFaIcon ? '<i class="fa ' + item.icon + ' fa-fw" style="color: ' + item.menuIconColor + '"></i>' : '<img src="' + item.icon + '" />'; icon = isFaIcon ? '<i class="fa ' + item.icon + ' fa-fw" style="color: ' + item.menuIconColor + '" win-i-id="' + item.id + '"></i>' : '<img src="' + item.icon + '" />';
}else{ }else{
icon = isFaIcon ? '<i class="fa ' + item.icon + ' fa-fw"></i>' : '<img src="' + item.icon + '" />'; icon = isFaIcon ? '<i class="fa ' + item.icon + ' fa-fw" win-i-id="' + item.id + '"></i>' : '<img src="' + item.icon + '" />';
} }
if(isNull(item.childs)){ if(isNull(item.childs)){
html += '<div class="winui-desktop-item" ' + id + ' ' + url + ' ' + title + ' ' + opentype + ' ' + maxOpen + ' ' + menuIconBg + ' ' + menuIconColor + ' ' + menuIcon + '>'; html += '<div class="winui-desktop-item" ' + id + ' ' + url + ' ' + title + ' ' + opentype + ' ' + maxOpen + ' ' + menuIconBg + ' ' + menuIconColor + ' ' + menuIcon + '>';
...@@ -68,19 +68,19 @@ layui.define(['jquery', 'layer', 'winui'], function (exports) { ...@@ -68,19 +68,19 @@ layui.define(['jquery', 'layer', 'winui'], function (exports) {
var childsiconsmall; var childsiconsmall;
if(!isNull(bean.menuIconColor)){ if(!isNull(bean.menuIconColor)){
if(!isNull(bean.menuIconBg)){ if(!isNull(bean.menuIconBg)){
childsiconsmall = childsisFaIcon ? '<i class="fa ' + bean.icon + ' fa-fw icon-drawer-icon" style="color: ' + bean.menuIconColor + ';background-color: ' + bean.menuIconBg + '"></i>' : '<img src="' + bean.icon + '" />'; childsiconsmall = childsisFaIcon ? '<i class="fa ' + bean.icon + ' fa-fw icon-drawer-icon" style="color: ' + bean.menuIconColor + ';background-color: ' + bean.menuIconBg + '" win-i-id="' + bean.id + '"></i>' : '<img src="' + bean.icon + '" />';
childsicon = childsisFaIcon ? '<i class="fa ' + bean.icon + ' fa-fw" style="color: ' + bean.menuIconColor + ';background-color: ' + bean.menuIconBg + '"></i>' : '<img src="' + bean.icon + '" />'; childsicon = childsisFaIcon ? '<i class="fa ' + bean.icon + ' fa-fw" style="color: ' + bean.menuIconColor + ';background-color: ' + bean.menuIconBg + '" win-i-id="' + bean.id + '"></i>' : '<img src="' + bean.icon + '" />';
}else{ }else{
childsiconsmall = childsisFaIcon ? '<i class="fa ' + bean.icon + ' fa-fw icon-drawer-icon" style="color: ' + bean.menuIconColor + '"></i>' : '<img src="' + bean.icon + '" />'; childsiconsmall = childsisFaIcon ? '<i class="fa ' + bean.icon + ' fa-fw icon-drawer-icon" style="color: ' + bean.menuIconColor + '" win-i-id="' + bean.id + '"></i>' : '<img src="' + bean.icon + '" />';
childsicon = childsisFaIcon ? '<i class="fa ' + bean.icon + ' fa-fw" style="color: ' + bean.menuIconColor + '"></i>' : '<img src="' + bean.icon + '" />'; childsicon = childsisFaIcon ? '<i class="fa ' + bean.icon + ' fa-fw" style="color: ' + bean.menuIconColor + '" win-i-id="' + bean.id + '"></i>' : '<img src="' + bean.icon + '" />';
} }
}else{ }else{
if(!isNull(bean.menuIconBg)){ if(!isNull(bean.menuIconBg)){
childsiconsmall = childsisFaIcon ? '<i class="fa ' + bean.icon + ' fa-fw icon-drawer-icon" style="background-color: ' + bean.menuIconBg + '"></i>' : '<img src="' + bean.icon + '" />'; childsiconsmall = childsisFaIcon ? '<i class="fa ' + bean.icon + ' fa-fw icon-drawer-icon" style="background-color: ' + bean.menuIconBg + '" win-i-id="' + bean.id + '"></i>' : '<img src="' + bean.icon + '" />';
childsicon = childsisFaIcon ? '<i class="fa ' + bean.icon + ' fa-fw" style="background-color: ' + bean.menuIconBg + '"></i>' : '<img src="' + bean.icon + '" />'; childsicon = childsisFaIcon ? '<i class="fa ' + bean.icon + ' fa-fw" style="background-color: ' + bean.menuIconBg + '" win-i-id="' + bean.id + '"></i>' : '<img src="' + bean.icon + '" />';
}else{ }else{
childsiconsmall = childsisFaIcon ? '<i class="fa ' + bean.icon + ' fa-fw icon-drawer-icon"></i>' : '<img src="' + bean.icon + '" />'; childsiconsmall = childsisFaIcon ? '<i class="fa ' + bean.icon + ' fa-fw icon-drawer-icon" win-i-id="' + bean.id + '"></i>' : '<img src="' + bean.icon + '" />';
childsicon = childsisFaIcon ? '<i class="fa ' + bean.icon + ' fa-fw"></i>' : '<img src="' + bean.icon + '" />'; childsicon = childsisFaIcon ? '<i class="fa ' + bean.icon + ' fa-fw" win-i-id="' + bean.id + '"></i>' : '<img src="' + bean.icon + '" />';
} }
} }
......
...@@ -598,7 +598,10 @@ ...@@ -598,7 +598,10 @@
}, },
item2: function (id, elem, events) { item2: function (id, elem, events) {
winui.window.msg('删除回调'); winui.window.msg('删除回调');
console.log();
$(elem).remove(); $(elem).remove();
$("i[win-i-id=" + $(elem).attr('win-id') + "]").remove();
$("div[win-id=" + $(elem).attr('win-id') + "]").remove();
//从新排列桌面app //从新排列桌面app
events.reLocaApp(); events.reLocaApp();
}, },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册