From 25bd82ecaa3fec1cee8b8754fd5c6142a7b48b39 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 27 Oct 2020 13:53:47 +0900 Subject: [PATCH] Default behavior option for MkA component --- src/client/components/ui/a.vue | 11 +++++++++++ src/client/pages/settings/api.vue | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/client/components/ui/a.vue b/src/client/components/ui/a.vue index dce99ef676..8460c90b16 100644 --- a/src/client/components/ui/a.vue +++ b/src/client/components/ui/a.vue @@ -31,6 +31,10 @@ export default defineComponent({ type: String, required: false, }, + behavior: { + type: String, + required: false, + }, }, computed: { @@ -84,6 +88,13 @@ export default defineComponent({ }, nav() { + if (this.behavior) { + if (this.behavior === 'window') { + os.pageWindow(this.to); + return; + } + } + if (this.navHook) { this.navHook(this.to); } else { diff --git a/src/client/pages/settings/api.vue b/src/client/pages/settings/api.vue index 4f14aa1ba7..6a311cdc8b 100644 --- a/src/client/pages/settings/api.vue +++ b/src/client/pages/settings/api.vue @@ -6,7 +6,7 @@
- API console + API console
@@ -33,6 +33,7 @@ export default defineComponent({ icon: faKey }] }, + isDesktop: window.innerWidth >= 1100, }; },