mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
fix: 修复错误信息中的html标签无效Bug
This commit is contained in:
@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, watch } from 'vue';
|
import { h, ref, watch } from 'vue';
|
||||||
import type { UploadFileInfo } from 'naive-ui';
|
import type { UploadFileInfo } from 'naive-ui';
|
||||||
import { getToken } from '@/store/modules/auth/shared';
|
import { getToken } from '@/store/modules/auth/shared';
|
||||||
import { useDownload } from '@/hooks/business/download';
|
import { useDownload } from '@/hooks/business/download';
|
||||||
@ -77,7 +77,7 @@ function handleError(options: { file: UploadFileInfo; event?: ProgressEvent }) {
|
|||||||
const responseText = event?.target?.responseText;
|
const responseText = event?.target?.responseText;
|
||||||
const msg = JSON.parse(responseText).msg;
|
const msg = JSON.parse(responseText).msg;
|
||||||
message.value = msg;
|
message.value = msg;
|
||||||
window.$message?.error(msg || $t('common.importFail'));
|
window.$message?.error(() => h('div', { innerHTML: msg || $t('common.importFail') }));
|
||||||
success.value = false;
|
success.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user