refactor:优化 VITE_APP_TENANT_ENABLE、VITE_APP_CAPTCHA_ENABLE 变量的加载,不使用 useAppConfig 处理
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
// TODO @芋艿:貌似不用 src 目录
|
||||
import { computed } from 'vue';
|
||||
import { isDocAlertEnable } from '@vben/hooks';
|
||||
|
||||
import { Alert, Typography } from 'ant-design-vue';
|
||||
|
||||
export interface DocAlertProps {
|
||||
@@ -20,16 +20,11 @@ const props = defineProps<DocAlertProps>();
|
||||
const goToUrl = () => {
|
||||
window.open(props.url);
|
||||
};
|
||||
|
||||
/** 是否开启 */
|
||||
const isEnabled = computed(() => {
|
||||
return import.meta.env.VITE_APP_DOCALERT_ENABLE !== 'false';
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Alert
|
||||
v-if="isEnabled"
|
||||
v-if="isDocAlertEnable()"
|
||||
type="info"
|
||||
show-icon
|
||||
class="mb-2 rounded"
|
||||
|
||||
Reference in New Issue
Block a user