- {{ isEdit ? '编辑函数' : '创建函数' }}
+ {{ title }}
基础信息
@@ -120,6 +120,10 @@ import type { FormInstance } from 'element-plus'
import { MsgSuccess, MsgError } from '@/utils/message'
import { cloneDeep } from 'lodash'
+const props = defineProps({
+ title: String
+})
+
const emit = defineEmits(['refresh'])
const FieldFormDialogRef = ref()
const FunctionDebugDrawerRef = ref()
@@ -182,10 +186,6 @@ function refreshFieldList(data: any) {
currentIndex.value = null
}
-// function changeCode(value: string) {
-// form.value.code = value
-// }
-
const submit = async (formEl: FormInstance | undefined) => {
if (!formEl) return
await formEl.validate((valid: any) => {
@@ -209,7 +209,7 @@ const submit = async (formEl: FormInstance | undefined) => {
const open = (data: any) => {
if (data) {
- isEdit.value = true
+ isEdit.value = data?.id ? true : false
form.value = cloneDeep(data)
}
visible.value = true
diff --git a/ui/src/views/function-lib/index.vue b/ui/src/views/function-lib/index.vue
index e974ae7ca..636a84334 100644
--- a/ui/src/views/function-lib/index.vue
+++ b/ui/src/views/function-lib/index.vue
@@ -66,7 +66,7 @@
-
+