mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-09-17 02:00:02 +08:00
fix(editor): 复制页面,页面名称重新生成
This commit is contained in:
parent
5bfb69b36d
commit
c80dab835d
@ -91,7 +91,7 @@ const doAction = async (
|
|||||||
* editorService.afterAdd();
|
* editorService.afterAdd();
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* 调用时的参数会透传到before方法的参数中, 然后before的return 会作为原方法的参数和after的参数,after最后一个参数则是原方法的return值;
|
* 调用时的参数会透传到before方法的参数中, 然后before的return 会作为原方法的参数和after的参数,after第一个参数则是原方法的return值;
|
||||||
* 如需终止后续方法调用可以return new Error();
|
* 如需终止后续方法调用可以return new Error();
|
||||||
*
|
*
|
||||||
* 方法2:
|
* 方法2:
|
||||||
|
@ -33,6 +33,7 @@ import {
|
|||||||
change2Fixed,
|
change2Fixed,
|
||||||
COPY_STORAGE_KEY,
|
COPY_STORAGE_KEY,
|
||||||
Fixed2Other,
|
Fixed2Other,
|
||||||
|
generatePageNameByApp,
|
||||||
getNodeIndex,
|
getNodeIndex,
|
||||||
initPosition,
|
initPosition,
|
||||||
isFixed,
|
isFixed,
|
||||||
@ -502,6 +503,10 @@ class Editor extends BaseService {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isPage(config)) {
|
||||||
|
config.name = generatePageNameByApp(this.get('root'));
|
||||||
|
}
|
||||||
|
|
||||||
return await this.add(config);
|
return await this.add(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user