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 {
192
192
okText: this .$t (" message.workflow.process.index.QRGB" ),
193
193
cancelText: this .$t (" message.workflow.process.index.QX" ),
194
194
onOk : () => {
195
- // 删除线先判断删除的是否是当前正在打开的tab,如果打开到最后一个tab,如果没有打开还是在当前的tab
195
+ let active = this . active
196
196
if (this .active === index) {
197
197
// 删除的就是当前打开的
198
198
this .tabs .splice (index, 1 );
199
- this .choose ( this . tabs .length - 1 ) ;
199
+ active = this .tabs .length - 1 ;
200
200
} else {
201
201
this .tabs .splice (index, 1 );
202
+ active = index < active ? active - 1 : active
202
203
}
204
+ this .choose (active);
203
205
this .updateProjectCacheByTab ();
204
206
},
205
207
onCancel : () => {}
206
208
});
207
209
} else {
208
- // 删除线先判断删除的是否是当前正在打开的tab,如果打开到最后一个tab,如果没有打开还是在当前的tab
210
+ let active = this . active
209
211
if (this .active === index) {
210
212
// 删除的就是当前打开的
211
213
this .tabs .splice (index, 1 );
212
- this .choose ( this . tabs .length - 1 ) ;
214
+ active = this .tabs .length - 1 ;
213
215
} else {
214
216
this .tabs .splice (index, 1 );
217
+ active = index < active ? active - 1 : active
215
218
}
219
+ this .choose (active);
216
220
this .updateProjectCacheByTab ();
217
221
}
218
222
},
You can’t perform that action at this time.
0 commit comments