feat: 表单编辑器magic-api调用不会弹框,而是以图标闪烁的形式显示
This commit is contained in:
@ -17,6 +17,7 @@
|
||||
<a-step :title="t('菜单设置')" />
|
||||
</a-steps>
|
||||
<div class="btn-box">
|
||||
<ajax-error-icon />
|
||||
<a-button @click="handleStepPrev" v-show="current !== 0">{{ t('上一步') }}</a-button>
|
||||
<a-button type="primary" @click="handleSaveDraft" v-show="current > 3">{{
|
||||
t('保存草稿')
|
||||
@ -47,7 +48,7 @@
|
||||
</BasicModal>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, provide, Ref, defineAsyncComponent } from 'vue';
|
||||
import { ref, reactive, provide, Ref, defineAsyncComponent, watch, onUnmounted } from 'vue';
|
||||
import { BasicModal, useModalInner } from '/@/components/Modal';
|
||||
import { GeneratorConfig } from '/@/model/generator/generatorConfig';
|
||||
import { TableInfo, noHaveTableAndField } from '/@/components/Designer';
|
||||
@ -70,6 +71,8 @@
|
||||
import { MenuConfig } from '/@/model/generator/menuConfig';
|
||||
import { FormJson } from '/@/model/generator/codeGenerator';
|
||||
import DesignLogo from '/@/components/ModalPanel/src/DesignLogo.vue';
|
||||
import AjaxErrorIcon from '/@/components/SecondDev/AjaxErrorIcon.vue';
|
||||
import useGlobalFlag from '/@/hooks/core/useGlobalFlag';
|
||||
const { t } = useI18n();
|
||||
const StructureConfigStep = defineAsyncComponent({
|
||||
loader: () => import('/@/components/CreateCodeStep/src/StructureConfigStep.vue'),
|
||||
@ -96,6 +99,8 @@
|
||||
loadingComponent: LoadingBox,
|
||||
});
|
||||
|
||||
const globalFlag = useGlobalFlag();
|
||||
const { isEditorOpen } = globalFlag;
|
||||
const userStore = useUserStore();
|
||||
const templateId = ref();
|
||||
const current = ref(0);
|
||||
@ -110,6 +115,14 @@
|
||||
const mainTableName = ref('table_' + random(10000, 99999));
|
||||
const emit = defineEmits(['close', 'register', 'success']);
|
||||
|
||||
watch(current, () => {
|
||||
isEditorOpen.value = current.value === 0;
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
isEditorOpen.value = false;
|
||||
});
|
||||
|
||||
const tableInfo = ref<TableInfo[]>([]);
|
||||
let generatorConfig = reactive<GeneratorConfig>({
|
||||
databaseId: '', //数据库id
|
||||
|
||||
Reference in New Issue
Block a user