File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
web/packages/workflows/module/process Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -192,27 +192,31 @@ export default {
192192 okText: this .$t (" message.workflow.process.index.QRGB" ),
193193 cancelText: this .$t (" message.workflow.process.index.QX" ),
194194 onOk : () => {
195- // 删除线先判断删除的是否是当前正在打开的tab,如果打开到最后一个tab,如果没有打开还是在当前的tab
195+ let active = this . active
196196 if (this .active === index) {
197197 // 删除的就是当前打开的
198198 this .tabs .splice (index, 1 );
199- this .choose ( this . tabs .length - 1 ) ;
199+ active = this .tabs .length - 1 ;
200200 } else {
201201 this .tabs .splice (index, 1 );
202+ active = index < active ? active - 1 : active
202203 }
204+ this .choose (active);
203205 this .updateProjectCacheByTab ();
204206 },
205207 onCancel : () => {}
206208 });
207209 } else {
208- // 删除线先判断删除的是否是当前正在打开的tab,如果打开到最后一个tab,如果没有打开还是在当前的tab
210+ let active = this . active
209211 if (this .active === index) {
210212 // 删除的就是当前打开的
211213 this .tabs .splice (index, 1 );
212- this .choose ( this . tabs .length - 1 ) ;
214+ active = this .tabs .length - 1 ;
213215 } else {
214216 this .tabs .splice (index, 1 );
217+ active = index < active ? active - 1 : active
215218 }
219+ this .choose (active);
216220 this .updateProjectCacheByTab ();
217221 }
218222 },
You can’t perform that action at this time.
0 commit comments