| | |
| | | |
| | | import { computed, ref } from 'vue'; |
| | | |
| | | import { useUserStore } from '@vben/stores'; |
| | | |
| | | import { useVbenModal } from '#/packages/effects/common-ui/src'; |
| | | |
| | | import { message } from 'ant-design-vue'; |
| | |
| | | |
| | | const emit = defineEmits(['success']); |
| | | const formType = ref<FormType>('create'); |
| | | const userStore = useUserStore(); |
| | | |
| | | const isDetail = computed(() => formType.value === 'detail'); |
| | | const getTitle = computed(() => { |
| | |
| | | formApi.setDisabled(data.formType === 'detail'); |
| | | modalApi.setState({ showConfirmButton: data.formType !== 'detail' }); |
| | | if (!data?.id) { |
| | | await formApi.setFieldValue('userId', userStore.userInfo?.id); |
| | | return; |
| | | } |
| | | modalApi.lock(); |
| | |
| | | <Modal :title="getTitle" class="w-[850px]"> |
| | | <Form class="mx-4" /> |
| | | </Modal> |
| | | </template> |
| | | </template> |