perf: 使用封装的vben/utils工具类 替换 windows.open

pull/90/MERGE
xingyu4j 2025-05-06 21:39:25 +08:00
parent d92972ba3e
commit 60bd4a13b1
2 changed files with 3 additions and 5 deletions

View File

@ -1,5 +1,6 @@
<script lang="ts" setup>
import { isDocAlertEnable } from '@vben/hooks';
import { openWindow } from '@vben/utils';
import { Alert, Typography } from 'ant-design-vue';
@ -18,7 +19,7 @@ const props = defineProps<DocAlertProps>();
/** 跳转 URL 链接 */
const goToUrl = () => {
window.open(props.url);
openWindow(props.url);
};
</script>

View File

@ -1,5 +1,6 @@
<script lang="ts" setup>
import { useVbenModal, VbenButton, VbenButtonGroup } from '@vben/common-ui';
import { openWindow } from '@vben/utils';
import { Image, Tag } from 'ant-design-vue';
@ -13,10 +14,6 @@ const [Modal, modalApi] = useVbenModal({
modalApi.close();
},
});
function openWindow(url: string) {
window.open(url, '_blank');
}
</script>
<template>
<Modal class="w-[40%]" :title="$t('ui.widgets.qa')">