[英]How to use Drawers and Tabs after initialView in SuperSonic
我正在使用Appgyver和Supersonic。 此應用程序僅用於登錄,登錄前無內容
我的初始視圖是登錄頁面。 獲得授權后,我將視圖堆棧替換為儀表板。
var view = new supersonic.ui.View('dashboard#index');
view.start("dashboard").then(function (startedView) {
supersonic.ui.layers.replace(startedView);
});
現在,儀表板將彈出。 但是處理Tabs和Drawers API會導致錯誤,因為這些Web視圖不再存在。
我理想的設置是這樣的:
我無法弄清楚這個設置,找不到這些主題的文檔。 替換初始視圖后,如何初始化抽屜和標簽頁。
要求的structure.coffee:
tabs: [
{
title: "Login"
id: "login"
location: "default#login"
}
{
title: "Profile"
id: "settings"
location: "dashboard#profile"
}
{
title: "Settings"
id: "internet"
location: "http://google.com" # URLs are supported!
}
]
drawers:
left:
id: "leftDrawer"
location: "dashboard#drawer"
showOnAppLoad: false
options:
animation: "swingingDoor"
initialView:
id: "initialView"
location: "default#login"
找到了!
對於此設置,您要執行的操作是將initialView作為登錄頁面,而不是替換圖層堆棧,只需關閉initialView。 在文檔中,這顯然是我做錯了。
這樣做確實會創建標簽和抽屜
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.