|
310 | 310 | prop="ignoreFailedRemoteFile" |
311 | 311 | class="ignore-failed-wrapper" |
312 | 312 | > |
313 | | - <div class="switch-wrapper"> |
| 313 | + <!-- <div class="switch-wrapper"> |
314 | 314 | <nut-switch v-model="form.ignoreFailedRemoteFile" /> |
| 315 | + </div> --> |
| 316 | + <div class="radio-wrapper"> |
| 317 | + <nut-radiogroup direction="horizontal" v-model="form.ignoreFailedRemoteFile"> |
| 318 | + <nut-radio shape="button" label="disabled"> |
| 319 | + {{ $t(`filePage.ignoreFailedRemoteFile.disabled`) }} |
| 320 | + </nut-radio> |
| 321 | + <nut-radio shape="button" label="quiet"> |
| 322 | + {{ $t(`filePage.ignoreFailedRemoteFile.quiet`) }} |
| 323 | + </nut-radio> |
| 324 | + <nut-radio shape="button" label="enabled"> |
| 325 | + {{ $t(`filePage.ignoreFailedRemoteFile.enabled`) }} |
| 326 | + </nut-radio> |
| 327 | + |
| 328 | + </nut-radiogroup> |
315 | 329 | </div> |
316 | 330 | </nut-form-item> |
317 | 331 | </template> |
@@ -526,7 +540,13 @@ watchEffect(() => { |
526 | 540 | form.mergeSources = sourceData.mergeSources; |
527 | 541 | form.content = sourceData.content; |
528 | 542 | cmStore.setEditCode("FileEditer", sourceData.content); |
529 | | - form.ignoreFailedRemoteFile = sourceData.ignoreFailedRemoteFile; |
| 543 | + let ignoreFailedRemoteFile = sourceData.ignoreFailedRemoteFile; |
| 544 | + if (ignoreFailedRemoteFile === true) { |
| 545 | + ignoreFailedRemoteFile = 'quiet'; |
| 546 | + } else if (ignoreFailedRemoteFile === false || ignoreFailedRemoteFile == null) { |
| 547 | + ignoreFailedRemoteFile = 'disabled'; |
| 548 | + } |
| 549 | + form.ignoreFailedRemoteFile = ignoreFailedRemoteFile; |
530 | 550 | form.download = sourceData.download; |
531 | 551 | const newProcess = JSON.parse(JSON.stringify(sourceData.process)); |
532 | 552 | form.process = newProcess; |
@@ -635,6 +655,9 @@ const compare = () => { |
635 | 655 | Toast.loading("生成中...", { id: "compare", cover: true, duration: 1500 }); |
636 | 656 | const data: any = JSON.parse(JSON.stringify(toRaw(form))); |
637 | 657 | data.process = actionsToProcess(data.process, actionsList, ignoreList); |
| 658 | + if (data.ignoreFailedRemoteFile === "disabled"){ |
| 659 | + data.ignoreFailedRemoteFile = false; |
| 660 | + } |
638 | 661 |
|
639 | 662 | // 过滤掉预览开关关闭的操作 |
640 | 663 | actionsChecked.forEach((item) => { |
@@ -696,6 +719,9 @@ const submit = () => { |
696 | 719 | const data: any = JSON.parse(JSON.stringify(toRaw(form))); |
697 | 720 | data["display-name"] = data.displayName; |
698 | 721 | data.process = actionsToProcess(data.process, actionsList, ignoreList); |
| 722 | + if (data.ignoreFailedRemoteFile === "disabled"){ |
| 723 | + data.ignoreFailedRemoteFile = false; |
| 724 | + } |
699 | 725 |
|
700 | 726 | let res = null; |
701 | 727 |
|
|
0 commit comments