feat: add tab drag and drop sort

This commit is contained in:
vben
2020-11-25 22:28:58 +08:00
parent 5cabbac757
commit cedba37e4c
23 changed files with 255 additions and 228 deletions

View File

@@ -1,7 +1,7 @@
@import (reference) '../../../design/index.less';
.layout-sidebar {
overflow: hidden;
// overflow: hidden;
&.fixed {
position: fixed;
@@ -15,7 +15,7 @@
}
&:not(.ant-layout-sider-dark) {
border-right: 1px solid @border-color-light;
// border-right: 1px solid @border-color-light;
box-shadow: 2px 0 8px 0 rgba(29, 35, 41, 0.05);
}

View File

@@ -82,7 +82,7 @@ export function useTrigger() {
* @param dragBarRef
*/
export function useDragLine(siderRef: Ref<any>, dragBarRef: Ref<any>) {
const { getMiniWidthNumber, getCollapsed, setMenuSetting, getHasDrag } = useMenuSetting();
const { getMiniWidthNumber, getCollapsed, setMenuSetting, getCanDrag } = useMenuSetting();
const getDragBarStyle = computed(() => {
if (unref(getCollapsed)) {
@@ -101,7 +101,7 @@ export function useDragLine(siderRef: Ref<any>, dragBarRef: Ref<any>) {
function renderDragLine() {
return (
<div
class={[`layout-sidebar__darg-bar`, !unref(getHasDrag) ? 'hide' : '']}
class={[`layout-sidebar__darg-bar`, { hide: !unref(getCanDrag) }]}
style={unref(getDragBarStyle)}
ref={dragBarRef}
/>