mirror of
https://gitee.com/dromara/go-view.git
synced 2025-02-24 16:22:57 +08:00
fix: 处理层级右键拖拽的问题
This commit is contained in:
parent
f70576bbdc
commit
0d3585503b
@ -123,8 +123,6 @@ const hover = computed(() => {
|
||||
|
||||
// 组点击事件
|
||||
const groupMousedownHandle = (e: MouseEvent) => {
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
onClickOutSide()
|
||||
// 若此时按下了 CTRL, 表示多选
|
||||
const id = props.componentGroupData.id
|
||||
|
@ -60,7 +60,7 @@ $textSize: 10px;
|
||||
position: relative;
|
||||
height: $centerHeight;
|
||||
width: 90%;
|
||||
margin: 10px 5%;
|
||||
margin: 5px 5%;
|
||||
margin-bottom: 5px;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
|
@ -19,7 +19,7 @@
|
||||
<!-- https://github.com/SortableJS/vue.draggable.next -->
|
||||
<draggable item-key="id" v-model="reverseList" ghostClass="ghost" @change="onMoveCallback">
|
||||
<template #item="{ element }">
|
||||
<div>
|
||||
<div class="go-content-layer-box">
|
||||
<!-- 组合 -->
|
||||
<layers-group-list-item v-if="element.isGroup" :componentGroupData="element"></layers-group-list-item>
|
||||
<!-- 单组件 -->
|
||||
@ -112,13 +112,14 @@ const onMoveCallback = (val: any) => {
|
||||
}
|
||||
|
||||
const boxMousedownHandle = (e: MouseEvent) => {
|
||||
chartEditStore.setTargetSelectChart()
|
||||
const box = document.querySelector('.go-content-layer-box')
|
||||
if ((e.target as any).contains(box)) {
|
||||
chartEditStore.setTargetSelectChart()
|
||||
}
|
||||
}
|
||||
|
||||
// 点击事件
|
||||
const mousedownHandle = (e: MouseEvent, item: CreateComponentType) => {
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
onClickOutSide()
|
||||
// 若此时按下了 CTRL, 表示多选
|
||||
const id = item.id
|
||||
|
Loading…
Reference in New Issue
Block a user