提交 257b89f3 编写于 作者: linjinyang's avatar linjinyang

菜单拖动 更新

上级 9fcce9dc
......@@ -103,10 +103,12 @@
}
#move_axis{
position: absolute;
left: 195px;
width: 5px;
height: 100%;
cursor: w-resize;
float: left;
background-color: rgba(255,255,255,0);
}
.index_sider{
flex: none!important;
......
......@@ -226,6 +226,7 @@
let left_move :any= document.getElementById("left_move");
let right_move :any= document.getElementById("right_move");
let movebox :any= document.getElementById("movebox");
let leftWidth :string = left_move.style.width;
move_axis.onmousedown = (e:any) =>{
let startX = e.clientX;
move_axis.left = move_axis.offsetLeft;
......@@ -238,6 +239,12 @@
move_axis.style.left = moveLen;
left_move.style.width = moveLen + "px";
right_move.style.width = (movebox.clientWidth - moveLen - 5) + "px";
let left_width : any = left_move.style.width;
move_axis.style.left = parseInt(left_width) - 5 + 'px';
if(left_width < leftWidth){
move_axis.style.left = parseInt(leftWidth) - 5 + 'px';
}
}
document.onmouseup = (evt) =>{
document.onmousemove = null;
......@@ -247,6 +254,7 @@
move_axis.setCapture && move_axis.setCapture();
return false;
}
}
<#ibizinclude>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册