模型基础信息
This commit is contained in:
41
src/components/XnWorkflow/nodes/common/previewCustomForm.vue
Normal file
41
src/components/XnWorkflow/nodes/common/previewCustomForm.vue
Normal file
@@ -0,0 +1,41 @@
|
||||
<template>
|
||||
<a-modal
|
||||
title="预览"
|
||||
:width="700"
|
||||
:visible="visible"
|
||||
:destroy-on-close="true"
|
||||
:footer-style="{ textAlign: 'right' }"
|
||||
:mask="false"
|
||||
:confirmLoading="confirmLoading"
|
||||
@ok="onSubmit"
|
||||
@cancel="onClose"
|
||||
>
|
||||
<component ref="customFormRef" :is="customFormsLayouts" />
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script setup name="previewCustomForm">
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { loadComponent } from '../../customForm'
|
||||
const visible = ref(false)
|
||||
const confirmLoading = ref(false)
|
||||
const customFormRef = ref()
|
||||
const customFormsLayouts = ref()
|
||||
const onOpen = (url) => {
|
||||
if (url) {
|
||||
visible.value = true
|
||||
customFormsLayouts.value = loadComponent(url)
|
||||
}
|
||||
}
|
||||
const onSubmit = () => {
|
||||
customFormRef.value.getData().then((value) => {
|
||||
message.info(JSON.stringify(value))
|
||||
})
|
||||
}
|
||||
const onClose = () => {
|
||||
visible.value = false
|
||||
}
|
||||
defineExpose({
|
||||
onOpen
|
||||
})
|
||||
</script>
|
||||
Reference in New Issue
Block a user