mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
fix(editor): 组件树切换选择组件可能触发多选
This commit is contained in:
parent
dc96720641
commit
b8cda53d6a
@ -287,6 +287,9 @@ const toggleClickFlag = () => {
|
|||||||
|
|
||||||
// 选择节点多选框
|
// 选择节点多选框
|
||||||
const checkHandler = (data: MNode, { checkedNodes }: any): void => {
|
const checkHandler = (data: MNode, { checkedNodes }: any): void => {
|
||||||
|
if (!isCtrlKeyDown.value && nodes.value.length < 2) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (checkedNodes.length > 0) {
|
if (checkedNodes.length > 0) {
|
||||||
multiSelect(checkedNodes.map((node: MNode) => node.id));
|
multiSelect(checkedNodes.map((node: MNode) => node.id));
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user