feat: 表单编辑器magic-api调用不会弹框,而是以图标闪烁的形式显示

This commit is contained in:
gaoyunqi
2024-03-27 16:42:01 +08:00
parent 46b36b1c92
commit f4adcd3dff
8 changed files with 114 additions and 7 deletions

View File

@ -0,0 +1,37 @@
<template>
<WarningOutlined class="alert-icon" v-show="hasAjaxError" :style="{ color: '#c00', cursor: 'pointer' }" @click.native="showHint" />
</template>
<style scoped>
@keyframes opacityChange {
0% {
opacity: 1;
}
50% {
opacity: 0.3;
}
100% {
opacity: 1;
}
}
.alert-icon{
animation: opacityChange 3s infinite;
}
</style>
<script setup>
import { WarningOutlined } from '@ant-design/icons-vue';
import { Modal } from 'ant-design-vue';
import useGlobalFlag from '/@/hooks/core/useGlobalFlag';
const globalFlag = useGlobalFlag();
const { hasAjaxError } = globalFlag;
function showHint() {
Modal.error({
title: '接口调用错误',
content: 'magic-api调用出现错误为了避免干扰正常操作这些操作不会在表单设计器中显式提示请使用浏览器的调试工具查看具体报错信息。'
});
}
</script>