open links in abuse comment in new window (#13381)
* feat: changing MkA behavior from MkMFM
* chore: open links in abuse comment in new window
* docs(changelog): 通報のコメント内のリンクをクリックした際、ウィンドウで開くように
* chore: use inject instead of prop drilling
* Revert "chore: use inject instead of prop drilling"
This reverts commit b4dd14eacf
.
This commit is contained in:
@@ -9,6 +9,10 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
</a>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
export type MkABehavior = 'window' | 'browser' | null;
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, shallowRef } from 'vue';
|
||||
import * as os from '@/os.js';
|
||||
@@ -20,12 +24,14 @@ import { useRouter } from '@/router/supplier.js';
|
||||
const props = withDefaults(defineProps<{
|
||||
to: string;
|
||||
activeClass?: null | string;
|
||||
behavior?: null | 'window' | 'browser';
|
||||
behavior?: MkABehavior;
|
||||
}>(), {
|
||||
activeClass: null,
|
||||
behavior: null,
|
||||
});
|
||||
|
||||
const linkBehaviour = props.behavior;
|
||||
|
||||
const el = shallowRef<HTMLElement>();
|
||||
|
||||
defineExpose({ $el: el });
|
||||
|
Reference in New Issue
Block a user