diff --git a/frontend/pc/src/utils/use-modal-close-confirmation.js b/frontend/pc/src/utils/use-modal-close-confirmation.js new file mode 100644 index 000000000..19a550429 --- /dev/null +++ b/frontend/pc/src/utils/use-modal-close-confirmation.js @@ -0,0 +1,11 @@ +export default function useModalCloseConfirmation(title, subTitle) { + return new Promise(resolve => { + window.app.$bkInfo({ + title: title || '确认离开当前页?', + subTitle: subTitle || '离开会导致未保存信息丢失', + okText: '离开', + confirmFn: () => resolve(true), + cancelFn: () => resolve(false), + }); + }); +} diff --git a/frontend/pc/src/views/processManagement/apiConfigure/addApiInfo.vue b/frontend/pc/src/views/processManagement/apiConfigure/addApiInfo.vue index 6f3fc00d0..dc33a3f10 100644 --- a/frontend/pc/src/views/processManagement/apiConfigure/addApiInfo.vue +++ b/frontend/pc/src/views/processManagement/apiConfigure/addApiInfo.vue @@ -69,25 +69,28 @@ :property="'name'"> + v-model="directory.formInfo.name" + @change="$emit('change')"> - + + v-model="directory.formInfo.func_name" + @change="$emit('change')"> + :disabled="(directory.formInfo.category === 'component' || directory.formInfo.category === 'buffet_component') && typeInfo !== 'ADD'" + @change="$emit('change')"> @@ -276,7 +281,7 @@ - +