Skip to content

Commit

Permalink
feat: update dialog (#334)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanglbme authored Aug 20, 2024
1 parent a0f3bb5 commit 4b3d261
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions src/components/CodemirrorEditor/EditorHeader/AboutDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@ const props = defineProps({
},
})
defineEmits([`close`])
const emit = defineEmits([`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)
window.open(url, `_blank`)
}
</script>

Expand All @@ -18,33 +24,29 @@ function onRedirect(url) {
title="关于"
class="about__dialog"
:model-value="props.visible"
width="380"
width="520"
center
@close="$emit('close')"
@close="emit('close')"
>
<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>
<template #footer>
<el-button
v-for="link in links"
:key="link.url"
type="primary"
plain
@click="onRedirect('https://github.com/doocs/md')"
>
GitHub 仓库
</el-button>
<el-button
type="primary"
plain
@click="onRedirect('https://gitee.com/doocs/md')"
@click="onRedirect(link.url)"
>
Gitee 仓库
{{ link.label }}
</el-button>
</template>
</el-dialog>
Expand Down

0 comments on commit 4b3d261

Please sign in to comment.