For example, there is a vue project that uses iframe to embed in a parent page. The parent page has an addTab method. How to write the method that the vue project wants to trigger the parent page?
The method is very simple, just need
parent.addTab(name, menuId) //这是触发iframe父页面的事件
top.addTab(name, menuId) //这是触发iframe顶层页面的事件