diff --git a/lib/zin/wg/docapp/js/v1.js b/lib/zin/wg/docapp/js/v1.js index b5c47cdafc..82b0e976be 100644 --- a/lib/zin/wg/docapp/js/v1.js +++ b/lib/zin/wg/docapp/js/v1.js @@ -73,18 +73,9 @@ window.replaceZentaoList = function(oldBlockID, newType, newblockID, props) }; /* 插入禅道列表。*/ -window.insertZentaoList = function(type, blockID, props, tryUpdateBlockID) +window.insertZentaoList = function(type, blockID, props, replaceBlockID) { - if(tryUpdateBlockID) - { - const replaceID = typeof tryUpdateBlockID === 'number' ? tryUpdateBlockID : blockID; - const $block = $('#docApp').find(`.zentao-list[data-id="${replaceID}"]`); - if($block.length) - { - reloadZentaoList(blockID); - return; - } - } + if(replaceBlockID) return replaceZentaoList(replaceBlockID, type, blockID, props); getDocApp().editor.$.insertCustom(getZentaoListProps(type, blockID, props)); };