修改展示不及时问题
This commit is contained in:
@@ -7,6 +7,10 @@ var exports = {
|
|||||||
// 定义在mg-ui.js,用于重新生成文档树目录
|
// 定义在mg-ui.js,用于重新生成文档树目录
|
||||||
regeneratePathTree();
|
regeneratePathTree();
|
||||||
},
|
},
|
||||||
|
updateTreeShowType: function(){
|
||||||
|
// 定义在mg-ui.js,用于修改树形菜单展示类型
|
||||||
|
updateTreeShowType();
|
||||||
|
},
|
||||||
updateUserSettings: function(setting){
|
updateUserSettings: function(setting){
|
||||||
// 定义在mg-ui.js,用于更新用户设置
|
// 定义在mg-ui.js,用于更新用户设置
|
||||||
updateUserSettings(setting);
|
updateUserSettings(setting);
|
||||||
|
|||||||
@@ -101,13 +101,15 @@
|
|||||||
watch: {
|
watch: {
|
||||||
catalogShowType: function(newVal, oldval){
|
catalogShowType: function(newVal, oldval){
|
||||||
app.userSettings.catalogShowType = newVal;
|
app.userSettings.catalogShowType = newVal;
|
||||||
storeUserSettings();
|
storeUserSettings(function(){
|
||||||
getExport().regeneratePathTree();
|
getExport().regeneratePathTree();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
treeShowType: function(newVal, oldval){
|
treeShowType: function(newVal, oldval){
|
||||||
app.userSettings.treeShowType = newVal;
|
app.userSettings.treeShowType = newVal;
|
||||||
storeUserSettings();
|
storeUserSettings(function(){
|
||||||
window.parent.window.updateTreeShowType();
|
getExport().updateTreeShowType();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
showParamType: function(newVal, oldval){
|
showParamType: function(newVal, oldval){
|
||||||
app.userSettings.showParamType = newVal;
|
app.userSettings.showParamType = newVal;
|
||||||
@@ -125,10 +127,13 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
// 存储用户的配置信息
|
// 存储用户的配置信息
|
||||||
function storeUserSettings() {
|
function storeUserSettings(success) {
|
||||||
if (app.initCount-- <= 0) {
|
if (app.initCount-- <= 0) {
|
||||||
setStorage(cacheKeys.userSettings, app.userSettings, function () {
|
setStorage(cacheKeys.userSettings, app.userSettings, function () {
|
||||||
getExport().updateUserSettings(app.userSettings);
|
getExport().updateUserSettings(app.userSettings);
|
||||||
|
if(typeof success == "function") {
|
||||||
|
success();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user