Construction method and device of sub-application in micro-front-end mode, equipment and storage medium

The invention provides a construction method and device of a sub-application in a micro-front-end mode, equipment and a storage medium, and relates to the technical field of Internet. The method comprises the steps that when it is detected that multiple sub-applications are registered in a main appl...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: SI XIN, RUI ZHENGYUN, YANG YUECHUAN, ZHOU YU
Format: Patent
Sprache:chi ; eng
Schlagworte:
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:The invention provides a construction method and device of a sub-application in a micro-front-end mode, equipment and a storage medium, and relates to the technical field of Internet. The method comprises the steps that when it is detected that multiple sub-applications are registered in a main application, unique identifiers corresponding to the sub-applications are generated; if a loading event of the main application for the sub-application is detected, updating the initial root identifier of the sub-application to the unique identifier; and controlling the main application to load and render the sub-application according to the updated initial root identifier. Compared with the prior art, the problem that the root identifier names of multiple sub-applications under one main application conflict is avoided. 本申请提供一种微前端模式下子应用的构建方法、装置、设备及存储介质,涉及互联网技术领域。该方法包括:在检测到向主应用中注册多个子应用时,生成各所述子应用对应的唯一标识;若检测到所述主应用针对所述子应用的加载事件,则将所述子应用的初始根标识更新为所述唯一标识;控制所述主应用根据更新后的初始根标识,加载渲染所述子应用。相对于现有技术,避免了一个主应用下的多个子应用根标识名称冲突的问题。