添加页面

This commit is contained in:
yangjun 2024-06-04 08:48:02 +08:00
parent c986e6ecf2
commit 2af714b850
1 changed files with 64 additions and 0 deletions

View File

@ -0,0 +1,64 @@
<template>
<a-modal :title="title" :width="width" :visible="visible" :centered="true" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<studentZyxx ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></studentZyxx>
</a-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import studentZyxx from './studentZyxx.vue'
const title = ref<string>('');
const width = ref<number>(800);
const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const registerForm = ref();
const emit = defineEmits(['register', 'success']);
/**
* 编辑
* @param record
*/
function edit(record) {
title.value = '预览';
visible.value = true;
// nextTick(() => {
// registerForm.value.edit(record);
// });
}
/**
* 确定按钮点击事件
*/
function handleOk() {
registerForm.value.submitForm();
}
/**
* form保存回调事件
*/
function submitCallback() {
handleCancel();
emit('success');
}
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
}
defineExpose({
edit,
disableSubmit,
});
</script>
<style>
/**隐藏样式-modal确定按钮 */
.jee-hidden {
display: none !important;
}
</style>