diff --git a/packages/runtime/CHANGELOG.md b/packages/runtime/CHANGELOG.md index b5e15751ee6eadc466cfffd233bee6ddaa6b02f6..9e8f5fc9b0b4eeb7c41a4d1ac254138c452022e5 100644 --- a/packages/runtime/CHANGELOG.md +++ b/packages/runtime/CHANGELOG.md @@ -15,6 +15,11 @@ - 表单多数据部件重构 +### Fixed + +- 修复向导表单上一步操作时 表单tag 异常 +- 修复向导表单下一步操作找不到步骤表单 + ## [0.3.5] - 2023-11-24 ### Added diff --git a/packages/runtime/src/controller/control/wizard-panel/wizard-panel.controller.ts b/packages/runtime/src/controller/control/wizard-panel/wizard-panel.controller.ts index 86160c3488a6556a4376b38f174c253655edd6c6..b7ac9ad7276d117be3b79ffb3467d043dc94dd60 100644 --- a/packages/runtime/src/controller/control/wizard-panel/wizard-panel.controller.ts +++ b/packages/runtime/src/controller/control/wizard-panel/wizard-panel.controller.ts @@ -298,8 +298,9 @@ export class WizardPanelController prevTag = data[this.model.stateAppDEFieldId]; } } else { - prevTag = this.tagHistory[this.tagHistory.length - 1]; + // 先删除在获取最后一个 否则prevTag会异常 this.tagHistory.pop(); + prevTag = this.tagHistory[this.tagHistory.length - 1]; } if (!prevTag) { throw new RuntimeError('没有上一个表单'); @@ -338,9 +339,11 @@ export class WizardPanelController // 通过步骤找,找到下一个步骤对应的第一个向导表单 const { formTag } = this.activeWizardForm!; const wizardSteps = this.model.dewizard!.dewizardSteps; - if (wizardSteps && formTag) { + const editForms = this.model.dewizard!.dewizardForms; + if (wizardSteps && editForms && formTag) { + // 从向导表单列表中找到当前表单对应的向导步骤 const index = wizardSteps.findIndex(_step => { - return _step.stepTag === formTag; + return _step.id === this.activeWizardForm!.dewizardStepId; }); const nextWizardStep = wizardSteps[index + 1]; if (!nextWizardStep) {