Skip to content

表格布局向上选父节点错误 #12

Closed
@leefinder

Description

@leefinder

复现:
GIF 2023-5-16 15-09-41

代码片段:
https://github.com/Liberty-liu/Everright-formEditor/blob/main/packages/formEditor/components/Selection/selectElement.jsx#LL196C52-L196C58

197行处理有问题

let parent = props.data.context.parent
if (/^(inline)$/.test(parent.type)) {
  parent = parent.context.parent
} else if (/^(tr)$/.test(parent.type)) {
  parent = parent.context.parent.context.parent // 这行处理有问题
}

调整一下似乎能解决,type 类型为inline或tr的向上找一层parent,collapse、tabs、grid默认当前context.parent

let parent = props.data.context.parent
if (/^(inline|tr)$/.test(parent.type)) {
  parent = parent.context.parent
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions