Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update dialog #334

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading