From 88558c56b8ac2efac592a9c4a71c74eda88e3276 Mon Sep 17 00:00:00 2001 From: Jam Date: Fri, 5 May 2023 10:40:54 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=86=E8=8A=82=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/view/component/tpl/formItemListGenerator.html | 2 +- app/view/component/workflowEditorDrawer.html | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/view/component/tpl/formItemListGenerator.html b/app/view/component/tpl/formItemListGenerator.html index b4af1ee..befca1d 100644 --- a/app/view/component/tpl/formItemListGenerator.html +++ b/app/view/component/tpl/formItemListGenerator.html @@ -205,7 +205,7 @@ Vue.component("form-item-list-generator", { }), computed: { selectCanvaIndex() { - const index = this.formItemList.findIndex(item => item.id === this.selectedFormItemId); + const index = (this.formItemList || []).findIndex(item => item.id === this.selectedFormItemId); return index; }, isMobile() { diff --git a/app/view/component/workflowEditorDrawer.html b/app/view/component/workflowEditorDrawer.html index 66f6686..4957f9d 100644 --- a/app/view/component/workflowEditorDrawer.html +++ b/app/view/component/workflowEditorDrawer.html @@ -147,7 +147,8 @@ Vue.component("workflow-editor-drawer", { this.submitUiActionId = 'updateItem'; let formObj = _.clone(item); formObj.workflowConfig = formObj.workflowConfig ? JSON.parse(formObj.workflowConfig) : null; - formObj.workflowForm = formObj.workflowForm ? (typeof formObj == 'string'? JSON.parse(formObj.workflowForm): formObj.workflowForm) : []; + formObj.workflowForm = formObj.workflowForm ? (typeof formObj.workflowForm == 'string'? JSON.parse(formObj.workflowForm): formObj.workflowForm) : []; + debugger formObj.mode = formObj.workflowConfig.mode || 'serial'; this.formObj = formObj; } else {