Skip to content

Commit 62ab02e

Browse files
fix: MsgConfirm distinguishCancelAndClose
1 parent eb6f4e8 commit 62ab02e

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

ui/src/locales/lang/zh-CN/views/application.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ export default {
2828
},
2929
form: {
3030
appName: {
31-
label: '应用名称',
31+
label: '名称',
3232
placeholder: '请输入应用名称',
3333
requiredMessage: '请输入应用名称'
3434
},
3535
appDescription: {
36-
label: '应用描述',
36+
label: '描述',
3737
placeholder: '描述该应用的应用场景及用途,如:XXX 小助手回答用户提出的 XXX 产品使用问题'
3838
},
3939
appType: {
40-
label: '选择应用类型',
40+
label: '类型',
4141
simplePlaceholder: '适合新手创建小助手',
4242
workflowPlaceholder: '适合高级用户自定义小助手的工作流'
4343
},

ui/src/locales/lang/zh-Hant/views/application.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ export default {
2828
},
2929
form: {
3030
appName: {
31-
label: '應用名稱',
31+
label: '名稱',
3232
placeholder: '請輸入應用名稱',
3333
requiredMessage: '請輸入應用名稱'
3434
},
3535
appDescription: {
36-
label: '應用描述',
36+
label: '描述',
3737
placeholder: '描述該應用的應用場景及用途,如:XXX 小助手回答用戶提出的 XXX 產品使用問題'
3838
},
3939
appType: {
40-
label: '選擇應用類型',
40+
label: '類型',
4141
simplePlaceholder: '適合新手建立小助手',
4242
workflowPlaceholder: '適合高階用戶自訂小助手的工作流程'
4343
},

ui/src/views/application-workflow/index.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@
136136
<script setup lang="ts">
137137
import { ref, onMounted, onBeforeUnmount, computed, nextTick } from 'vue'
138138
import { useRouter, useRoute } from 'vue-router'
139+
import type { Action } from 'element-plus'
139140
import Workflow from '@/workflow/index.vue'
140141
import DropdownMenu from '@/views/application-workflow/component/DropdownMenu.vue'
141142
import PublishHistory from '@/views/application-workflow/component/PublishHistory.vue'
@@ -147,6 +148,7 @@ import useStore from '@/stores'
147148
import { WorkFlowInstance } from '@/workflow/common/validate'
148149
import { hasPermission } from '@/utils/permission'
149150
import { t } from '@/locales'
151+
150152
const { user, application } = useStore()
151153
const router = useRouter()
152154
const route = useRoute()
@@ -177,13 +179,14 @@ function back() {
177179
MsgConfirm(t('common.tip'), t('views.applicationWorkflow.tip.saveMessage'), {
178180
confirmButtonText: t('views.applicationWorkflow.setting.exitSave'),
179181
cancelButtonText: t('views.applicationWorkflow.setting.exit'),
180-
type: 'warning'
182+
type: 'warning',
183+
distinguishCancelAndClose: true
181184
})
182185
.then(() => {
183186
saveApplication(true, true)
184187
})
185-
.catch(() => {
186-
router.push({ path: `/application/${id}/WORK_FLOW/overview` })
188+
.catch((action: Action) => {
189+
action === 'cancel' && router.push({ path: `/application/${id}/WORK_FLOW/overview` })
187190
})
188191
}
189192
function clickoutsideHistory() {

0 commit comments

Comments
 (0)