mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-05 05:18:34 +08:00
feat(layout): 布局容器新增前后插入容器元素icon
Change-Id: I6ef8512f2a809088321a31799e31672a496f34de
This commit is contained in:
parent
1af75b00b4
commit
7cd294a0ed
@ -587,7 +587,7 @@
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
border-radius: 500px;
|
||||
border-radius: 20px;
|
||||
top: 20%;
|
||||
|
||||
> span > svg {
|
||||
|
@ -837,7 +837,11 @@ export class EditorManager {
|
||||
* 备注:目前主要用在复制&粘贴快捷功能键中
|
||||
* @param rendererSchema
|
||||
*/
|
||||
async appendSiblingSchema(rendererSchema: Object) {
|
||||
async appendSiblingSchema(
|
||||
rendererSchema: Object,
|
||||
beforeInsert?: boolean,
|
||||
disabledAutoSelectInsertElem?: boolean
|
||||
) {
|
||||
if (!rendererSchema) {
|
||||
return;
|
||||
}
|
||||
@ -881,7 +885,7 @@ export class EditorManager {
|
||||
}
|
||||
return result;
|
||||
});
|
||||
nextId = parent[beforeId + 1]?.$$id; // 下一个节点的ID(追加时需要)
|
||||
nextId = parent[beforeInsert ? beforeId : beforeId + 1]?.$$id; // 下一个节点的ID(追加时需要)
|
||||
|
||||
const child = this.addChild(
|
||||
regionNodeId,
|
||||
@ -889,7 +893,7 @@ export class EditorManager {
|
||||
rendererSchema,
|
||||
nextId
|
||||
);
|
||||
if (child) {
|
||||
if (child && !disabledAutoSelectInsertElem) {
|
||||
// mobx 修改数据是异步的
|
||||
setTimeout(() => {
|
||||
store.setActiveId(child.$$id);
|
||||
|
Loading…
Reference in New Issue
Block a user