diff --git a/zyplayer-doc-swagger/src/main/resources/webjars/mg-ui/js/mg-ui-export.js b/zyplayer-doc-swagger/src/main/resources/webjars/mg-ui/js/mg-ui-export.js index 71a0935e..620a9ba4 100644 --- a/zyplayer-doc-swagger/src/main/resources/webjars/mg-ui/js/mg-ui-export.js +++ b/zyplayer-doc-swagger/src/main/resources/webjars/mg-ui/js/mg-ui-export.js @@ -7,6 +7,10 @@ var exports = { // 定义在mg-ui.js,用于重新生成文档树目录 regeneratePathTree(); }, + updateTreeShowType: function(){ + // 定义在mg-ui.js,用于修改树形菜单展示类型 + updateTreeShowType(); + }, updateUserSettings: function(setting){ // 定义在mg-ui.js,用于更新用户设置 updateUserSettings(setting); diff --git a/zyplayer-doc-swagger/src/main/resources/webjars/zpages/docShowConfig.html b/zyplayer-doc-swagger/src/main/resources/webjars/zpages/docShowConfig.html index 0b5bdb2f..c6b5b67a 100644 --- a/zyplayer-doc-swagger/src/main/resources/webjars/zpages/docShowConfig.html +++ b/zyplayer-doc-swagger/src/main/resources/webjars/zpages/docShowConfig.html @@ -101,13 +101,15 @@ watch: { catalogShowType: function(newVal, oldval){ app.userSettings.catalogShowType = newVal; - storeUserSettings(); - getExport().regeneratePathTree(); + storeUserSettings(function(){ + getExport().regeneratePathTree(); + }); }, treeShowType: function(newVal, oldval){ app.userSettings.treeShowType = newVal; - storeUserSettings(); - window.parent.window.updateTreeShowType(); + storeUserSettings(function(){ + getExport().updateTreeShowType(); + }); }, showParamType: function(newVal, oldval){ app.userSettings.showParamType = newVal; @@ -125,10 +127,13 @@ }); // 存储用户的配置信息 - function storeUserSettings() { + function storeUserSettings(success) { if (app.initCount-- <= 0) { setStorage(cacheKeys.userSettings, app.userSettings, function () { getExport().updateUserSettings(app.userSettings); + if(typeof success == "function") { + success(); + } }); } }