refactor:移除 src,统一小写

This commit is contained in:
YunaiV
2025-04-18 18:38:34 +08:00
parent 87c6074e19
commit 7078e979fe
6 changed files with 8 additions and 5 deletions

View File

@@ -0,0 +1,43 @@
<script lang="ts" setup>
// TODO @芋艿:貌似不用 src 目录
import { computed } from 'vue';
import { Alert, Typography } from 'ant-design-vue';
export interface DocAlertProps {
/**
* 文档标题
*/
title: string;
/**
* 文档 URL 地址
*/
url: string;
}
const props = defineProps<DocAlertProps>();
/** 跳转 URL 链接 */
const goToUrl = () => {
window.open(props.url);
};
/** 是否开启 */
const isEnabled = computed(() => {
return import.meta.env.VITE_APP_DOCALERT_ENABLE !== 'false';
});
</script>
<template>
<Alert
v-if="isEnabled"
type="info"
show-icon
class="mb-2 rounded"
>
<template #message>
<Typography.Link @click="goToUrl">
{{ title }}文档地址{{ url }}
</Typography.Link>
</template>
</Alert>
</template>