Skip to content

Commit

Permalink
优化《用户协议》弹窗方式
Browse files Browse the repository at this point in the history
  • Loading branch information
otomad committed Aug 4, 2024
1 parent 51906fe commit 67e0280
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions components/PopupWindowLink.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<script lang="tsx">
export default (({ href }, { slots, attrs }) => {
function popupWindow(url: string) {
window.open(url, document.title, "toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,resizable=no,status=no");
}
return (
<a {...attrs} href={href} target="_blank" onClick={withModifiers(e => popupWindow((e.currentTarget as HTMLAnchorElement).href), ["stop"])}>
{slots.default?.()}
</a>
);
}) as VueJsx<{
/** 超链接。 */
href: string;
}>;
</script>
2 changes: 1 addition & 1 deletion pages/welcome.vue
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@

<SettingsUserProfile v-model="profile" />

<Checkbox v-model:single="isRead">我已阅读并同意<a href="https://otomad.github.io/cssc/license.htm" target="_blank" @click.stop>《KIRAKIRA☆DOUGA用户协议》</a></Checkbox>
<Checkbox v-model:single="isRead">我已阅读并同意<PopupWindowLink href="https://otomad.github.io/cssc/license.htm">《KIRAKIRA☆DOUGA用户协议》</PopupWindowLink></Checkbox>

<Button icon="check" :disabled="!validData || isUpdateUserInfo" :loading="isUpdateUserInfo" @click="finish">开始畅游KIRAKIRA☆DOUGA</Button>
</div>
Expand Down

0 comments on commit 67e0280

Please sign in to comment.