...
|
...
|
@@ -12,11 +12,6 @@ import ComponentConfiguration from './ComponentConfiguration.vue'; |
12
|
12
|
import GlobalPublicConfiguration from './GlobalPublicConfiguration.vue';
|
13
|
13
|
import { createRequestModalContext } from './useRequestModalContext';
|
14
|
14
|
|
15
|
|
-interface ComponentExpose {
|
16
|
|
- getConfigurationData: () => RequestConfigType
|
17
|
|
- setConfigurationData: (request: RequestConfigType) => void
|
18
|
|
- validate: () => Promise<boolean>
|
19
|
|
-}
|
20
|
15
|
|
21
|
16
|
const requestDataType = ref<RequestDataTypeEnum>(RequestDataTypeEnum.AJAX)
|
22
|
17
|
|
...
|
...
|
@@ -24,9 +19,9 @@ const showModal = ref(false) |
24
|
19
|
|
25
|
20
|
const chartEditStore = useChartEditStore()
|
26
|
21
|
|
27
|
|
-const componentConfigurationEl = ref<ComponentExpose>()
|
|
22
|
+const componentConfigurationEl = ref<InstanceType<typeof ComponentConfiguration>>()
|
28
|
23
|
|
29
|
|
-const publicInterfaceFormEl = ref<ComponentExpose>()
|
|
24
|
+const publicInterfaceFormEl = ref<InstanceType<typeof PublicInterfaceForm>>()
|
30
|
25
|
|
31
|
26
|
const getRequestTypeName = computed(() => {
|
32
|
27
|
return RequestDataTypeNameEnum[RequestDataTypeEnum[unref(requestDataType)] as keyof typeof RequestDataTypeEnum]
|
...
|
...
|
@@ -74,11 +69,11 @@ const getResult = () => { |
74
|
69
|
|
75
|
70
|
const handleSaveAction = async () => {
|
76
|
71
|
if (!(await validate())) return
|
77
|
|
- const value = getResult()
|
|
72
|
+ const value = getResult()
|
78
|
73
|
if (unref(selectTarget)) {
|
79
|
74
|
chartEditStore.updateComponentList(chartEditStore.fetchTargetIndex(), {
|
80
|
75
|
...unref(selectTarget)!,
|
81
|
|
- request: value!
|
|
76
|
+ request: value as RequestConfigType
|
82
|
77
|
})
|
83
|
78
|
}
|
84
|
79
|
showModal.value = false
|
...
|
...
|
|