From a1d7e81859f554f3a53680cc35f0f49bf1f77098 Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期四, 14 五月 2026 14:37:02 +0800
Subject: [PATCH] 导入项目
---
src/components/DocAlert/index.vue | 34 ++++++++++++++++++++++++++++++++++
1 files changed, 34 insertions(+), 0 deletions(-)
diff --git a/src/components/DocAlert/index.vue b/src/components/DocAlert/index.vue
new file mode 100644
index 0000000..0073266
--- /dev/null
+++ b/src/components/DocAlert/index.vue
@@ -0,0 +1,34 @@
+<template>
+ <el-alert v-if="getEnable()" type="success" show-icon>
+ <template #title>
+ <div @click="goToUrl">{{ '銆�' + title + '銆戞枃妗e湴鍧�锛�' + url }}</div>
+ </template>
+ </el-alert>
+</template>
+<script setup lang="tsx">
+import { propTypes } from '@/utils/propTypes'
+
+defineOptions({ name: 'DocAlert' })
+
+const props = defineProps({
+ title: propTypes.string,
+ url: propTypes.string
+})
+
+/** 璺宠浆 URL 閾炬帴 */
+const goToUrl = () => {
+ window.open(props.url)
+}
+
+/** 鏄惁寮�鍚� */
+const getEnable = () => {
+ return import.meta.env.VITE_APP_DOCALERT_ENABLE !== 'false'
+}
+</script>
+<style scoped>
+.el-alert--success.is-light {
+ margin-bottom: 10px;
+ cursor: pointer;
+ border: 1px solid green;
+}
+</style>
--
Gitblit v1.8.0