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

桌面二级菜单展示完成

上级 410aaa2d
...@@ -2577,6 +2577,15 @@ body .layer-ext-winconfirm { ...@@ -2577,6 +2577,15 @@ body .layer-ext-winconfirm {
height: calc(100vh - 140px); height: calc(100vh - 140px);
} }
.sec-clsss{
background-color: rgba(0,0,0,0.3) !important;
}
.sec-clsss-btn{
float: left !important;
position: relative !important;
}
/* 样式1 */ /* 样式1 */
.iphone { .iphone {
box-shadow: inset 0 0 3px 0 rgba(0, 0, 0, 0.2), 0 0 0 1px #999, 0 0 30px 0px rgba(0, 0, 0, 0.7); box-shadow: inset 0 0 3px 0 rgba(0, 0, 0, 0.2), 0 0 0 1px #999, 0 0 30px 0px rgba(0, 0, 0, 0.7);
......
...@@ -53,7 +53,7 @@ layui.define(['jquery', 'layer', 'winui'], function (exports) { ...@@ -53,7 +53,7 @@ layui.define(['jquery', 'layer', 'winui'], function (exports) {
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"></i>' : '<img src="' + bean.icon + '" />';
childsIconContent += childsiconsmall; childsIconContent += childsiconsmall;
childsHtml += '<div class="winui-desktop-item" ' + childsid + ' ' + childsurl + ' ' + childstitle + ' ' + childsopentype + ' ' + childsmaxOpen + '>'; childsHtml += '<div class="winui-desktop-item sec-clsss-btn" ' + childsid + ' ' + childsurl + ' ' + childstitle + ' ' + childsopentype + ' ' + childsmaxOpen + '>';
childsHtml += '<div class="winui-icon ' + (childsisFaIcon ? 'winui-icon-font' : 'winui-icon-img') + '">'; childsHtml += '<div class="winui-icon ' + (childsisFaIcon ? 'winui-icon-font' : 'winui-icon-img') + '">';
childsHtml += childsicon; childsHtml += childsicon;
childsHtml += '</div>'; childsHtml += '</div>';
......
...@@ -473,8 +473,7 @@ layui.define(['layer', 'winui'], function (exports) { ...@@ -473,8 +473,7 @@ layui.define(['layer', 'winui'], function (exports) {
}; };
var winLayer = new WinLayer(); var winLayer = new WinLayer();
//置顶窗口(显示窗口且置于顶层) //置顶窗口(显示窗口且置于顶层)
winLayer.setTop = function (param) { winLayer.setTop = function (param) {
var windowDom = common.getWindow(param); var windowDom = common.getWindow(param);
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
helper: 'js/winui.helper' helper: 'js/winui.helper'
}).define(['window', 'desktop', 'start', 'helper'], function (exports) { }).define(['window', 'desktop', 'start', 'helper'], function (exports) {
var $ = layui.jquery; var $ = layui.jquery;
$(function () { $(function () {
AjaxPostUtil.request({url:reqBasePath + "login002", params:{}, type:'json', callback:function(json){ AjaxPostUtil.request({url:reqBasePath + "login002", params:{}, type:'json', callback:function(json){
...@@ -41,6 +41,13 @@ ...@@ -41,6 +41,13 @@
//初始化配置信息 //初始化配置信息
function initWinConfig(){ function initWinConfig(){
//设置窗口点击事件
$("body").on("dblclick", ".sec-clsss-btn", function(e){
winui.window.close($('#childWindow').parent());
OpenWindow($(this).prop("outerHTML"));
});
winui.config({ winui.config({
settings: layui.data('winui').settings || { settings: layui.data('winui').settings || {
color: 32, color: 32,
...@@ -59,15 +66,25 @@ ...@@ -59,15 +66,25 @@
desktopApp.ondblclick(function (id, elem) { desktopApp.ondblclick(function (id, elem) {
var item = $(elem); var item = $(elem);
if(item.find(".icon-drawer").length > 0){ if(item.find(".icon-drawer").length > 0){
showBigWin(elem);
}else{ }else{
OpenWindow(elem); OpenWindow(elem);
} }
}); });
desktopApp.onclick(function (id, elem) {
var item = $(elem);
if(item.find(".icon-drawer").length > 0){
showBigWin(elem);
}
}),
desktopApp.contextmenu({ desktopApp.contextmenu({
item: ["打开", "删除", '右键菜单可自定义'], item: ["打开", "删除", '右键菜单可自定义'],
item1: function (id, elem) { item1: function (id, elem) {
OpenWindow(elem); var item = $(elem);
if(item.find(".icon-drawer").length > 0){
showBigWin(elem);
}else{
OpenWindow(elem);
}
}, },
item2: function (id, elem, events) { item2: function (id, elem, events) {
winui.window.msg('删除回调'); winui.window.msg('删除回调');
...@@ -213,14 +230,14 @@ ...@@ -213,14 +230,14 @@
miniAnim: 0, miniAnim: 0,
maxOpen: -1 maxOpen: -1
}).open({ }).open({
id: '1', id: 'childWindow',
type: 1, type: 1,
title: false, title: false,
closeBtn: 0, closeBtn: 1,
content: '1111', content: menu.find(".icon-child").html(),
area: ['30vw', '40vh'], area: ['30vw', '40vh'],
shadeClose: true, shadeClose: true,
skin: 'demo-class', skin: 'sec-clsss',
scrollbar: false, scrollbar: false,
shade: 0.5, shade: 0.5,
maxmin: false maxmin: false
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册