From 44dbccd0fffff4a94eee2a0e7b93a696ed8ff481 Mon Sep 17 00:00:00 2001 From: sunhao Date: Wed, 13 Nov 2024 09:09:53 +0800 Subject: [PATCH] * [story #69184, doing] add custom renders setting to DocApp. --- lib/zin/wg/docapp/js/v1.js | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/lib/zin/wg/docapp/js/v1.js b/lib/zin/wg/docapp/js/v1.js index 88361d7f49..1c16c11ce2 100644 --- a/lib/zin/wg/docapp/js/v1.js +++ b/lib/zin/wg/docapp/js/v1.js @@ -1027,8 +1027,15 @@ const commands = $.post($.createLink('doc', 'edit', `docID=${docID}`), docData); } }); +/** + * 定义页面上的自定义渲染器。 + * Define the custom renderers on the page. + */ +const customRenders = +{ } }; +}; /** * 获取文档界面上的表格初始化选项。 @@ -1299,9 +1306,11 @@ window.setDocAppOptions = function(_, options) return $.extend( { + defaultState : {listType: '', libReleaseMap: {}}, commands : commands, - onCreateDoc : userPrivs.create ? handleCreateDoc: null, - onSaveDoc : userPrivs.edit ? handleSaveDoc : null, + customRenders : customRenders, + onCreateDoc : userPrivs.create ? handleCreateDoc : null, + onSaveDoc : userPrivs.edit ? handleSaveDoc : null, canMoveDoc : canMoveDoc, onSwitchView : handleSwitchView, getActions : getActions, @@ -1314,8 +1323,9 @@ window.setDocAppOptions = function(_, options) }, window.docAppOptions, options); }; -window.docAppActions = actionsMap; -window.docAppCommands = commands; -window.getDocApp = getDocApp; -window.getDocAppLang = getLang; -window.docAppHasPriv = hasPriv; +window.docAppActions = actionsMap; +window.docAppCommands = commands; +window.docAppCustomRenders = customRenders; +window.getDocApp = getDocApp; +window.getDocAppLang = getLang; +window.docAppHasPriv = hasPriv;