2024-09-16 00:01:54 +08:00

64 lines
1.5 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<script setup>
import {
Dialog,
DialogContent,
DialogFooter,
DialogHeader,
DialogTitle,
} from '@/components/ui/dialog'
const props = defineProps({
visible: {
type: Boolean,
default: false,
},
})
const emit = defineEmits([`close`])
function onUpdate(val) {
if (!val) {
emit(`close`)
}
}
const links = [
{ label: `GitHub 仓库`, url: `https://github.com/doocs/md` },
{ label: `Gitee 仓库`, url: `https://gitee.com/doocs/md` },
{ label: `GitCode 仓库`, url: `https://gitcode.com/doocs/md` },
]
function onRedirect(url) {
window.open(url, `_blank`)
}
</script>
<template>
<Dialog :open="props.visible" @update:open="onUpdate">
<DialogContent>
<DialogHeader>
<DialogTitle>关于</DialogTitle>
</DialogHeader>
<div class="text-center">
<h3>一款高度简洁的微信 Markdown 编辑器</h3>
<p>扫码关注公众号 Doocs原创技术文章第一时间推送</p>
<img
class="mx-auto my-5"
src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/1648303220922-7e14aefa-816e-44c1-8604-ade709ca1c69.png"
alt="Doocs Markdown 编辑器"
style="width: 40%"
>
</div>
<DialogFooter class="sm:justify-evenly">
<Button
v-for="link in links"
:key="link.url"
@click="onRedirect(link.url)"
>
{{ link.label }}
</Button>
</DialogFooter>
</DialogContent>
</Dialog>
</template>