update 优化代码

This commit is contained in:
疯狂的狮子Li 2024-11-27 17:43:17 +08:00
parent 98a8e96feb
commit 6ef9b9a741
2 changed files with 3 additions and 2 deletions

View File

@ -11,7 +11,7 @@ import { download as rd } from '@/utils/request';
export {}; export {};
declare module 'vue' { declare module '@vue/runtime-core' {
interface ComponentCustomProperties { interface ComponentCustomProperties {
// 全局方法声明 // 全局方法声明
$modal: typeof modal; $modal: typeof modal;

View File

@ -134,7 +134,8 @@ const handleRegister = () => {
const [err] = await to(register(registerForm.value)); const [err] = await to(register(registerForm.value));
if (!err) { if (!err) {
const username = registerForm.value.username; const username = registerForm.value.username;
await ElMessageBox.alert("<font color='red'>" + t('register.registerSuccess', { username }) + '</font>', '系统提示', { await ElMessageBox.alert('<span style="color: red; ">' + t('register.registerSuccess', { username }) + '</font>', '系统提示', {
app: undefined,
dangerouslyUseHTMLString: true, dangerouslyUseHTMLString: true,
type: 'success' type: 'success'
}); });